Background: I have an ERP sitting on an IXP peering network. This network assigns IPv6 addresses out of a globally-addressable, but not globally-routed, /64, for participants to use to establish BGP peering. Linux's source address selection algorithm can cause problems in this environment, as it can choose my address on the IXP network as the source address for packets destined for the Internet. Because the IXP network is unrouted, the response packets never make it back to me. The workaround I've seen used is described on this page -- set the IXP network address as "deprecated" to exclude it from Linux default source address selection, then explicitly specify it as a source address for BGP purposes.
I'm attempting to do this with EdgeOS. I set the address as deprecated (using /sbin/ip directly -- see this thread for details on my attempts at doing this via EdgeOS config), and set the `update-source` of each BGP neighbor to that address explicitly. For example:
set protocols bgp 395823 neighbor 2001:504:16::2 update-source 2001:504:16::6:a2f
commit
So far, so good -- existing BGP sessions stay up, and BGP neighbors are still able to establish new sessions with me. Other applications no longer choose it as a source address, which is exactly what I want.
However, if I have a passive BGP neighbor that doesn't try to connect to me, and instead requires me to connect to them, the session never comes back up after a reset. EdgeOS' bgpd is apparently not respecting the update-source, and is choosing a different address as the source address for BGP traffic! When I "un-deprecate" the address, it chooses the IXP network address as a source address again, and the session comes back up just fine.
Does update-source only work for IPv4? I know EdgeOS isn't quite using Quagga anymore, but is using a proprietary fork instead, but these docs suggest that update-source in Quagga config only works for v4. EdgeOS' config tree will happily accept a v6 address, though, and the code in
/opt/vyatta/sbin/vyatta-bgp.pl appears to translate that directly into a Quagga config update-source.
If update-source only works for IPv4, how can I influence IPv6 BGP session source address selection?
$ show version
Version: v1.9.1
Build ID: 4939098
Build on: 12/14/16 07:33
Copyright: 2012-2016 Ubiquiti Networks, Inc.
HW model: EdgeRouter Pro 8-Port
HW S/N: [redacted]
Uptime: 21:21:31 up 49 days, 13:36, 3 users, load average: 0.07, 0.06, 0.05