1

My understanding was thatsudo netstat -tlupn gives me all the addresses/ports that have processes listening and that ip address list or ifconfig (though I guess the latter is deprecated) would give all the network interfaces with their associated ip addresses. So what's up with

ip address list | grep  127.0.0.53

returning nothing when

sudo netstat -tlupn | grep 127.0.0.53

returns

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      714/systemd-resolve
udp        0      0 127.0.0.53:53           0.0.0.0:*                           714/systemd-resolve

Similar thing with sudo netstat -tlupn | grep 224.0.0.251:

udp        0      0 224.0.0.251:5353        0.0.0.0:*                           29533/chrome
...

What am I not understanding? (Running Ubuntu 18.04 inside VirtualBox fwiw).

2

ip address list gives you IP addresses of your interfaces. And list of interfaces. Among this addresses, you could find this this subnet: inet 127.0.0.1/8 scope host lo. This is loopback. /8 means that for you accessible this ip's range: 127.0.0.0 - 127.255.255.255.

  • So basically that whole address range is assigned to the lo interface? But this doesn't seem to work for my other interfaces. Is there something in the ip address list output that tells you an interface works/doesn't this way, or is it just that it is a loopback interface? – Benjamin Berman May 15 at 19:39
  • The loopback interface is special, for historical reasons. " (g) { 127, <any> } Internal host loopback address. Addresses of this form MUST NOT appear outside a host." From tools.ietf.org/html/rfc1122#section-3.2.1.3. – user4556274 May 15 at 20:25
2

In addition to metallic's answer that for the loopback interface you need to consider the address range, the IPv4 address range 224.0.0.0-239.255.255.255 is reserved for multicast traffic. To view multicast addresses in use by your system, you would use

ip maddress show

rather than

ip address list

which will list the unicast addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.