Setting IPv6 'home' address

Hi there, my router has various IPv6 addresses and I’d like to set a specific one for outbound connections.
Normally I would use the ‘home’ attribute when setting the IPv6 via ‘ip addr add’, but I can’t figure out a way to have it configured in the VyOS configuration.

Is there a way to actually set the ‘home’ attribute? or maybe another way to pick a specific address for outbound connections?


My only question is - are you making a lot of outbound IPv6 connections from your Vyos router?
Sure, from hosts that sit behind it etc, but from the router itself?

If there’s a use case for this, it seems like it would be worth adding as a feature request.

not many at all. But even just doing ping tests can be a problem, because the IPv6 the kernel picks is not necessarily routed to the outside world (I have peerings with public IPv6s configured, and these IPs are picked in most cases).

In general IPv6 connectivity is broken because the IP picked by the kernel does not work.

You can just specify source-address on the ping command line:

tim@ferrari:~$ ping 2600:: source-address 24XX:XXXX:2:7e::4e92
PING 2600::(2600::) from 24XX:XXXX:2:7e::4e92 : 56 data bytes
64 bytes from 2600::: icmp_seq=1 ttl=55 time=210 ms

A similar option exists for traceroute.

I don’t even think this is a v6 issues, v4 tends to suffer the same, I’ve had more than one fault reported to me that wasn’t a fault, it was just someone forgetting to set the source address on a ipv4 ping correctly.

I agree, this is not an IPv6 issue. It’s just a configuration detail. On a plain linux I’d just set an IPv6 as ‘home’ (which is what I did, but the setting is obviously not consistent within VyOS) and I know that specific address will always be used.

Even if I have to download packages or other things, don’t you think it is cumbersome to always specify the same source-address when I could simply flag it and be done with it? :slight_smile:

To be clear I wasn’t disagreeing with you - you have a good point - just sharing a few ways to work around the issue. I think you should suggestion this as a feature request.

1 Like

In general I saw that VyOS does not support setting any attribute on IP addresses (i.e. scope, lifetime, etc). ‘home’ is just one of those.
Yeah, if this is not doable with the current implementation, I will open a feature request.

created ⚓ T6567 Allow passing attribute 'home' to IP address

Does policy local-route6 work in this case?

haven’t tested as I don’t use those, but I don’t see why it shouldn’t.
The ‘home’ attribute is a just a “mark” that affects the default IP selection in case of outbound connections.