-
Notifications
You must be signed in to change notification settings - Fork 96
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
route command differs from ip command when adding ipv6 route #27
Comments
Thanks for the patch and report. Maybe it’s too early for me, but why does the kernel deny the second host route? I also wonder why ip doesn’t set the host flag on /128 - is the flag generally not used anymore? |
I've sent an email to the kernel mailing list for advice, but no one has responded.
There is no document to declare that RTF_HOST is no longer used.
|
I think the host flag was mostly related to routing protocols (announcements), so not setting it bydefaul but offering a -host switch might be an option, I am just not sure how problematic such changed behavior is. On the other hand rejecting the second host route is a weird kernel behavior, I wonder if this is because it interpreted it as a peer-to-peer interface. |
In the following special scenarios, the ip command denies the following second route addition, but route does not。
Example:
$ip -6 route add 2409:8080:5a0a:60c7::7/128 via 2409:8080:5a0a:60c7::7 dev eth2
$ip -6 route add 2409:8080:5a0a:60c7::8/128 via 2409:8080:5a0a:60c7::7 dev eth2
RTNETLINK answers: No route to host
$ route -A inet6 add 2409:8080:5a0a:60c7::8/128 gw 2409:8080:5a0a:60c7::7 dev eth2
$
$ route -6n
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
2409:8080:5a0a:60c7::7/128 2409:8080:5a0a:60c7::7 UG 1024 2 0 eth2
2409:8080:5a0a:60c7::8/128 2409:8080:5a0a:60c7::7 UGH 1 1 0 eth2
2409:8080:5a0a:60c7::/120 :: U 102 1 0 eth2
Can route command be the same with ip command?
The text was updated successfully, but these errors were encountered: