Hello team,
I encountered a problem in the FRR in the default route injection feature in BGP, I discovered the problem when trying to increase the default route local preference in an iBGP, I created an example using eBGP to demonstrate the problem, follow the example:
R2 - VyOS EPA2
set interfaces ethernet eth1 address '192.168.246.132/24' set interfaces ethernet eth1 address '2001:db8:c0fe:c0fe::132/64' set protocols bgp 64712 parameters default no-ipv4-unicast set protocols bgp 64712 neighbor 192.168.246.133 address-family ipv4-unicast nexthop-self set protocols bgp 64712 neighbor 192.168.246.133 address-family ipv4-unicast soft-reconfiguration inbound set protocols bgp 64712 neighbor 192.168.246.133 remote-as '64713' set protocols bgp 64712 neighbor 2001:db8:c0fe:c0fe::133 address-family ipv6-unicast nexthop-self set protocols bgp 64712 neighbor 2001:db8:c0fe:c0fe::133 address-family ipv6-unicast soft-reconfiguration inbound set protocols bgp 64712 neighbor 2001:db8:c0fe:c0fe::133 remote-as '64713'
R3 - VyOS EPA3 - default gateway injection with specific route-map
set interfaces ethernet eth1 address '192.168.246.133/24' set interfaces ethernet eth1 address '2001:db8:c0fe:c0fe::133/64' set policy route-map set-gateway-attr rule 1 action 'permit' set policy route-map set-gateway-attr rule 1 set community '64713:190' set policy route-map set-gateway-attr rule 1 set metric '100' set policy route-map set-gateway-attr rule 1 set weight '100' set protocols bgp 64713 parameters default no-ipv4-unicast set protocols bgp 64713 neighbor 192.168.246.132 remote-as 64712 set protocols bgp 64713 neighbor 192.168.246.132 address-family ipv4-unicast nexthop-self set protocols bgp 64713 neighbor 192.168.246.132 address-family ipv4-unicast soft-reconfiguration inbound set protocols bgp 64713 neighbor 192.168.246.132 address-family ipv4-unicast default-originate route-map set-gateway-attr set protocols bgp 64713 neighbor 2001:db8:c0fe:c0fe::132 remote-as 64712 set protocols bgp 64713 neighbor 2001:db8:c0fe:c0fe::132 address-family ipv6-unicast nexthop-self set protocols bgp 64713 neighbor 2001:db8:c0fe:c0fe::132 address-family ipv6-unicast soft-reconfiguration inbound set protocols bgp 64713 neighbor 2001:db8:c0fe:c0fe::132 address-family ipv6-unicast default-originate route-map set-gateway-attr
R3 - Capturing BGP traffic - IPv4:
sudo tcpdump -nevas0 -i eth1 'host 192.168.246.132 and host 192.168.246.133 and tcp port 179'
OUTPUT:
192.168.246.133.179 > 192.168.246.132.40962: Update Message (2), length: 45 Origin (1), length: 1, Flags [T]: IGP AS Path (2), length: 6, Flags [TE]: 64713 Next Hop (3), length: 4, Flags [T]: 192.168.246.133 Updated routes: 0.0.0.0/0
R3 - Capturing BGP traffic - IPv6:
sudo tcpdump -nevas0 -i eth1 'host 2001:db8:c0fe:c0fe::132 and host 2001:db8:c0fe:c0fe::133 and tcp port 179'
OUTPUT:
2001:db8:c0fe:c0fe::133.59200 > 2001:db8:c0fe:c0fe::132.179 Update Message (2), length: 79 Multi-Protocol Reach NLRI (14), length: 38, Flags [OE]: AFI: IPv6 (2), SAFI: Unicast (1) nexthop: 2001:db8:c0fe:c0fe::133, fe80::250:56ff:fe2c:5c1, nh-length: 32, no SNPA ::/0 Origin (1), length: 1, Flags [T]: IGP AS Path (2), length: 6, Flags [TE]: 64713
The attributes defined in the route-map set-gateway-attr are not entered in the UPDATE.
Thank you. Hope this helps.