Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

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

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

10 REPLIES

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

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 ***
Hall of Fame Super Blue

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

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

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

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

VIP Super Bronze

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

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

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

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 ***

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

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 ***
Hall of Fame Super Blue

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

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

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

Ah, thank you for the clarification!

--John

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

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

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

Hall of Fame Super Blue

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

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

2512
Views
5
Helpful
10
Replies
CreatePlease to create content