Page MenuHomePhabricator

Bgp set local-AS number one time


Every time when set configuration bgp, you need set AS-NUMBER

set protocols bgp xxx
set protocols bgp xxx neighbor
set protocols bgp xxx addresss-family

It would be nice to add function like ' local-AS', which is set first time (one time) and value of this function is as-number for default.
It will be convenient for configurations.

set local-as xxx
set protocols bgp  
set protocols bgp neighbor
set protocols bgp address-family
set protocols bgp neighbor local-as 11111

If local-as used for neighbor, this have more priority and rewrite default value.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

Viacheslav updated the task description. (Show Details)Oct 4 2019, 8:51 AM
pasik added a subscriber: pasik.Oct 6 2019, 9:11 PM
syncer assigned this task to dmbaturin.Oct 7 2019, 4:48 AM
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
runar added a subscriber: runar.Oct 18 2019, 9:15 PM

As the AS number is a bgp specific attribute i don't think it's wise to move it out of the bgp hierarchy .

i would propose this syntaxes:

set protocols bgp local-as xxx
set protocols bgp neighbor
set protocols bgp address-family.......

also if this PR is accepted, it makes most sense to change this at the same time the bgp code is converted to the python framework to not have to change all the old bits and pieces lying around

c-po added a subscriber: c-po.Oct 19 2019, 6:27 AM

What about upcoming VRF when we possibly have multiple bgp processes?

runar added a comment.Oct 19 2019, 7:14 AM

As for my understanding frr only supports a single bgp instance running at a time. But i've not verified thid completly.

c-po added a comment.Oct 19 2019, 8:17 AM

@runar at the current time this is true only one BGP instance is supported. But when we incorporate VRF one day which is definately on the roadmap this could change.

We are a little confused.
As far as I know, Bgp instance on all router's platforms always one.
And it use socket with 179 tcp port.
VRF is working on same bgp instance, but support multiple autonomous system at once.

It is true what @Viacheslav say, there is only possible to run one instance of bgp om a given router.. when using vrf's the bgp running inside the vrf is a subset of the main instance. to confirm, start vtysh and try to create multiple processes.. it will likly fail :)

c-po added a comment.Oct 19 2019, 10:53 AM

Okay, thanks for the info.

Still IMHO we have much bigger topics then this beautification :) I would keep it as it is b/c this is like most software behaves that I use (IOS, IOS-XR, VyOS, FRR)