# iproute2 4.16.0 error on default IPv6 route (using netifrc)

## ipic

Regular system upgrade updated to sys-apps/iproute2-4.16.0 this morning. On reboot of the server I got this error:

```
 * 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:

```
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

```
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

----------

## ipic

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:

```
routes_eth0="default via 192.168.1.5

default via 2001:08B0:FB5E::2"
```

to

```
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  :Smile: 

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.

----------

## Ant P.

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.

----------

## mike155

 *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

----------

## ipic

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.

----------

