首页 > 代码库 > BGP Reflector(反射器)配置实例

BGP Reflector(反射器)配置实例

如下图示:

技术分享

配置思路:
1.首先每个RT建立l0?lxx接口,分配相接的接口IP地址,并且no sh激活。
2.每个RT建立一个OSPF网络Area0,网络号为l0和相接的接口网络地址。
3.为每个RT建立iBGP或eBGP路由。
4.为两两一组反射的cluster,有BGP Reflector和client组成一组,分别为R2和R3,R3和R4为一组。
5.让R5的Loopback55和R4的Loopback44接口互通。

R1:
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
interface Loopback11
 ip address 11.1.1.1 255.255.255.0
interface FastEthernet0/0
 ip address 12.1.1.1 255.255.255.0
 no sh
interface FastEthernet0/1
 ip address 15.1.1.1 255.255.255.0
 no sh
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 12.1.1.0 0.0.0.255 area 0
 network 15.1.1.0 0.0.0.255 area 0
router bgp 1
 bgp router-id 1.1.1.1
 network 11.1.1.0 mask 255.255.255.0
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 5.5.5.5 remote-as 5
 neighbor 5.5.5.5 ebgp-multihop 255
 neighbor 5.5.5.5 update-source Loopback0

R2:
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
interface Loopback22
 ip address 22.1.1.2 255.255.255.0
interface FastEthernet0/0
 ip address 12.1.1.2 255.255.255.0
 no sh
interface FastEthernet0/1
 ip address 23.1.1.2 255.255.255.0
 no sh
router ospf 1
 network 2.2.2.2 0.0.0.0 area 0
 network 12.1.1.0 0.0.0.255 area 0
 network 23.1.1.0 0.0.0.255 area 0
router bgp 1
 bgp router-id 2.2.2.2
 network 22.1.1.0 mask 255.255.255.0
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 3.3.3.3 remote-as 1
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 route-reflector-client      //R2为BGP Reflector,R3为client的一个cluster。

R3:
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
interface Loopback33
 ip address 33.1.1.3 255.255.255.0
interface FastEthernet0/0
 ip address 34.1.1.3 255.255.255.0
 no sh
interface FastEthernet0/1
 ip address 23.1.1.3 255.255.255.0
router ospf 1
 network 3.3.3.3 0.0.0.0 area 0
 network 23.1.1.0 0.0.0.255 area 0
 network 34.1.1.0 0.0.0.255 area 0
router bgp 1
 bgp router-id 3.3.3.3
 network 33.1.1.0 mask 255.255.255.0
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 4.4.4.4 remote-as 1
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 route-reflector-client       //R3为BGP Reflector,R4为client的一个cluster。

R4:
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
interface Loopback44
 ip address 44.1.1.4 255.255.255.0
interface FastEthernet0/0
 ip address 34.1.1.4 255.255.255.0
 no sh
router ospf 1
 network 4.4.4.4 0.0.0.0 area 0
 network 34.1.1.0 0.0.0.255 area 0
router bgp 1
 bgp router-id 4.4.4.4
 network 44.1.1.0 mask 255.255.255.0
 neighbor 3.3.3.3 remote-as 1
 neighbor 3.3.3.3 update-source Loopback0

R5:
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
interface Loopback55
 ip address 55.1.1.5 255.255.255.0
interface FastEthernet0/1
 ip address 15.1.1.5 255.255.255.0
 no sh
router ospf 1
 network 5.5.5.5 0.0.0.0 area 0
 network 15.1.1.0 0.0.0.255 area 0
router bgp 5
 bgp router-id 5.5.5.5
 network 55.1.1.0 mask 255.255.255.0
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 ebgp-multihop 255
 neighbor 1.1.1.1 update-source Loopback0


R4#ping 55.1.1.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 55.1.1.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/60/72 ms
R4#show ip bgp  
BGP table version is 6, local router ID is 4.4.4.4
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
*>i11.1.1.0/24      1.1.1.1                  0    100      0 i
*>i22.1.1.0/24      2.2.2.2                  0    100      0 i
*>i33.1.1.0/24      3.3.3.3                  0    100      0 i
*> 44.1.1.0/24      0.0.0.0                  0         32768 i
*>i55.1.1.0/24      5.5.5.5                  0    100      0 5 i

R5#ping 44.1.1.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 44.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/63/76 ms
R5#show ip bgp  
BGP table version is 6, local router ID is 5.5.5.5
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
*> 11.1.1.0/24      1.1.1.1                  0             0 1 i
*> 22.1.1.0/24      1.1.1.1                                0 1 i
*> 33.1.1.0/24      1.1.1.1                                0 1 i
*> 44.1.1.0/24      1.1.1.1                                0 1 i
*> 55.1.1.0/24      0.0.0.0                  0         32768 i

 

BGP Reflector(反射器)配置实例