Modify

Opened 5 years ago

Closed 5 years ago

#13682 closed defect (worksforme)

6relayd: Please add route flag to neighbor advertisements

Reported by: anonymous Owned by: cyrus
Priority: high Milestone: Attitude Adjustment 12.09.1
Component: packages Version: Attitude Adjustment 12.09
Keywords: 6relady neighbor advertisement Cc: cyrus@…

Description

I noticed my Ubuntu and OS X systems started to drop the default router from IPv6 routing table when I started using 6relayd instead of radvd. And it looks like the problem was caused by neighbor advertisements from 6relayd that did not have the router flag set.

This is an example of a working NA packet from radvd, with the router flag set in the reply:

$ tcpdump -nvvr radvd1.cap
reading from file radvd1.cap, link-type EN10MB (Ethernet)
17:15:01.215779 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::201:2eff:fe3a:49bb > ff02::1:ff9c:a577: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fe80::2cb0:5dff:fe9c:a577
	  source link-address option (1), length 8 (1): 00:01:1e:2a:55:bb
	    0x0000:  0001 1e2a 55bb
17:15:01.216168 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::2cb0:5dff:fe9c:a577 > fe80::201:2eff:fe3a:49bb: [icmp6 sum ok] ICMP6, neighbor advertisement, length 32, tgt is fe80::2cb0:5dff:fe9c:a577, Flags [router, solicited, override]
	  destination link-address option (2), length 8 (1): 2e:b0:2d:88:a5:77
	    0x0000:  2eb0 2d88 a577

A repeat of the same thing with 6relayd and a reply without router flag set:

$ tcpdump -nvvr 6relayd.cap
reading from file 6relayd.cap, link-type EN10MB (Ethernet)
19:40:15.002593 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::201:2eff:fe3a:49bb > ff02::1:ff9c:a577: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fe80::2cb0:5dff:fe9c:a577
	  source link-address option (1), length 8 (1): 00:01:1e:2a:55:bb
	    0x0000:  0001 1e2a 55bb
19:40:15.003074 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::2cb0:5dff:fe9c:a577 > fe80::201:2eff:fe3a:49bb: [icmp6 sum ok] ICMP6, neighbor advertisement, length 32, tgt is fe80::2cb0:5dff:fe9c:a577, Flags [solicited, override]
	  destination link-address option (2), length 8 (1): 2e:b0:2d:88:a5:77
	    0x0000:  2eb0 2d88 a577

Based on RFCs, routers should always set the flag:
http://tools.ietf.org/html/rfc4861#section-7.2.4

And if clients receives NA packets without the router flag, it must remove that default router:
http://tools.ietf.org/html/rfc4861#page-66

So looks like my *nix machines are dropping default routes because of missing router flags from 6relayd. Can you add the option to send the router flag in response to neighbor discovery packets? If 6relayd is meant to be a universal RD/DHCPv6 server/relay, and the router flag should not be in there by default, can you add support to enable that function in the configuration file to advertise the router flag?

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by anonymous

Just to clarify a bit more, Ubuntu and OS X obtained proper prefixes from 6relayd's RA packets. But both failed to reach the Internet and router via IPv6. The moment both tries to reach any IPv6 destination, they send neighbor solicitations, received neighbor advertisements, drops the default route from the v6 routing table and reported "no route to host".

comment:2 Changed 5 years ago by cyrus

That is interesting to hear. The isRouter flag in the NAs is not affected by 6relayd or radvd but by the sysctl setting of your interface, e.g. net.ipv6.conf.$IFACE.forwarding being >0.

The default for this is 1 now (was 2 up until today) which shouldn't make any difference. This is set in /etc/sysctl.conf.

However it seems that radvd sets this value explicitely to 1 again when being started. I want to avoid adding this "hack" to 6relayd as well.

Can you give me some more information about the problem you encountered?
Did you change the sysctl.conf? Does it make any difference to you whether it is set to 1 or 2 there?

Do you know of anything you have installed that manipulates these values?
Which revision of OpenWrt are you running?

comment:3 Changed 5 years ago by cyrus

  • Owner changed from developers to cyrus
  • Status changed from new to assigned

comment:4 Changed 5 years ago by cyrus

  • Cc cyrus@… added

comment:5 Changed 5 years ago by anonymous

Thanks for the clue, adding the following fixed the problem:

net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.forwarding=1

I've been upgrading openwrt with my own builds and inheriting all previous configuration files since AA-beta. So my custom /etc/sysctl.conf (with short custom timeouts) didn't pickup those forwarding flag that was introduced between then and now. And I guess radvd hid that problem from me by turning it on when it ran!

comment:6 Changed 5 years ago by cyrus

  • Resolution set to worksforme
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.