[GLLUG] Can anyone explain this netstat output?

Chris Bell chrisbell at chrisbell.org.uk
Sun Jun 30 16:09:37 UTC 2019


On Sunday, 30 June 2019 12:12:23 BST Andy Smith via GLLUG wrote:
> 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

Sorry, I can't remember when I noticed it, it was while I was configuring a 
package, I just realised what happened and added the /24.

-- 
Chris Bell
Website http://chrisbell.org.uk



More information about the GLLUG mailing list