BGP Dynamic Peering

 As we know, configuring the BGP neighbor is not too difficult, but when we are going to configure 100 Number of neighbors, then it cloud be tedious.

So to minimize this configuration we have BGP peer Group, in which we can group the BGP Neighbors who are sharing the same outbound polices, either the BGP Neighborship is iBGP or eBGP. But the first we need to manually configure 100 Peer and then add to the peer group. So the problem is still not resolved.

Let’s verify BGP peer Group configuration

1 Example: Configuration step of iBGP Peer Group.



2 Example: Configuration step of eBGP peer Group.



With the Dynamic BGP peering feature, BGP router dynamically establish peering with group of remote neighbor that are configured using a range of IP addresses and BGP peer group.

In the Dynamic BGP peering, BGP peer tries to establish a BGP neighborship, if the neighbor router initiate TCP session because Dynamic BGP peer configuration router work as passive listen mode and it initiates a TCP session if the IP and AS number match with any of the configured IP subnets.

 

So in this scenario, we will discuss on how to configure Dynamic BGP peer.



As per diagram R1 wants dynamic peering with R2 and R3, so let verify the configuration steps;

Step 1. Define BGP peer group name

R1(config-router)# neighbor  Dynamic-peer peer-group

 

Step 2. Create a global limit of BGP dynamic subnet range neighbors. The value ranges from 1 to 5000. R1(config-router)# bgp listen limit 100

 

Step 3. Define the IP Subnet Range and associate it with a peer group. Multiple subnets can be added to the same peer group.

 R1(config-router)# bgp listen range 172.16.0.0/16 peer-group Dynamic-peer

Step 4. Define the remote-as for the peer group. Optionally, define the list of AS numbers that can be accepted to form neighborship with. The max limit of alternate-as numbers is 5.

R1(config-router)# neighbor Dynamic-peer  remote-as   65002 alternate-as 65003 65004

 

Step 5. Activate the peer group under ipv4 address-family

R1(config-router)#address-family ipv4

R1(config-router-af)# neighbor Dynamic-peer  activate.

 

Router1#show run | section router bgp

router bgp 65001

 bgp log-neighbor-changes

 bgp listen range 172.16.0.0/16 peer-group Dynamic-peer

 neighbor Dynamic-peer peer-group

 neighbor Dynamic-peer remote-as 65002 alternate-as 65003 65004

 !

 address-family ipv4

  neighbor Dynamic-peer activate

 exit-address-family

 

Router2#show run | section bgp

router bgp 65002

 bgp log-neighbor-changes

 neighbor 172.16.1.1 remote-as 65001

 

Router3#show run | section router bgp

router bgp 65003

bgp log-neighbor-changes

neighbor 172.16.2.1 remote-as 65001

 

 

Router1#show ip bgp summary

BGP router identifier 10.10.10.1, local AS number 65001

BGP table version is 1, main routing table version 1

 

Neighbor        V           AS    MsgRcvd    MsgSent   TblVer     InQ OutQ    Up/Down    State/PfxRcd

*172.16.1.2     4        65002       4                 4             1              0    0         00:00:38        0

*172.16.2.2     4        65003       4                 2             1              0    0         00:00:29        0

* Dynamically created based on a listen range command

 Dynamically created neighbors: 2, Subnet ranges: 1

 

BGP peergroup Dynamic-peer listen range group members:

  172.16.0.0/16

 

Total dynamically created neighbors: 2/(100 max), Subnet ranges: 1

 

Router1#show tcp brief all

TCB                    Local Address                 Foreign Address                   (state)

A2B61B90         172.16.1.1.179              172.16.1.2.64321                    ESTAB

A2B62F48         172.16.2.1.179               172.16.2.2.17764                   ESTAB

A2B19B20          0.0.0.0.179                            *.*                                   LISTEN

 

As per output illustrates that the router is listening on port 179 but with foreign address of *.*.

Comments

Popular posts from this blog

BGP Neighbor States

MBGP vs BGP