Page MenuHomeVyOS Platform

Make VyOS generate "ip[v6] protocol bgp route-map foo"
Closed, ResolvedPublicFEATURE REQUEST

Description

In T132 adding the "set src" command to a route-map was added. however so far it's not possible to set it for the bgp protocol (neither for ipv4 nor ipv6).

foo@bar# set protocols static
Possible completions:
(...)
   route-map    Filter routes installed in local route map
foo@bar# set protocols bgp
Possible completions:
 > <1-4294967294>
                AS number
 > 64500
foo@bar# set protocols bgp 64500
Possible completions:
 > address-family
                BGP address-family parameters
 > maximum-paths
                BGP multipaths
+> neighbor     BGP neighbor
 > parameters   BGP parameters
+> peer-group   BGP peer-group
 > timers       BGP protocol timers

It's possible to set it directly via vtysh:

bar# conf t
bar(config)# ip protocol
any         bgp         eigrp       kernel      openfabric  rip         static      vnc
babel       connected   isis        nhrp        ospf        sharp       table
bar(config)# ip protocol bgp route-map RM4-SET-SRC

The possibility to set this FRR config from vyos should be added.

Details

Version
-

Event Timeline

I'm no vyos expert but something along these lines should do it:
https://github.com/vyos/vyatta-cfg-quagga/pull/30

Fix is untested, just some late night hacking :)

Oh I just noticed: "set src" in a route-mao only works for ipv4 addresses in vyos, according to a friend FRR does support ipv6 though...

syncer triaged this task as Low priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.

This feature request can be closed.
T1981 - Allow 'set src' to reference either IPv4 or IPv6
T1983 - Expose route-map when BGP routes are programmed in to FIB

We use this to set src for IPv4 and IPv6 routes programmed in to the kernel from BGP. Ensure those addresses are bound to an interface that is always up, usually loopback 'lo'.

admin@testing:~$ show configuration commands | grep -e bgp-in -e all -e "ck lo"
set interfaces loopback lo address '192.0.2.54/32'
set interfaces loopback lo address '2001:db8::192:0:2:54/128'
set policy prefix-list all rule 10 action 'permit'
set policy prefix-list all rule 10 le '32'
set policy prefix-list all rule 10 prefix '0.0.0.0/0'
set policy prefix-list6 all rule 10 action 'permit'
set policy prefix-list6 all rule 10 le '128'
set policy prefix-list6 all rule 10 prefix '::/0'
set policy route-map bgp-in rule 10 action 'permit'
set policy route-map bgp-in rule 10 description 'BGP - Set preferred IPv4 source:'
set policy route-map bgp-in rule 10 match ip address prefix-list 'all'
set policy route-map bgp-in rule 10 set src '192.0.2.54'
set policy route-map bgp-in rule 20 action 'permit'
set policy route-map bgp-in rule 20 description 'BGP - Set preferred IPv6 source:'
set policy route-map bgp-in rule 20 match ipv6 address prefix-list 'all'
set policy route-map bgp-in rule 20 set src '2001:db8::192:0:2:54'
set protocols bgp 64500 route-map 'bgp-in'
dmbaturin added a subscriber: rherold.
syncer claimed this task.