So my initial thought was to make R2 the iBGP Peer to R1 in AS 100, however I may want to use R4 also running on 15.x code to get into the mix here as we progess, so on R3 it goes! And a quick tidbit of knowledge to start things off:
- You cannot make your local router a bgp neighbor via “neighbor …” in router configuration mode, errors “Cannot configure the local system as a neighbor”
This got me thinking about the lab I did yesterday, that when I added loopback11 with an IP of 11.11.11.11/32, the RID was still 1.1.1.1 before and after I removed the BGP neighbor config on R5 – The RID was initially Lo1 but I added Lo11 before reforming the Peering but it didn’t update the RID.
So I fired up the lab today and saw this:
R5#sh ip bgp nei
BGP neighbor is 172.12.15.1, remote AS 100, external link
BGP version 4, remote router ID 11.11.11.11
So an entire reboot finally got it to update the RID, but I want to know if it can be hot swapped somehow, so I performed the following on R1 to see if just removing the logical interface does the trick:
R1(config)#no router bgp 100
R1(config)#no
*Mar 30 22:28:03.787: %BGP-5-ADJCHANGE: neighbor 172.12.15.5 Down BGP protocol initialization
R1(config)#no int lo11
R1(config)#
*Mar 30 22:28:23.743: %LINK-5-CHANGED: Interface Loopback11, changed state to administratively down
*Mar 30 22:28:24.745: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback11, changed state to down
R1(config)#router bgp 100
R1(config-router)#neighbor 172.12.15.5 remote-as 500
R1(config-router)#
*Mar 30 22:34:49.011: %BGP-5-ADJCHANGE: neighbor 172.12.15.5 Up
R1(config-router)#
ASR#5
[Resuming connection 5 to r5 … ]
*Apr 9 03:47:06.463: %BGP-5-ADJCHANGE: neighbor 172.12.15.1 Down Peer closed the session
*Apr 9 03:47:06.463: %BGP_SESSION-5-ADJCHANGE: neighbor 172.12.15.1 IPv4 Unicast topology base removed from session Peer closed the session
R5#
*Apr 9 03:53:51.739: %BGP-5-ADJCHANGE: neighbor 172.12.15.1 Up
R5#sh ip bgp nei
BGP neighbor is 172.12.15.1, remote AS 100, external link
BGP version 4, remote router ID 1.1.1.1
So if you follow that, I removed bgp 100 from R1 entirely, remove Lo11, then reconfigured BGP on R1 and went over to find R5 has 1.1.1.1 as the RID now. So here is my attempts to change that RID (Lo11 is now added again to R1):
R1(config)#router bgp 100
R1(config-router)#router-id ? <——- NOTE IT IS NOT ROUTER-ID X.X.X.X IN BGP
% Unrecognized command
R1(config-router)#bgp router ?
A.B.C.D Manually configured router identifier
R1(config-router)#bgp router 11.11.11.11 ?
<cr>
R1(config-router)#bgp router 11.11.11.11
R1(config-router)#
*Mar 30 22:39:58.767: %BGP-5-ADJCHANGE: neighbor 172.12.15.5 Down Router ID changed
*Mar 30 22:39:58.791: %BGP-5-ADJCHANGE: neighbor 172.12.15.5 Up
R1(config-router)#
ASR#5
[Resuming connection 5 to r5 … ]
*Apr 9 03:59:01.551: %BGP-5-ADJCHANGE: neighbor 172.12.15.1 Down Peer closed the session
*Apr 9 03:59:01.551: %BGP_SESSION-5-ADJCHANGE: neighbor 172.12.15.1 IPv4 Unicast topology base removed from session Peer closed the session
*Apr 9 03:59:01.575: %BGP-5-ADJCHANGE: neighbor 172.12.15.1 Up
R5#sh ip bgp nei
BGP neighbor is 172.12.15.1, remote AS 100, external link
BGP version 4, remote router ID 11.11.11.11
Huh. I was about to go all abstract and thought to myself there must be a way of manually setting it, and with BGP you probably want to manually fine tune as much as possible, so I will leave it at that.
“bgp router (IPv4 address)” changes the RID manually on the local router, and the IP entered does not actually have to be an interface on the router:
R1(config-router)#bgp router 22.22.22.22
R1(config-router)#
*Mar 30 22:44:10.596: %BGP-5-ADJCHANGE: neighbor 172.12.15.5 Down Router ID changed
*Mar 30 22:44:10.620: %BGP-5-ADJCHANGE: neighbor 172.12.15.5 Up
R1(config-router)#do sh ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES NVRAM administratively down down
Serial0/0 172.12.123.1 YES NVRAM up up
FastEthernet0/1 172.12.15.1 YES NVRAM up up
Serial0/1 172.12.13.1 YES NVRAM down down
Loopback1 1.1.1.1 YES NVRAM up up
Loopback11 11.11.11.11 YES manual up up
R1(config-router)#
^ 22.22.22.22 is nowhere to be found on any interfaces!
ASR#5
[Resuming connection 5 to r5 … ]
*Apr 9 04:03:13.415: %BGP-5-ADJCHANGE: neighbor 172.12.15.1 Down Peer closed the session
*Apr 9 04:03:13.415: %BGP_SESSION-5-ADJCHANGE: neighbor 172.12.15.1 IPv4 Unicast topology base removed from session Peer closed the session
*Apr 9 04:03:13.439: %BGP-5-ADJCHANGE: neighbor 172.12.15.1 Up
R5#sh ip bgp nei
BGP neighbor is 172.12.15.1, remote AS 100, external link
BGP version 4, remote router ID 22.22.22.22
VERY IMPORTANT DETAIL HERE FOR EXAM DAY, THE RID USED DOES NOT HAVE TO BE A CONNECTED INTERFACE, LOGICAL OR PHYSICAL WHEN MANUALLY CONFIGURING THE RID FOR BGP!
iBGP Configuration Below, very simple
Now that we have the treasure trove of information, moving onto iBGP is actually exactly like configuring eBGP in terms of commands, literally:
R1(config)#router bgp 100
R1(config-router)#neighbor 172.12.123.3 remote-as 100
R1(config-router)#
ASR#3
[Resuming connection 3 to r3 … ]
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router bgp 100
R3(config-router)#neighbor 172.12.123.1 remote-as 100
R3(config-router)#
*Mar 2 05:45:35.557: %BGP-5-ADJCHANGE: neighbor 172.12.123.1 Up
R3(config-router)#
Just as easy as that, first check out R3’s output to make sure we are all good there:
R3(config-router)#do sh ip bgp nei
BGP neighbor is 172.12.123.1, remote AS 100, internal link
BGP version 4, remote router ID 22.22.22.22
BGP state = Established, up for 00:01:29
Last read 00:00:29, last write 00:00:29, hold time is 180, keepalive interval is 60 seconds
Now I will introduce a new “show” command for BGP to get a more brief description of peers so we don’t have a wall of text from “sh ip bgp nei” and it is demonstrated on R1 here:
R1#sh ip bgp summary
BGP router identifier 22.22.22.22, local AS number 100
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.12.15.5 4 500 35 33 1 0 0 00:12:52 0
172.12.123.3 4 100 12 12 1 0 0 00:08:18 0
R1#
“sh ip bgp summ”
This gives you a great quick view of the local AS, so you can determine 172.12.123.3 is an iBGP Peer while 172.12.15.5 is eBGP, the version being run between them, messages received and sent (Hellos), the time in there is actually for the Up/Down column indicating how long they have been Peers, etc.
I reformatted so the table looks correct on my screen, but if it looks funky the numbers correspond with the things above them like the Rcvd and Sent are 35 / 33, TblVer 1, etc.
So what happens if the physical interface took a hit and went offline, but we didn’t want our BGP Peering to be lost? I am glad you asked, because that’s what I’ll be discussing on the next Labbing session – I will see you there! 😀