Page MenuHomePhabricator

BGP - Default route injection is not processed by the specific route-map
Open, Requires assessmentPublic

Description

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.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

patrickbrandao created this object in space S1 VyOS Public.
rgrant added a subscriber: rgrant.Feb 6 2019, 7:04 PM

I encountered this same problem: I saw the output:

The route-map '(null)' does not exist.

when trying to add a route-map to the default-originate.

rgrant added a comment.Feb 6 2019, 7:08 PM

This is not a Vyos issue - adding the same thing in vtysh does the same thing.

I downgraded to 20190125 (with FRR 6.1) and have the same problem.

rgrant added a comment.Feb 6 2019, 7:29 PM

Even in a shut down peer, even with no route-map set, I still get that message.

rgrant@biscuit# set protocols bgp 666 neighbor A.B.C.D address-family ipv4-unicast default-originate
rgrant@biscuit# commit
[ protocols bgp 666 ]
The route-map '(null)' does not exist.

I've also noticed these errors,
but inside the FRR (sudo vtysh -c "show run")
the commands are inserted normally in your case.

Already the problem I reported seems to be a problem in the FRR.

I'm also running into this issue:

[ protocols bgp 9999 ]
The route-map '(null)' does not exist.