FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.37k stars 1.25k forks source link

Ability to specify number of prefixes advertised with AddPath #2081

Closed n3wtype closed 1 year ago

n3wtype commented 6 years ago

There are two options to control number of prefixes advertised when using AddPath: addpath-tx-all-paths and addpath-tx-bestpath-per-AS. It would be really nice to have ability to specify exact number of tx prefixes per destination. I have bunch of full meshed route reflectors and consider I'm considering using AddPath to advertise additional prefixes to reflection clients. However, addpath-tx-all-paths seems like an overkill in my case.

donaldsharp commented 6 years ago

@dwalton76 do you have an opinion on this?

n3wtype commented 6 years ago

Any opinion on this? Juniper for example has such functionality:

admin@rtr# set family inet unicast add-path send path-count ?
Possible completions:
  <path-count>         Number of paths to advertise (2..6)
donaldsharp commented 6 years ago

I think this is a reasonable request for an enhancement. We would welcome patches for this.

kssoman commented 6 years ago

To select a specified number of best paths, we need to add command bgp additional-paths select best which is implemented in cisco https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3s/irg-xe-3s-book/bgp-additional-paths.html

The best path selection algorithm needs to run in a loop to find the best N paths from the available paths P (if N > P then it becomes all available paths)

The bgp_adj_out structure needs to contain a chain of entries (depending on the number of paths)

kssoman commented 6 years ago

I can look at this issue