[GLLUG] Can anyone explain this netstat output?
Andy Smith
andy at bitfolk.com
Sun Jun 30 12:12:26 UTC 2019
Hello,
On Sun, Jun 30, 2019 at 12:55:27PM +0100, Chris Bell via GLLUG wrote:
> Unless you specify an IPv4 address as /24 the system does sometimes assume /16
Which tools do you see doing things like that? If they are not
deprecated tools, this would be a bug. As far as I'm aware
everything from iputils and iproute2 assumes a /32 (IPv4) if you
leave off the prefix/netmask.
$ sudo ifconfig lo add 128.1.1.1
$ ip addr show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qle
n 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet 128.1.1.1/8 scope global lo:0
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
$ sudo ip addr del 128.1.1.1/8 dev lo
$ sudo ip addr add 128.1.1.1 dev lo
$ ip addr show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet 128.1.1.1/32 scope global lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
"ifconfig" and "netstat" do count as deprecated I'm afraid, being
replaced with "ip" and "ss". Though I have had a rather easier time
switching to "ip" than I have to "ss"…
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
More information about the GLLUG
mailing list