Skip to content

Fine-tuning BGP Client Server Relationship

Before you read through this post, I assume you have got at least the basic understanding of BGP and how it works.

Here are some facts…

BGP is a path vector Routing Protocol works on TCP port 179.

Neighbor with the lowers IP address will establish the connection to the Remote Peer on TCP port 179 with a random source port.

In this case, the Remote Peer will become the Server and the Local Peer will become the client. This peering relationship will change when we clear the BGP process on either peer or the underlying BGP connection get severed for any reason.

In case you want to specifically want to set one Peer as the Server and one as the Client, the IOS does support it.

This is how it is done…

R1 and R2 have a eBGP peering where R1 is on AS 100 and R2 is on 200.

If you are wondering, I am redistributing the connected routes because I want to make sure the BGP is in-fact exchanging prefixed.

As you can see below, here are the BGP connection info…

As you can see above, R1 is the Client and R2 is the Server with the Local port 179

Below you can see that I have cleared the BGP session, and the peering arrangement is changed from R1 being the Client to Server…

In case, you want to hard-code one Peer as Client and another Peer as Server. This is possible under the Cisco IOS. I have never seen such configuration on Production Environment but this will come in handy when we have some kind of firewalling on one side of the peer or we want to specifically set which neighbor becomes the Server and which becomes the Client.

This is accomplished under the neighbor statement and I will be configuring R1 as Server and R2 as the Client.

The below command states…

Active being the Client
Passive being the Server.

Now I have Cleared the BGP session numerous times and as you can see below, the Client / Server relationship is not changed.

comments powered by Disqus