Bug #11271
closedSetting default-originate in FRR/BGP Silently Appends a route-map
0%
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.
Updated by Viktor Gurov almost 4 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
Updated by Chris Linstruth almost 4 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
Updated by George Phillips almost 4 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.
Updated by Ben Hughes almost 4 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.
Updated by Ben Hughes almost 4 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.
Updated by Chris Linstruth almost 4 years ago
I suggest a checkbox to enable default-originate and a pulldown that lists the route maps for OPTIONAL inclusion.
Updated by Ben Hughes almost 4 years ago
Updated by Ben Hughes almost 4 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.
Updated by Jim Pingle almost 4 years ago
- Status changed from New to Pull Request Review
Updated by Chris Linstruth almost 4 years ago
Shouldn't there be a separate route map selection for each address family?
Updated by Ben Hughes almost 4 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.
Updated by Chris Linstruth almost 4 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.
Updated by Renato Botelho almost 4 years ago
- Status changed from Pull Request Review to Feedback
PR has been merged. Thanks!
Updated by Chris Linstruth almost 4 years ago
This works as expected for one route map spanning both families. Much better. Thank you.
Updated by Renato Botelho almost 4 years ago
- Status changed from Feedback to Resolved