cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3832
Views
25
Helpful
8
Replies

BGP Router ID selection with IBGP and EBGP neighbours

mahesh18
Level 6
Level 6

Below is criteria for BGP Router ID selection.

  1. Use the address configured by the bgp router-id command

  2. Use the Loopback interface address with the highest IP address

  3. Use the highest IP address of the interface.

We have ASR with 4 BGP neis

 

When i run below command 

 

show ip bgp summary
BGP router identifier 72.29.230.181, local AS number
BGP table version is 29157805, main routing table version 29157805
747911 network entries using 107699184 bytes of memory
1491649 path entries using 119331920 bytes of memory
232283/116550 BGP path/bestpath attribute entries using 35307016 bytes of memory
203090 BGP AS-PATH entries using 8610928 bytes of memory
1036 BGP community entries using 47028 bytes of memory
94 BGP extended community entries using 2532 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
61 BGP filter-list cache entries using 976 bytes of memory
BGP using 270999584 total bytes of memory
691 received paths for inbound soft reconfiguration
BGP activity 2007015/1259071 prefixes, 5564935/4073287 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
72.29.230.182 4 25983 7756778 75490 29157642 0 0 3w3d 745751
192.41.x.x 4 16569 4160851 6729963 29157821 0 0 3w3d 723580
199.116.233.104 4 15296 278551 75471 29157642 0 0 3w3d 17578
199.116.234.90 4 15296 102266 75476 29157642 0 0 3w3d 4046

 


1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 72.29.230.181 YES NVRAM up up
GigabitEthernet0/0/1 192.41.x.x YES NVRAM up up
GigabitEthernet0/0/2 unassigned YES NVRAM up up
Gi0/0/2.10 199.116.234.91 YES NVRAM up up
Gi0/0/2.20 199.116.233.105 YES NVRAM up up
GigabitEthernet0/0/3 198.160.191.2 YES NVRAM up up

 

how BGP is selecting the 72.x.x.x as router identifier?

3 Accepted Solutions

Accepted Solutions

GRANT3779
Spotlight
Spotlight
This is set on the startup of BGP so it may be that at that time this address was the choice during the selection process.
You may have to clear bgp process to force a change. I know this is the case for other routing protocols.
I'd always recommend setting the router id statically.

View solution in original post

Hello Mahesh,

rebooting the router will give a chance to BGP to pick up a different BGP router-id, but this is the method with the greatest impact.

Setting manually the BGP router-id and eventually issuing a clear ip bgp * for hard reset of all sessions would do the job but the impact is still present as resetting an eBGP session that receives 740,000 routes will require some minutes to load all the prefixes after the session is again established.

So you need to do it in a maintenance time window.

I would not go with the reload option for its higher impact.

Setting manually the BGP router-id is recommended to provide consistent behaviour over time also in the future.

You can change the upstream providers in the future and in that case you will use different public IP addresses to peer with the new ISPs.

So I would suggest to manually set the BGP router-id and to use a public address that is owned by your company.

You can also configure a loopback address with netmask 255.255.255.255 and ip address = new BGP router-id.

 

Hope to help

Giuseppe

 

View solution in original post

Hello Mahesh,

>> One reason can be this Router becomes neighbour with EBGP Router of the vendor before any others right?

No, when the router bgp process starts it examines the list of interfaces that are up/up.

If after a reload the router still picks an interface with not the highest IP address, it should mean that interface came up first, and when the router bgp process started again it choices it again,

This fact is another reason to use a loopback, because the loopback will be up/up as long as the node is alive.

A physical interface is up only if its line protocol is up.

 

Hope to help

Giuseppe

 

View solution in original post

8 Replies 8

GRANT3779
Spotlight
Spotlight
This is set on the startup of BGP so it may be that at that time this address was the choice during the selection process.
You may have to clear bgp process to force a change. I know this is the case for other routing protocols.
I'd always recommend setting the router id statically.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mahesh,

as explained by Grant when BGP process started the highest IP address on a physical interface was 72.x.x.x

 

In order to have a consistent behaviour it is better to set the BGP router-id manually inside the router bgp process.

 

Note: CAUTION if you change the BGP router-id all the BGP sessions may flap so you should do it only in a maintenance time window.

Also clearing the BGP process has a big impact even higher that changing the BGP router-id.

 

Hope to help

Giuseppe

 

 

So it means rebooting the Router also does not help right?

Only way is to clear BGP

I would have thought a reload will clear the BGP process also and force a new router id. You may want to plan that one carefully if you are going down that route... (no pun intended) 

Hello Mahesh,

rebooting the router will give a chance to BGP to pick up a different BGP router-id, but this is the method with the greatest impact.

Setting manually the BGP router-id and eventually issuing a clear ip bgp * for hard reset of all sessions would do the job but the impact is still present as resetting an eBGP session that receives 740,000 routes will require some minutes to load all the prefixes after the session is again established.

So you need to do it in a maintenance time window.

I would not go with the reload option for its higher impact.

Setting manually the BGP router-id is recommended to provide consistent behaviour over time also in the future.

You can change the upstream providers in the future and in that case you will use different public IP addresses to peer with the new ISPs.

So I would suggest to manually set the BGP router-id and to use a public address that is owned by your company.

You can also configure a loopback address with netmask 255.255.255.255 and ip address = new BGP router-id.

 

Hope to help

Giuseppe

 

I agree with you we will config the Router ID in BGP configuration.

Then Clear ip BGP

Seems in Past this Router got rebooted but still maintains this router ID.

Normally when Router Reboots after a Reboot it should pick up the Router ID with highest Interface IP address.

One reason can be this Router becomes neighbour with EBGP Router of the vendor before any others right?

 

 

Hello Mahesh,

>> One reason can be this Router becomes neighbour with EBGP Router of the vendor before any others right?

No, when the router bgp process starts it examines the list of interfaces that are up/up.

If after a reload the router still picks an interface with not the highest IP address, it should mean that interface came up first, and when the router bgp process started again it choices it again,

This fact is another reason to use a loopback, because the loopback will be up/up as long as the node is alive.

A physical interface is up only if its line protocol is up.

 

Hope to help

Giuseppe

 

You are the Best.

Many thanks Learned a lot from you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: