r/linuxquestions • • 12h ago

WHY did send automatic packets on interface when interface bring up?

Hello everyone, I have a question about interfaces on Linux. When I create an interface of any type, like dummy or veth, then add an IP address to it and bring the link up, it starts sending the packets below:

      1 0.000000000           :: → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
    2 0.000048173           :: → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
    3 0.760002556           :: → ff02::1:ff7e:a857 ICMPv6 86 Neighbor Solicitation for fe80::fc89:41ff:fe7e:a857
    4 0.824044239           :: → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
    5 0.920013612           :: → ff02::1:ffaf:8999 ICMPv6 86 Neighbor Solicitation for fe80::dc1e:50ff:feaf:8999
    6 0.951963986           :: → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
    7 1.784169084 fe80::fc89:41ff:fe7e:a857 → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
    8 1.784228197 fe80::fc89:41ff:fe7e:a857 → ff02::2      ICMPv6 70 Router Solicitation from fe:89:41:7e:a8:57
    9 1.944008304 fe80::dc1e:50ff:feaf:8999 → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
   10 1.944034168 fe80::dc1e:50ff:feaf:8999 → ff02::2      ICMPv6 70 Router Solicitation from de:1e:50:af:89:99
   11 2.360009994 fe80::fc89:41ff:fe7e:a857 → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
   12 2.487859333 fe80::dc1e:50ff:feaf:8999 → ff02::16     ICMPv6 90 Multicast Listener Report Message v2
   13 5.943840617 fe80::dc1e:50ff:feaf:8999 → ff02::2      ICMPv6 70 Router Solicitation from de:1e:50:af:89:99
   14 5.943855103 fe80::fc89:41ff:fe7e:a857 → ff02::2      ICMPv6 70 Router Solicitation from fe:89:41:7e:a8:57
   15 13.623954416 fe80::dc1e:50ff:feaf:8999 → ff02::2      ICMPv6 70 Router Solicitation from de:1e:50:af:89:99
   16 14.135869339 fe80::fc89:41ff:fe7e:a857 → ff02::2      ICMPv6 70 Router Solicitation from fe:89:41:7e:a8:57

I searched online to understand what these packets mean and why the kernel sends them. My search results prove these packets are MLD and are in the ICMPv6 protocol. But cannot understand why these packets are sent automatically by the kernel, or how I can disable them.

2 Upvotes

5 comments sorted by

7

u/dkopgerpgdolfg 12h ago edited 12h ago

In short, it's part of the way that you get IPv6 addresses when you're connected to some network. It asks some possibly available router to respond with some basic infos, then (if a router responds) acts upon the received data and other local settings.

If you're working with raw kernel interfaces instead of some manager software (like nm or networkd), then you'll find a lot of possible settings in /proc/sys/net/ipv6/conf/something/something . You can disable these solicitation packets and/or if router responses are accepted, plus set intervals how often it tries etc.

Some keywords for further information: Prefix, router advertisment, slaac, neighbor discovery, privacy extensions, ula, Multicast groups in ipv6, ...

1

u/Yousef_Tele 12h ago

Sorry, what are the pros and cons of disabling this feature? If I disabled it, my interface didn't get an IPv6 address?

5

u/dkopgerpgdolfg 12h ago

If I disabled it, my interface didn't get an IPv6 address?

Basically yes. If you disable RS and RA, then it won't automatically configure any address except the "link-local" one.

Link-local addresses are generated from the MAC address, and can still be used to communicate with the device that is directly connected, but are not useful for the global internet etc. In hex notation, they start with fe80.

Depending on your use case, configuring your own fully static IPs might be an option too.

As said before, the automatic RS/RA addresses depend on a router being available; just some virtual NIC that isn't connected to one won't get any either.

1

u/Downtown_Cat_7425 5h ago

That is normal and usually a mix of three things: gratuitous ARP when the interface comes up, IPv6 Neighbor Discovery / Duplicate Address Detection, and DHCP or router advertisement traffic. Use tcpdump with `arp or icmp6` to see exactly which one it is. The packets are how the stack announces its address and checks nobody else is using it, so they are almost never a sign of compromise.