Hi there,
"1. Will the BGP sessions flap when I will remove the private AS number from the Global AS? [routing-options autonomous-system] "
- It shouldn't as the BGP session is established using the "local-as" not the Global AS,
quickly tested in lab and the session didn't drop - that being said lab and live enviroment are two different things 🙂
root@R1# run show bgp summary |match 192.168.0.50
Nov 05 03:19:08
192.168.0.50 64600 471 635 0 0 5:21 615/615/615/0 0/0/0/0
root@R1# run show bgp neighbor 192.168.0.50 |match "local as:"
Holdtime: 90 Preference: 170 Local AS: 120 Local System AS: 100
root@R1# show |compare
Nov 05 03:19:38
[edit routing-options]
- autonomous-system 100 loops 3;
root@R1#
root@R1# commit
Nov 05 03:19:40
root@R1# run show bgp summary |match 192.168.0.50
Nov 05 03:19:56
192.168.0.50 64600 473 767 0 0 6:09 615/615/615/0 0/0/0/0
"2. Can I remove loops 2 from the BGP sessions after the change?"
- Depends on your requirements, do you want to receive routes with your own ASN in the path? There can be situations when this behavior is desired but it's likely the neighboring device won't even advertise you prefixes with your own ASN in the path (depends on vendor but Junos router wouldn't unless "advertise-peer-as" is configured).
"3. Is there any issue if I leave the local-as (Public AS number) specifically configured for all the BGP sessions??"
- It would probably be easier to have Global AS configured as if you add any new peer in the future you will have to configure it with this knob - unless you configure it on top of the BGP hiearchy / under specific BGP group or with a configuration group which would add it to all of your future configured peers i.e.
set groups <group name> protocols bgp group <*> neighbor <*> local-as <ASN>
set protocols bgp apply-groups <group-name>
But to answer your question - no I think there shouldn't be any issues unless you would configure different Global AS under routing-options which could introduce some issues for example the Global AS would be prepended to your advertised routes as without "local-as alias" or "local-as no-prepend-global-as" the Global AS is still prepended to the AS path attribute along with the Local-as number.
Have a read of this topic if you want to know more about local-as https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/local-as-edit-protocols-bgp.html
Cheers,
Radek