Web lists-archives.com

Re: This (new to me) ip thingy




	Hi.

On Tue, Oct 03, 2017 at 02:32:29AM -0400, Gene Heskett wrote:
> Greetings;
> 
> Confusion still reigns here.
> For instance:
> oot@coyote:~# ip m l eth0
> 2:      eth0
>         link  01:00:5e:00:00:01
>         link  33:33:00:00:02:02
>         link  33:33:00:00:00:01
>         link  01:00:5e:00:00:fb
>         link  33:33:ff:62:fc:bb
>         link  33:33:00:00:00:fb
>         inet  224.0.0.251
>         inet  224.0.0.1
>         inet6 ff02::fb
>         inet6 ff02::1:ff62:fcbb
>         inet6 ff02::202
>         inet6 ff02::1
>         inet6 ff01::1

So, multicasts. Ok.

> But add - -r so its supposed to show names, and get:
> 2:      eth0
>         link  01:00:5e:00:00:01
>         link  33:33:00:00:02:02
>         link  33:33:00:00:00:01
>         link  01:00:5e:00:00:fb
>         link  33:33:ff:62:fc:bb
>         link  33:33:00:00:00:fb
>         inet  (5 second pause) 224.0.0.251
>         inet  all-systems.mcast.net
>         inet6 ff02::fb
>         inet6 ff02::1:ff62:fcbb
>         inet6 ff02::202
>         inet6 ip6-allnodes
>         inet6 ff01::1
> Which, according to the manpage and my interpretation, should resolv the names those 6 (mac?) addresses belong to.

No, it should not. It means:

-r, -resolve use the system's name resolver to print DNS names instead
of host addresses.

So, in plain English - if it is an IP address - it will be resolved.
If it is an IPv6 address - it will be resolved too.
At least ip will try to do so via /etc/hosts, DNS requests and other
name resolution methods all according to your /etc/nsswitch.conf.

To translate MACs to IPs you need to do ARP requests (ICMPv6 if you need
IPv6 addresses). Try "ip -r n s" instead.


> So while its seemingly working at the net hardwares speed, I think its telling me I am miss-configured somehow. There are not any ipv6 addresses in the hosts file that would translate to the same name as the machines given name. I tried that several years ago and it caused errors at the time.

Run "tcpdump -nvi any udp port 53 or tcp port 53 or udp port 5353".
Run "ip -r m l eth0" alongside with it.
Watch the result.

Frankly I'm not surprised that it failed to resolve 224.0.0.251. Nobody
sane would add a DNS record for this anyway.

Reco