Pages

Monday, January 10, 2011

Configure BGP confederation & RR

BGP confederation and Router Reflector

BGP requires full mesh neighbor relationship in order to advertise routes to its peers since BGP does not advertise IBGP to its neighbor. In a large environment which contains a lot of BGP routers in the AS, configuring BGP neighbor is a lot of work to do. For example, if in the AS, there are 10 BGP routers, we need to form (10 x 9)/2 = 45 BGP neighbor relationships. That is a painful in the implementation. Here below are functions to help establish the full mesh in the AS.

BGP confederation
The concept of BGP confederation is to have sub-AS inside an original AS. In the sub-AS we form a full mesh networks. Then, join each sub-AS together. In this case, we will have small sub full mesh network and form a entire AS mesh. Configuring BGP confederation requires only few command. Instead of using a real AS number in the router bgp command, we use sub AS number. However, the real AS is configured by bgp confederation-identifier  under router bgp command. 

Connecting different BGP confederation is a same way as eBGP.  
(See example for the configuration )


Route-Reflector
RR achieve the same result as confederation that is iBGP mesh. There are 2 modes in RR: server and client. All clients will establish the neighbor relationship with the server. Server will reflect routes received from one client to others without having client formed neighbor with each other. 

The command we use for RR is neighbor x.x.x.x route-reflector client.

Configuration Example

-  Configure R1 as AS 100
-  Configure R2 - R5  as AS 200
-  Configure BGP confederation  65001 and 65002 according to the diagram below
-  Configure RR inside AS 65002 
-  Verify full mesh inside each confederation and AS 200



Configuration 

R1
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.10.10.2 remote-as 200
 no auto-summary
!


R2

router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 200
 bgp confederation peers 65002
 neighbor 3.3.3.3 remote-as 65002
 neighbor 3.3.3.3 ebgp-multihop 2
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 10.10.10.1 remote-as 100
 no auto-summary

R3

router bgp 65002
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 200
 bgp confederation peers 65001
 neighbor 2.2.2.2 remote-as 65001
 neighbor 2.2.2.2 ebgp-multihop 2
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 4.4.4.4 remote-as 65002
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 route-reflector-client
 neighbor 5.5.5.5 remote-as 65002
 neighbor 5.5.5.5 update-source Loopback0
 neighbor 5.5.5.5 route-reflector-client
 no auto-summary
!

R4

router bgp 65002
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 200
 neighbor 3.3.3.3 remote-as 65002
 no auto-summary
!

R5

router bgp 65002
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 200
 network 100.100.100.0 mask 255.255.255.0
 neighbor 3.3.3.3 remote-as 65002
 neighbor 3.3.3.3 update-source Loopback0
 no auto-summary
!

We advertise network 100.100.100.0/24 originated from R5 to BGP.

##################################

Verify neighbor at R3

R3#sh ip bg summary
BGP router identifier 3.3.3.3, local AS number 65002
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4 65001      17      18        1    0    0 00:05:04        0
4.4.4.4         4 65002      23      23        1    0    0 00:19:23        0
5.5.5.5         4 65002      15      15        1    0    0 00:11:24        0
R3#

Verify neighbor at R2
R2#sh ip bgp  summary
BGP router identifier 10.10.10.2, 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
3.3.3.3         4 65002      17      17        1    0    0 00:05:41        0
10.10.10.1      4   100      34      33        1    0    0 00:30:08        0
R2#


Verify that R1 has received network information 100.100.100.0/24 from R5

R2# sh ip bgp
BGP table version is 2, local router ID is 10.10.10.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 100.100.100.0/24 5.5.5.5                  0    100      0 (65002) i
R2#


R1#sh ip bgp
BGP table version is 2, local router ID is 10.10.10.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 100.100.100.0/24 10.10.10.2                             0 200 i
R1#

1 comment:

  1. ขอบคุณนะคะ ได้ความรู้มากเลย

    ReplyDelete