cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18921
Views
5
Helpful
11
Replies

BGP router ID can be set to anything..??

mvsheik123
Rising star
Rising star

Hi All,

If I want to set a BGP router-id (even thoug it is optional) while forming a EBGP peering with ISP, can I use any IP (like pvt IP) or any recomended suggestions for that..? Iam kind of lost in this..;-)

Thank you

MS

11 Replies 11

John Blakley
Advisor
Advisor

You can change it, but the router-id is used to identify your router from the others in the remote-as. It helps with routing decisions, so I wouldn't put your private IP address on it for an ISP. You could put your public address as the router-id though.

Maybe someone could elaborate more, or correct me if I'm wrong, but this is my understanding.

--John

HTH, John *** Please rate all useful posts ***

Jon Marshall
VIP Community Legend VIP Community Legend
VIP Community Legend

MS

Yes you can set it to any IP address. It does not have to be routable on your network, it is merely used to identify the router.

You could use a numbering system where the IP addresses are not routed or you could use one of the loopback interfaces which is often done.

Jon

Thank you for your quick replies.

lets say I have 2 rts connected to 2 ISPs via EBGP.

rtr1:

!

inter ser 1/0

ip address 1.1.1.1 255.255.255.252

!

int fas0/0

ip address 5.5.5.2 255.255.255.0

stdby 1 ip 5.5.5.1

!

Rtr2:

rtr1:

!

inter ser 1/0

ip address 2.2.2.1 255.255.255.252

!

int fas0/0

ip address 5.5.5.3 255.255.255.0

stdby 1 ip 5.5.5.1

!

Currently rtr1 & rtr2 takes id by default : 1.1.1.1 & 2.2.2.1.

I understand from above post, loopback is often used, but Can I add router-id for bgp rtr1:5.5.5.10 & rtr2: 5.5.5.20 (free & available IPs in my public IP space?)

Will that be an issue..?

Thank you

MS

MS,

You can assign any address you want manually as your BGP ID. Example(bgp router-id 10.10.10.10), but common practice is using a loopback address and let it be your router ID for your IGP and BGP.

Reza

You should be able to change it. At the last company I was with, they used an address out of their public block as a loopback, and we didn't have any issues. Not sure if that's "normal", but no problems.

Others may want to jump in, but if you want to use a loopback, I think you want to add:

neighbor 1.1.1.1 remote-as

neighbor 1.1.1.1 update-source loopback0 (or whatever interface you're using for loopback)

--John

HTH, John *** Please rate all useful posts ***

Jon,

What happens if the BGP neighbor has 2 of the same router-ids in it's table for different networks? I thought the Router-ID had to be unique in the AS.

John

HTH, John *** Please rate all useful posts ***

John

Any BGP speaking routers that peer with each other must have different router-id's or else the BGP session will close. So they must be unique between peering neighbors.

Jon

Ah, thank you for the clarification!

--John

HTH, John *** Please rate all useful posts ***

Hi all,

Thank you very much for all your time and suggessions. Now, if Iam advertising my network 5.5.5.0/24 to EBGP neighbours, is it mandatory to add the statement

'ip route 5.5.5.0/24 null0' in the router config..? What scenario demands for this statement.

Thank you

MS

MS

BGP will only advertise a route to an EBGP peer if that route is found in the routing table - it must be an exact match ie. subnet and subnet mask. So if you do a "sh ip route 5.5.5.0 255.255.255.0" and there is no entry you can either

1) add the null route as in your post

2) omit the mask part of the BGP network statement

Jon

BGP will only advertise routes that it has in its routing table. 

You could learn 5.5.5.0/24 via a static route (either to null or to another IP)

via a direct route (note, it would have to be the exact matching network)

via an internal routing protocol such as OSPF or EIGRP

via another BGP neighbor (iBGP or eBGP)

 

But what you probably want to do is set up an aggregate-address

 

In this case 

aggregate-address 5.5.5.0 255.255.255.0 summary-only

 

As long as the router has a subnet of 5.5.5.0 in the routing table, it will advertise 5.5.5.0 to the cloud. 

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:

Recognize Your Peers