BGP - TCP Peering Session Process

When two BGP routers attempt to become BGP peers, one router becomes the active router while the other becomes the passive router. This is somewhat analogous to a client-server situation where the passive BGP router is the server and the active BGP router is the client. Other terminology that is often used is the BGP listener (server) and the BGP initiator (client). This is the case for both eBGP and iBGP.

In any case, the active peer is the one that actively searches for and establishes the connection to the passive peer. The router with the higher BGP router ID will be the active peer. A router will "know" if it has the higher or lower router ID because it knows its own router ID and it knows the router ID of its neighbor from the BGP neighbor command.

The peer initiates a TCP session with a destination TCP port of 179. The source port will be a random high-numbered port.

It is possible on Cisco routers to change this behavior, and to specify which of the two routers will act as active and passive, regardless of the router IDs. This can be done using the neighbor transport command. For example, the following command will cause the local router to be the passive router in its BGP peering with neighbor

neighbor transport connection-mode passive

More on this command in the links below.


Links to this page: