Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iproute2 4.16.0 error on default IPv6 route (using netifrc)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 377
Location: UK

PostPosted: Wed Apr 04, 2018 12:46 pm    Post subject: iproute2 4.16.0 error on default IPv6 route (using netifrc) Reply with quote

Regular system upgrade updated to sys-apps/iproute2-4.16.0 this morning. On reboot of the server I got this error:
Code:
 * Bringing up interface eth0
 *   192.168.1.10/24 ...
 *   2001:8b0:fb5e::10/64 ...
 *   Adding routes
 *     default via 192.168.1.5 ...]
 *     default via 2001:8b0:fb5e::2 ...
Error: inet address is expected rather than "2001:8b0:fb5e::2".


In /etc/conf.d/net I have this for default routes - which was working fine prior to the upgrade:
Code:
routes_eth0="default via 192.168.1.5
default via 2001:8b0:fb5e::2"


After the boot I discovered that there was indeed no default route set for IPv6 gateway. So I added one using this command
Code:
route add default -6 gw 2001:08B0:FB5E::2
and that worked.

I have tried a few combinations of entries in /etc/conf.d/net, but cannot find the one that would now work.

I have now masked >sys-apps/iproute2-4.14.1-r2, and reverted to sys-apps/iproute2-4.14.1-r2 (the previous stable version) and my IPv6 config works correctly again.

If anyone else has seen this, and found the correct /etc/conf.d/net entry for IPv6 default route, i'd appreciate some pointers.
Should I log a bug against iproute2, or netirfc, or both?

Thanks
Ian
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 377
Location: UK

PostPosted: Fri Apr 06, 2018 1:29 pm    Post subject: Reply with quote

Since posting this I noticed two changes in portage: sys-apps/iproute2-4.16.0 has been keyword masked and a keyword masked new version of net-misc/netifrc (0.6.0) is available.
This seems to indicate that there is still some work to do before these become mainstream (in Gentoo at least).

However, I did some digging around and experimenting, and I have found a format for the IPv6 default route that works with both current and new versions of iproute2 and netifrc.

I changed my /etc/conf.d/net route entry from:
Code:
routes_eth0="default via 192.168.1.5
default via 2001:08B0:FB5E::2"
to
Code:
routes_eth0="default via 192.168.1.5
::/0 via 2001:08B0:FB5E::2"
and that works with both current and new versions.

The netifrc documentation sort of implies it - but is a bit lacking for IPv6 routes (my opinion).

Conclusion is that the fault was with my /etc/conf.d/net entry all along - and that versions up to now have given the appearance of them being OK :-)

Ian

PS: Silly me - the reason sys-apps/iproute2-4.16.0 updated on my server was because I have an .accept-keyword entry for it. Doh. Apologies for misleading anyone.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Apr 06, 2018 7:06 pm    Post subject: Reply with quote

You should use 2000::/3 instead of ::/0 for the default v6 route, or give it a sufficiently high metric, so that you don't accidentally broadcast link-local traffic to the outside world.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Apr 06, 2018 7:38 pm    Post subject: Reply with quote

Ant P. wrote:
You should use 2000::/3 instead of ::/0 for the default v6 route, or give it a sufficiently high metric, so that you don't accidentally broadcast link-local traffic to the outside world.

Please look at: https://serverfault.com/questions/866107/what-is-the-best-default-gateway-for-ipv6
Back to top
View user's profile Send private message
ipic
Guru
Guru


Joined: 29 Dec 2003
Posts: 377
Location: UK

PostPosted: Fri Apr 06, 2018 10:19 pm    Post subject: Reply with quote

2001:08B0:FB5E::2 is the LAN side address of my ISP supplied router, so I don't think I'm broadcasting anything to the outside world.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum