01-09-2016 06:54 AM - edited 03-08-2019 03:21 AM
Hi,
I have two MPLS circuit terminated on two routers. our primary link had some issue so to move the traffic on secondary link we shutdown the neighbor. to activated the neighbor I tried to give neighbor xxx.xxx.xxx.xxx command but I was getting error as "incomplete command". by mistake I ran no neighbor xxx.xxx.xxx.xxx and it removed all the config undder BGP. from backup I put the same m config but now I am seeing few extra command(in bold) as below .
old config
no synchronization
bgp log-neighbor-changes
redistribute connected
redistribute static
redistribute ospf 9 route-map OSPF-TO-BGP
neighbor xxx.xxx.xxx.xxx remote-as 12345
neighbor xxx.xxx.xxx.xxx soft-reconfiguration inbound
neighbor xxx.xxx.xxx.xxx prefix-list mplsin in
neighbor xxx.xxx.xxx.xxx prefix-list mplsout out
neighbor xxx.xxx.xxx.xxx route-map ABC_TO_MPLS out
no auto-summary
router bgp 65304
bgp log-neighbor-changes
neighbor 152.187.141.217 remote-as 12345
!
address-family ipv4
no synchronization
redistribute connected
redistribute static
redistribute ospf 9 route-map OSPF-TO-BGP
neighbor xxx.xxx.xxx.xxx activate
neighbor xxx.xxx.xxx.xxx soft-reconfiguration inbound
neighbor xxx.xxx.xxx.xxx prefix-list mplsin in
neighbor xxx.xxx.xxx.xxx prefix-list mplsout out
neighbor xxx.xxx.xxx.xxx route-map ABC_TO_MPLS out
no auto-summary
exit-address-family
!
Please help me to understand how those extra command came in and is there anyway to get the old config?
Thanks in advance
01-09-2016 08:01 AM
Hello,
If you did not save the new configuration, you can see the old command by show start-up config.
If you have saved, I can help you with the configuration if you give me more information.
Masoud
01-09-2016 09:31 AM
I have the old config but after applying that old confide I got those additional command. Now I want to know how those addition command came and how I can remove them.
01-09-2016 10:37 AM
Remove the BGP configurtion and then add it again.
No router BGP 65304
router bgp 65304
bgp log-neighbor-changes
neighbor 152.187.141.217 remote-as 12345
no synchronization
redistribute connected
redistribute static
redistribute ospf 9 route-map OSPF-TO-BGP
neighbor xxx.xxx.xxx.xxx soft-reconfiguration inbound
neighbor xxx.xxx.xxx.xxx prefix-list mplsin in
neighbor xxx.xxx.xxx.xxx prefix-list mplsout out
neighbor xxx.xxx.xxx.xxx route-map ABC_TO_MPLS out
no auto-summary
01-12-2016 12:51 AM
Hello,
"No problem with these commands, for further consideration read it".
The BGP, as you surely know, has a multi-protocol capability - in a single session, it is capable of carrying information about diverse routed protocols (IPv4 Unicast, IPv4 Multicast, IPv6 Unicast, IPv6 Multicast, VPNv4, CLNP), in BGP's parlance called "address families". With BGP being a true multiprotocol routing protocol, however, you need some means to tell BGP which address families should be exchanged with a particular neighbor. We are accustomed to the fact that if we define an IPv4 neighbor, we are planning to exchange IPv4 routes with that neighbor - but why should that actually be a rule? Why should we make hasty assumptions about the address family just because the address of the neighbor is from a particular family itself?
This is the point behind diverse address-family commands. Defining a neighbor under a particular address family means that we want to exchange routes from the particular address family with that neighbor. Not having a neighbor listed under a particular address family means that we are not planning to exchange information from that address family with that neighbor.
Now, the address-family ipv4 declares neighbors with whom we want to exchange normal IPv4 unicast routes. This may be surprising because to exchange IPv4 routes with a neighbor, it is sufficient to simply define that neighbor by its address. The fact is that for backward compatibility with older BGP versions that have not been multiprotocol-capable, the BGP implicitly assigns all defined neighbors to an invisible address-family ipv4section. In other words, as soon as you define a neighbor, it is automatically being added to an invisibleaddress-family ipv4 section so that you don't have to do it manually.
You can change it, however. First of all, if you enter the BGP configuration and issue the command bgp upgrade-cli you will find out that the BGP configuration has been fully converted to the address family style of configuration. Outside any address-family stanzas, only the basic neighbor settings are configured like their addresses, AS numbers, update sources. However, all remaining per-address-family commands will be automatically moved into address-family stanzas. The behavior or operations of BGP do not change with this new style of configuration, only the configuration format is changed.
Furthermore, if you enter the no bgp default ipv4-unicast command in the BGP configuration, you will prevent BGP from automatically assigning each newly defined neighbor into address-family ipv4 section. You will then be required to add every defined neighbor to each intended address family automatically - it won't be done automatically for you anymore.
So to wrap it up - the address-family ipv4 is in fact an omnipresent section in the BGP configuration but for backward compatibility purposes, it is not visible by default. However, the configuration can be converted to a strict per-address-family configuration, and in fact, I would recommend that for all new deployments.
Hope it will helpful for you,
Kazim Abbas
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide