I was just curious what exactly the bgp neighbor <neighborIP> shutdown command actually does in the background. Is it telling the neighbor not to attempt bgp connections? Or is it just setting itself up to block incoming tcp connections from that neighbor?
So let’s find out.
As you can see, we have R1, R2 and R3 running BGP (iBGP & eBGP):
To find out what actually happens, I will issue the BGP command neighbor 10.1.12.2 shutdown on router R2. Next will check what is the impact of the command, from router’s R2 andR3 perspective, using the telnet command.
As a result, the TCP connection is teared down – see console messages below, from R1 and R2 routers:
Also, the command affected the TCP connection between routers R1 and R2, leaving the other BGP connections unaffected – output below from routers R1, R2 and R3 respectively. Notice also how R1 is in fact Administratively Idle, while R2 is Actively trying to establish a BGP connection.
So now, let’s see what exactly is happening:
We can see above how R1 can still initiate connections to port 179; therefore, R2 is accepting such requests. However, when we try to initiate the connection from R2, the connection is rejected by router R1.
So let’s take some conclusions now: