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 shutdown on router R2. Next will check what is the impact of the command, from router’s R2 andR3 perspective, using the telnet command.

NOTE: Remember that BGP is a Layer4 protocol and it initiates connections on port 179

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:

The BGP neighbor <neighbIP> shutdown will stop the router actively attempting BGP connections, towards the specific neighbor only; it will also block/reject incoming BGP connections requests from the specified neighbor only.


Thank you,
View Rafael A Couto Cabral's profile on LinkedIn

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>