Project

General

Profile

Bug #11271

Setting default-originate in FRR/BGP Silently Appends a route-map

Added by Chris Linstruth 4 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
FRR
Target version:
-
Start date:
01/20/2021
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.4.5-p1
Affected Architecture:

Description

When setting default-priginate on a BGP neighbor thew user is presented with four choices by default:

  • No
  • IPv4
  • IPv6
  • IPv4+6

Appended to that list are any route maps the administrator has created. These selections add the following lines to the neighbor configuration:

No: No default-originate line added
IPv4: neighbor 172.25.228.5 default-originate route-map ipv4
IPv6: neighbor 172.25.228.5 default-originate route-map ipv6
IPv4+IPv6: neighbor 172.25.228.5 default-originate

The IPv4 and IPv6 selections will filter the route unless the administrator manually creates the ipv4 or ipv6 route maps. This is added silently, however, and there is no clue the default-originate is being filtered by a route map.

Selecting IPv4+IPv6 announces the route but it is counter-intuitive for someone creating an IPv4-only peer to select IPv4+IPv6, and vice-versa.

Maybe it would be better to just have a checkbox to add default-originate with the option to add a route map from a list of configured route maps or not?

Thank you.

History

#1 Updated by Viktor Gurov 4 months ago

Selecting IPv4+IPv6 announces the route but it is counter-intuitive for someone creating an IPv4-only peer to select IPv4+IPv6, and vice-versa.

no such issue on 2.5 branch (frr 0.6.8_8),
fixed in #10789 (https://github.com/pfsense/FreeBSD-ports/pull/942):

 address-family ipv4 unicast
  neighbor 172.16.16.2 activate
  neighbor 172.16.16.2 default-originate  
  ...
 exit-address-family
 !
 address-family ipv6 unicast
  neighbor 172.16.16.2 activate
  neighbor 172.16.16.2 default-originate
  ...

see also #11039

#2 Updated by Chris Linstruth 4 months ago

Looks like 2.5.0 still appends a route-map to me.

 address-family ipv4 unicast
  neighbor 192.168.1.1 activate
  neighbor 192.168.1.1 default-originate  route-map ipv4  
  no neighbor 192.168.1.1 send-community
 exit-address-family

#3 Updated by George Phillips 4 months ago

Basically, that drop-down menu should be empty unless the user defines their own route-maps. The ipv4, ipv6, and ipv4+ipv6 route maps do not exist and should not be options in the drop-down.

#4 Updated by Ben Hughes 4 months ago

Yeh it's a bug, if you select IPv4+IPv6 then it'll work as expected but everything else it'll interpret at a route map.

I'll put a PR in to fix it shortly.

#5 Updated by Ben Hughes 4 months ago

George Phillips wrote:

Basically, that drop-down menu should be empty unless the user defines their own route-maps. The ipv4, ipv6, and ipv4+ipv6 route maps do not exist and should not be options in the drop-down.

It's not that simple, they do need to exist for people that want to select default-originate without a route-map and possibly per address family. That's why they're there, but the selection logic isn't the best.

#6 Updated by Chris Linstruth 4 months ago

I suggest a checkbox to enable default-originate and a pulldown that lists the route maps for OPTIONAL inclusion.

#8 Updated by Ben Hughes 4 months ago

Chris Linstruth wrote:

I suggest a checkbox to enable default-originate and a pulldown that lists the route maps for OPTIONAL inclusion.

I've split the route-map to a separate selection, the default-originate selection now just controls which address family it is set in.

#9 Updated by Jim Pingle 3 months ago

  • Status changed from New to Pull Request Review

#10 Updated by Chris Linstruth 3 months ago

Shouldn't there be a separate route map selection for each address family?

#11 Updated by Ben Hughes 3 months ago

Chris Linstruth wrote:

Shouldn't there be a separate route map selection for each address family?

You can match both families in a single route map as long as the match statements are in separate sequences.

#12 Updated by Chris Linstruth 3 months ago

I know you can but why limit the configuration in such a fashion?

Checkbox for enabling default-originate IPv4 with an optional route map
Checkbox for enabling default-originate IPv6 with an optional route map

If the administrator wants them to be the same route map like it is now they can set the same route map in each family.

#13 Updated by Renato Botelho 3 months ago

  • Status changed from Pull Request Review to Feedback

PR has been merged. Thanks!

#14 Updated by Chris Linstruth 3 months ago

This works as expected for one route map spanning both families. Much better. Thank you.

#15 Updated by Renato Botelho 3 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF