سلام.
سناریویی آماده کردم در مورد BGP Route Reflector .
.................................................................................
Consider a network consisting of 100 routers. Having this many routers leads to alarge number of TCP BGP peers. In fact, you can easily calculate the number of peers by using the formula n(n-1)/2, where n is the number of BGP routers.
NOTE
To avoid routing loops, BGP only propagates updates learned from IBGP connections to other IBGP sessions that are fully meshed. Fully meshed networks contain a BGP peer to every BGP speaker in the network. For a 100-router network, there are 100(100-1)/2 = 100(99)/2 = 4950 TCP peers.
IBGP works well in small networks, and as the network grows even to just 100 routers, the scalability and administration of BGP becomes a task you must carefully consider.
BGP deals with large BGP networks using two methods:
· Route reflectors
· Confederations (advanced form of route reflectors; confederations are beyond the scope of this chapter.)
شرح ، توضیحات و پیکربندی به شرح زیر میباشد.
..............................................................................
the Routers R1–R5 are part of a large company and route reflectors are configured on R1 and R2 for redundancy purposes.Enable OSPF on the IGP routers by enabling all interfaces in area 0, so you can take advantage of loopbacks for the source and destination address for all IBGP peer sessions.
onfigure IBGP on R1 and use the loopback addresses as the next hop addresses because as long as you have IP connectivity, BGP should remain active. In
fact, good IBGP design always uses loopbacks so that one routing failure does not result in loss (TCP fails) of IBGP connectivity.
lo 0 for all routers : 131.108.254.x (x is number of each routers)
ospf configs on all router : R1-R5:
R1(config)#router ospf 1
R1(config-router)# network 0.0.0.0 255.255.255.255 area 0
The reason that OSPF is chosen for the preferred path is that OSPF has a lower nadministrative distance of 110, compared to 200 for IBGP.
if EBGP is configured between two routers and OSPF is the interior routing protocol, EBGP administrative distance is 20, far lower than OSPF (AD is 110). By default, a lower AD is always preferred; therefore, the next hop address is the EBGP
314 connection.
To change this default behavior without the changing AD values, use the network <network subnet-mask> backdoor command. Specifying the network allows the router to choose OSPF as the preferred path rather than the EBGP discovered path.
Changing the administrative distance is not always the most desirable method because all routers typically need modification, as in this scenario.
R3#sh ip rout
The IOS command to change the default BGP distance is as follows:
"distance bgp external-distance internal-distance local-distance "
The external distance is for EBGP routes (default is 20); the internal distance is for IBGP routes (default is 200), and the local distance defines the AD for locally connected routes (default is 200).
R1 - R5 (config-router)#distance bgp 20 109 109
R1 #clear ip bgp *
R3#sh ip route
This scenario built a redundant IBGP network. Next, simulate a routing BGP failure to R1 and ensure that R2 becomes the preferred path on all route reflector clients.
R3#sh ip bgp
The preferred path on R3 to 131.108.1.0/24 is through R1; the peer address is 131.108.254.1 (R1's loopback address). When the TCP peer to R1 fails on R3, the preferred path is through R2 (a route reflector).
all configs :
.......................................................
R1 :
router ospf 2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 333
no synchronization
bgp log-neighbor-changes
network 131.108.1.0 mask 255.255.255.0
neighbor 131.108.254.2 remote-as 333
neighbor 131.108.254.2 update-source Loopback0
neighbor 131.108.254.3 remote-as 333
neighbor 131.108.254.3 update-source Loopback0
neighbor 131.108.254.3 route-reflector-client
neighbor 131.108.254.4 remote-as 333
neighbor 131.108.254.4 update-source Loopback0
neighbor 131.108.254.4 route-reflector-client
neighbor 131.108.254.5 remote-as 333
neighbor 131.108.254.5 update-source Loopback0
neighbor 131.108.254.5 route-reflector-client
distance bgp 20 109 109
no auto-summary
!
R2:
router ospf 2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 333
no synchronization
bgp log-neighbor-changes
network 131.108.1.0 mask 255.255.255.0
neighbor 131.108.254.1 remote-as 333
neighbor 131.108.254.1 update-source Loopback0
neighbor 131.108.254.3 remote-as 333
neighbor 131.108.254.3 update-source Loopback0
neighbor 131.108.254.3 route-reflector-client
neighbor 131.108.254.4 remote-as 333
neighbor 131.108.254.4 update-source Loopback0
neighbor 131.108.254.4 route-reflector-client
neighbor 131.108.254.5 remote-as 333
neighbor 131.108.254.5 update-source Loopback0
neighbor 131.108.254.5 route-reflector-client
neighbor 131.108.255.2 remote-as 333
neighbor 131.108.255.2 update-source Loopback0
distance bgp 20 109 109
no auto-summary
نکته مهم:
دستوراتی که در R2 بولد شده ، برای وقتی میباشد که R1 از کار افتاده باشد و حالا R2 به عنوان Redundant وارد کار میشود...در اینجا R2 به R4 یک همسایگی iBgp ایجاد می کند.
R3:
router ospf 2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 333
no synchronization
bgp log-neighbor-changes
network 131.108.3.1 mask 255.255.255.255
neighbor 131.108.254.1 remote-as 333
neighbor 131.108.254.1 update-source Loopback0
neighbor 131.108.254.2 remote-as 333
neighbor 131.108.254.2 update-source Loopback0
distance bgp 20 109 109
no auto-summary
R4:
router ospf 2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 333
no synchronization
bgp log-neighbor-changes
network 131.108.4.1 mask 255.255.255.255
neighbor 131.108.254.1 remote-as 333
neighbor 131.108.254.1 update-source Loopback0
neighbor 131.108.254.2 remote-as 333
neighbor 131.108.254.2 update-source Loopback0
distance bgp 20 109 109
no auto-summary
R5:
router ospf 2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 333
no synchronization
bgp log-neighbor-changes
network 131.108.5.1 mask 255.255.255.255
neighbor 131.108.254.1 remote-as 333
neighbor 131.108.254.1 update-source Loopback0
neighbor 131.108.254.2 remote-as 333
neighbor 131.108.254.2 update-source Loopback0
distance bgp 20 109 109
no auto-summary