Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICMP6 Router Advertisement feature #439

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

abtink
Copy link
Member

@abtink abtink commented Oct 10, 2019

This commit adds "Router Advertisement" feature which emits periodic
Neighbor Discovery ICMPv6 Router Advertisement (RA) messages
announcing routes on other network interfaces related to Thread
network.

The routes included in RA message mirror all the routes added on the
host primary interface (from IPv6:Routes) corresponding to off-mesh
routes and/or on-mesh prefixes within the Thread network.

This feature can be enabled through property RouterAdvert:Enable (by
default it is disabled) and its behavior can modified through a group
of wpan properties (all start with prefix RouterAdver).

A readme/guide is also added under doc folder which describes the wpan
properties and shows example use/behavior of this feature.

doc/router-advert-feature-guide.md Outdated Show resolved Hide resolved
doc/router-advert-feature-guide.md Outdated Show resolved Hide resolved
doc/router-advert-feature-guide.md Outdated Show resolved Hide resolved
This commit adds "Router Advertisement" feature which emits periodic
Neighbor Discovery ICMPv6 Router Advertisement (RA) messages
announcing routes on other network interfaces related to Thread
network.

The routes included in RA message mirror all the routes added on the
host primary interface (from `IPv6:Routes`) corresponding to off-mesh
routes and/or on-mesh prefixes within the Thread network.

This feature can be enabled through property `RouterAdvert:Enable` (by
default it is disabled) and its behavior can modified through a group
of wpan properties (all start with prefix `RouterAdver`).

A readme/guide is also added under doc folder which describes the wpan
properties and shows example use/behavior of this feature.
@jwhui
Copy link
Member

jwhui commented Oct 15, 2019

RFC 4861 Section 4.2 requires the Router Advertisement's IPv6 Hop Limit field to be set to 255. However, in testing, the IPv6 Hop Limit field is being set to 1, which is the Linux default for multicast messages. I think you need to set the IPV6_MULTICAST_HOPS socket option to specify 255.

@abtink
Copy link
Member Author

abtink commented Oct 15, 2019

Thanks. Added code to set the hop limit to 255 in the new commit 39c472d.

tcpdump seems to indicate it is being set to 255 now.

13:53:20.705621 IP6 (flowlabel 0x67701, hlim 255, next-header ICMPv6 (58) payload length: 40) fe80::b4ea:7e55:5f7:4141 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 40
	hop limit 255, Flags [none], pref medium, router lifetime 0s, reachable time 3600s, retrans time 0s
	  source link-address option (1), length 8 (1): 00:00:00:00:00:00
	    0x0000:  0000 0000 0000
	  route info option (24), length 16 (2):  fd00:1234::/64, pref=medium, lifetime=3600s
	    0x0000:  4000 0000 0e10 fd00 1234 0000 0000
	0x0000:  6006 7701 0028 3aff fe80 0000 0000 0000  `.w..(:.........
	0x0010:  b4ea 7e55 05f7 4141 ff02 0000 0000 0000  ..~U..AA........
	0x0020:  0000 0000 0000 0001 8600 7e46 ff00 0000  ..........~F....
	0x0030:  0000 0e10 0000 0000 0101 0000 0000 0000  ................
	0x0040:  1802 4000 0000 0e10 fd00 1234 0000 0000  ..@........4....

This commit adds prefix info option to RA (multiple prefixes)
Also adds a property to allow user to disable "Router Info" option
in RA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants