Discussion:
[Bug 233196] Netstat shows zero counters for aliases IP addresses
(too old to reply)
b***@freebsd.org
2018-11-13 13:05:56 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233196

Bjoern A. Zeeb <***@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Hardware|amd64 |Any
Component|bin |kern
Assignee|***@FreeBSD.org |***@FreeBSD.org
CC| |***@FreeBSD.org

--- Comment #1 from Bjoern A. Zeeb <***@FreeBSD.org> ---
It was never implemented for IPv4.
In IPv6 it's been done right from the start.

I think this patch (probably for FreeBSD 9) was supposed to improve the
situation for IPv4, but nobody ever did the performance evaluation as it's an
extra loop over all interface addresses:
https://people.freebsd.org/~bz/20100816-01-in_ifawithifp-legacy-o-counters.diff
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freebsd.org
2018-11-13 13:45:04 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233196

Yuri Pankov <***@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@FreeBSD.org

--- Comment #2 from Yuri Pankov <***@FreeBSD.org> ---
Which column exactly is this about? Oerrs is "-" for all *IP* interfaces, not
only the alias one; same for Ierrs, Idrop, Coll as these stats likely make
sense only for link level. And it seems to work for me just fine, "alias"
address is 10.10.10.1/24 (running HEAD):

$ netstat -i
Name Mtu Network Address Ipkts Ierrs Idrop Opkts Oerrs
Coll
em0 9000 <Link#1> 94:c6:91:1c:80:16 40212 0 0 23337 0
0
em0 - fe80::%em0/64 fe80::96c6:91ff:f 5 - - 7 -
-
em0 - fd4b:fd13:e02 fd4b:fd13:e02a:0: 3 - - 2 -
-
em0 - 192.168.1.0/2 thor 38106 - - 23108 -
-
em0 - 10.10.10.0/24 10.10.10.1 171 - - 171 -
-
lo0 16384 <Link#2> lo0 18 0 0 18 0
0
lo0 - localhost localhost 0 - - 0 -
-
lo0 - fe80::%lo0/64 fe80::1%lo0 0 - - 0 -
-
lo0 - your-net localhost 18 - - 18 -
-
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freebsd.org
2018-11-13 13:49:24 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233196

--- Comment #3 from Bjoern A. Zeeb <***@FreeBSD.org> ---
(In reply to Yuri Pankov from comment #2)

It's for output octets (probably also packets).

You need a secondary address of the same network, e.g., 192.168.1.123/32 and
then use that as outbound address. People used to see this with IP based jails
for example.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freebsd.org
2018-11-13 13:55:08 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233196

--- Comment #4 from kuPyxa <***@varnakov.net> ---
I mean Opkts column.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freebsd.org
2018-11-13 13:55:37 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233196

--- Comment #5 from Yuri Pankov <***@FreeBSD.org> ---
(In reply to Bjoern A. Zeeb from comment #3)
Got it, thanks. I was confused a bit by description saying Oerrs, having
addresses from different subnets, combined with your reply. And yes, now I see
it (used `ping -S <alias-address>`).
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...