Project

General

Profile

Actions

Bug #11271

closed

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

Added by Chris Linstruth about 3 years ago. Updated about 3 years ago.

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

0%

Estimated time:
Plus Target Version:
Affected Version:
2.4.5-p1
Affected Plus Version:
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.

Actions #1

Updated by Viktor Gurov about 3 years 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

Actions #2

Updated by Chris Linstruth about 3 years 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

Actions #3

Updated by George Phillips about 3 years 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.

Actions #4

Updated by Ben Hughes about 3 years 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.

Actions #5

Updated by Ben Hughes about 3 years 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.

Actions #6

Updated by Chris Linstruth about 3 years ago

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

Actions #8

Updated by Ben Hughes about 3 years 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.

Actions #9

Updated by Jim Pingle about 3 years ago

  • Status changed from New to Pull Request Review
Actions #10

Updated by Chris Linstruth about 3 years ago

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

Actions #11

Updated by Ben Hughes about 3 years 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.

Actions #12

Updated by Chris Linstruth about 3 years 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.

Actions #13

Updated by Renato Botelho about 3 years ago

  • Status changed from Pull Request Review to Feedback

PR has been merged. Thanks!

Actions #14

Updated by Chris Linstruth about 3 years ago

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

Actions #15

Updated by Renato Botelho about 3 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF