Discussion:
Generating Unsolicited Neighbor Solicitation
(too old to reply)
Edgar Fuß
2021-07-22 17:40:02 UTC
Permalink
Is there a way of manually triggering an Unsolicited Neighbor Solicitation
(the IPv6 equivalent of a gratuitous ARP)?

When adding an adress to an interface, one should be sent, but I see only the
DAD and a Mulicast join.

Maybe my filter rules are bad -- I always forget whether tcpdump sees
outgoing packets before they pass (or don't) the packet filter or only
those actually sent on the interface (likewise for incoming ones).

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Edgar Fuß
2021-07-23 14:56:07 UTC
Permalink
I'm confused.

In the IPv4 world, adding an address to an interface causes an Gratuitous ARP
to be sent, informing the world about the new MAC

In the IPv6 world, there are Unsolicited Neighbor Advertisements, but they are
declared optional (speeding up things) and NetBSD seems not to send them.

Now my setup is that I have two machines for the same purpose (gateway, in
this case), one in standby and one active. Things are setup that services
(routes, in this case) use an address that's an alias which the active machine
has and the standby one lacks. Moving the service from one box to the other
means deleting the alias address from the formerly active one and adding it on
the formerly standby one.

This works in the IPv4 case because the newly active machine sends a GARP for
the alias address, but it fails for IPv6. Is there a way to make it work for
v6?

I'm aware others use CARP for this and just move the MAC address, but moving
the IP address should work, too, no?

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Edgar Fuß
2021-07-23 15:15:35 UTC
Permalink
Thanks for looking into this.
What was the status of the interface when you added the extra address ?
It was operational with the LL plus one global address assigned.

I tried tcpdump-ing (on NetBSD-6 and -8) while assigning the alias address
and I do see the DAD (and a Multicast Listener Report), but no NA.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Edgar Fuß
2021-08-12 14:47:16 UTC
Permalink
Post by Edgar Fuß
Is there a way of manually triggering an Unsolicited Neighbor Solicitation
(the IPv6 equivalent of a gratuitous ARP)?
When adding an adress to an interface, one should be sent, but I see only the
DAD and a Mulicast join.
After digging through the source for the past days, I've made some progress.

It looks like the code paths for generating GARPs and Unsol NAs are completely
different because ARP is an ethernet-only thing while ND is L2 agnostic.

So while GARPs are generated in lla_rt_output() in the RTM_ADD case, Unsol NAs
should probably be generated in nd6_rtrequest() (which ifa_rtrequest points to
in the IPv6 case). But the code part that seems should in fact generate them
is #if 0'd out with a comment /* XXX it does not work */ for more than
20 years. Unfortunately, itojun@ is no longer with us to explain why he
disabled that part.

Any experts on this area? Would it make sense to look at how other projects
using KAME (who would that be?) handle that case?

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Edgar Fuß
2021-08-12 19:16:50 UTC
Permalink
What does FreeBSD/OpenBSD do?
Do they still use KAME?

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Edgar Fuß
2021-08-19 11:46:04 UTC
Permalink
What does FreeBSD/OpenBSD do?
OpenBSD's code looks exactly like NetBSD's. Maybe it's still from before
the fork?

FreeBSD doesn't send NAs outside netinet6/nd6_nb6.c (NS/DAD) or
netinet/ip_carp.c (CARP). I didn't look into the history yet.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...