BGP路由反射器RR集群多RR实验案例

一、拓扑

基础配置

AR1
system
sysname AR1
int g 0/0/0
ip add 10.0.12.1 24
int g 0/0/1
ip add 10.0.13.1 24
int g 0/0/2
ip add 10.0.14.1 24
int g 0/0/3
ip add 10.0.15.1 24
q
int loopback 0
ip add 1.1.1.1 32
q
int loopback 1
ip add 10.0.1.1 32

AR2
system
sysname AR2
int g 0/0/0
ip add 10.0.12.2 24
int g 0/0/1
ip add 10.0.23.2 24
int g 0/0/2
ip add 10.0.24.2 24
int g 0/0/3
ip add 10.0.25.2 24
q
int loopback 0
ip add 2.2.2.2 32
q
int loopback 1
ip add 10.0.2.2 32

AR3
system
sysname AR3
int g 0/0/0
ip add 10.0.13.3 24
int g 0/0/1
ip add 10.0.23.3 24
q
int loopback 0
ip add 3.3.3.3 32
q
int loopback 1
ip add 10.0.3.3 32

AR4
system
sysname AR4
int g 0/0/0
ip add 10.0.14.4 24
int g 0/0/1
ip add 10.0.24.4 24
q
int loopback 0
ip add 4.4.4.4 32
q
int loopback 1
ip add 10.0.4.4 32

AR5
system
sysname AR5
int g 0/0/0
ip add 10.0.15.5 24
int g 0/0/1
ip add 10.0.25.5 24
q
int loopback 0
ip add 5.5.5.5 32
int loopback 1
ip add 10.0.5.5 32

查看接口地址是否配置正确

[AR1]display ip int brief 
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 6
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 6

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/0                     unassigned           down       down      
Ethernet0/0/1                     unassigned           down       down      
GigabitEthernet0/0/0              10.0.12.1/24         up         up        
GigabitEthernet0/0/1              10.0.13.1/24         up         up        
GigabitEthernet0/0/2              10.0.14.1/24         up         up        
GigabitEthernet0/0/3              10.0.15.1/24         up         up        
LoopBack0                         1.1.1.1/32           up         up(s)     
LoopBack1                         10.0.1.1/32          up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial0/0/0                       unassigned           down       down      
Serial0/0/1                       unassigned           down       down      
Serial0/0/2                       unassigned           down       down      
Serial0/0/3                       unassigned           down       down    
[AR2]dis ip int brief 
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 6
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 6

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/0                     unassigned           down       down      
Ethernet0/0/1                     unassigned           down       down      
GigabitEthernet0/0/0              10.0.12.2/24         up         up        
GigabitEthernet0/0/1              10.0.23.2/24         up         up        
GigabitEthernet0/0/2              10.0.24.2/24         up         up        
GigabitEthernet0/0/3              10.0.25.2/24         up         up        
LoopBack0                         2.2.2.2/32           up         up(s)     
LoopBack1                         10.0.2.2/32          up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial0/0/0                       unassigned           down       down      
Serial0/0/1                       unassigned           down       down      
Serial0/0/2                       unassigned           down       down      
Serial0/0/3                       unassigned           down       down 

[AR3]dis ip int brief 
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 8

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/0                     unassigned           down       down      
Ethernet0/0/1                     unassigned           down       down      
GigabitEthernet0/0/0              10.0.13.3/24         up         up        
GigabitEthernet0/0/1              10.0.23.3/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
GigabitEthernet0/0/3              unassigned           down       down      
LoopBack0                         3.3.3.3/32           up         up(s)     
LoopBack1                         10.0.3.3/32          up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial0/0/0                       unassigned           down       down      
Serial0/0/1                       unassigned           down       down      
Serial0/0/2                       unassigned           down       down      
Serial0/0/3                       unassigned           down       down  
[AR4]dis ip int brief 
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 8

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/0                     unassigned           down       down      
Ethernet0/0/1                     unassigned           down       down      
GigabitEthernet0/0/0              10.0.14.4/24         up         up        
GigabitEthernet0/0/1              10.0.24.4/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
GigabitEthernet0/0/3              unassigned           down       down      
LoopBack0                         4.4.4.4/32           up         up(s)     
LoopBack1                         10.0.4.4/32          up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial0/0/0                       unassigned           down       down      
Serial0/0/1                       unassigned           down       down      
Serial0/0/2                       unassigned           down       down      
Serial0/0/3                       unassigned           down       down 

[AR5]dis ip int brief 
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 8

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/0                     unassigned           down       down      
Ethernet0/0/1                     unassigned           down       down      
GigabitEthernet0/0/0              10.0.15.5/24         up         up        
GigabitEthernet0/0/1              10.0.25.5/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
GigabitEthernet0/0/3              unassigned           down       down      
LoopBack0                         5.5.5.5/32           up         up(s)     
LoopBack1                         10.0.5.5/32          up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial0/0/0                       unassigned           down       down      
Serial0/0/1                       unassigned           down       down      
Serial0/0/2                       unassigned           down       down      
Serial0/0/3                       unassigned           down       down 

底层路由协议配置

AR1
ospf 1 router-id 1.1.1.1
area 0
netw 10.0.12.1 0.0.0.0
netw 10.0.13.1 0.0.0.0
netw 10.0.14.1 0.0.0.0
netw 10.0.15.1 0.0.0.0
netw 1.1.1.1 0.0.0.0

AR2
ospf 1 router-id 2.2.2.2
area 0
netw 10.0.12.2 0.0.0.0
netw 10.0.23.2 0.0.0.0
netw 10.0.24.2 0.0.0.0
netw 10.0.25.2 0.0.0.0
netw 2.2.2.2 0.0.0.0

AR3
ospf 1 router-id 3.3.3.3
area 0
netw 10.0.13.3 0.0.0.0
netw 10.0.23.3 0.0.0.0
netw 3.3.3.3 0.0.0.0

AR4
ospf 1 router-id 4.4.4.4
area 0
netw 10.0.14.4 0.0.0.0
netw 10.0.24.4 0.0.0.0
netw 4.4.4.4 0.0.0.0

AR5
ospf 1 router-id 5.5.5.5
area 0
netw 10.0.15.5 0.0.0.0
netw 10.0.25.5 0.0.0.0
netw 5.5.5.5 0.0.0.0

查看OSPF邻居状态

[AR1]dis ospf peer brief 

	 OSPF Process 1 with Router ID 1.1.1.1
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.0          GigabitEthernet0/0/1             3.3.3.3          Full        
 0.0.0.0          GigabitEthernet0/0/2             4.4.4.4          Full        
 0.0.0.0          GigabitEthernet0/0/3             5.5.5.5          Full        
 ----------------------------------------------------------------------------
[AR2]dis ospf peer brief 

	 OSPF Process 1 with Router ID 2.2.2.2
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/1             3.3.3.3          Full        
 0.0.0.0          GigabitEthernet0/0/2             4.4.4.4          Full        
 0.0.0.0          GigabitEthernet0/0/3             5.5.5.5          Full        
 ----------------------------------------------------------------------------
[AR3]dis ospf peer brief 

	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/1             2.2.2.2          Full        
 ----------------------------------------------------------------------------
[AR4]dis ospf peer brief 

	 OSPF Process 1 with Router ID 4.4.4.4
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/1             2.2.2.2          Full        
 ----------------------------------------------------------------------------
[AR5]dis ospf peer brief 

	 OSPF Process 1 with Router ID 5.5.5.5
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/1             2.2.2.2          Full        
 ----------------------------------------------------------------------------

BGP配置

AR1
bgp 100
peer 2.2.2.2 as 100
peer 2.2.2.2 con l 0
peer 3.3.3.3 as 100
peer 3.3.3.3 con l 0
peer 4.4.4.4 as 100
peer 4.4.4.4 con l 0
peer 5.5.5.5 as 100
peer 5.5.5.5 con l 0

AR2
bgp 100
peer 1.1.1.1 as 100
peer 1.1.1.1 con l 0
peer 3.3.3.3 as 100
peer 3.3.3.3 con l 0
peer 4.4.4.4 as 100
peer 4.4.4.4 con l 0
peer 5.5.5.5 as 100
peer 5.5.5.5 con l 0

AR3
bgp 100
peer 1.1.1.1 as 100
peer 1.1.1.1 con l 0
peer 2.2.2.2 as 100
peer 2.2.2.2 con l 0

AR4
bgp 100
peer 1.1.1.1 as 100
peer 1.1.1.1 con l 0
peer 2.2.2.2 as 100
peer 2.2.2.2 con l 0

AR5
bgp 100
peer 1.1.1.1 as 100
peer 1.1.1.1 con l 0
peer 2.2.2.2 as 100
peer 2.2.2.2 con l 0

查看BGP邻居状态

[AR1]dis bgp peer

 BGP local router ID : 10.0.12.1
 Local AS number : 100
 Total number of peers : 4		  Peers in established state : 4

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  2.2.2.2         4         100        3        4     0 00:01:26 Established    
   0
  3.3.3.3         4         100        3        4     0 00:01:21 Established    
   0
  4.4.4.4         4         100        3        4     0 00:01:17 Established    
   0
  5.5.5.5         4         100        3        4     0 00:01:14 Established    
   0
[AR2]dis bgp peer

 BGP local router ID : 10.0.12.2
 Local AS number : 100
 Total number of peers : 4		  Peers in established state : 4

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  1.1.1.1         4         100        3        3     0 00:01:39 Established    
   0
  3.3.3.3         4         100        3        4     0 00:01:34 Established    
   0
  4.4.4.4         4         100        3        4     0 00:01:29 Established    
   0
  5.5.5.5         4         100        3        4     0 00:01:25 Established    
   0
[AR3]dis bgp peer

 BGP local router ID : 10.0.13.3
 Local AS number : 100
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  1.1.1.1         4         100        3        3     0 00:01:45 Established    
   0
  2.2.2.2         4         100        3        3     0 00:01:45 Established    
   0
[AR4]dis bgp peer

 BGP local router ID : 10.0.14.4
 Local AS number : 100
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  1.1.1.1         4         100        3        3     0 00:01:53 Established    
   0
  2.2.2.2         4         100        3        3     0 00:01:53 Established    
   0
[AR5]dis bgp peer

 BGP local router ID : 10.0.15.5
 Local AS number : 100
 Total number of peers : 2		  Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  1.1.1.1         4         100        4        4     0 00:02:01 Established    
   0
  2.2.2.2         4         100        4        3     0 00:02:00 Established    
   0

路由反射器RR配置并发布路由

AR1
bgp 100
peer 3.3.3.3 reflect-client
peer 4.4.4.4 reflect-client
peer 5.5.5.5 reflect-client
reflector cluster-id 100.100.100.100
netw 10.0.1.1 32

AR2
bgp 100
peer 3.3.3.3 reflect-client
peer 4.4.4.4 reflect-client
peer 5.5.5.5 reflect-client
reflector cluster-id 100.100.100.100
netw 10.0.2.2 32

AR3
bgp 100
netw 10.0.3.3 32

AR4
bgp 100
netw 10.0.4.4 32

AR5
bgp 100
netw 10.0.5.5 32

这里不用配置AR1与AR2互为客户机,这是因为如果它们互为客户机,那么在传递路由时将会多传递一次浪费路由器资源,假如AR1与AR2互为客户机,其他客户机发布了一条路由后AR1和AR2还会把这条路由发给对方,但它们属于同一个集群下面,所以对端在接收到这条路由时查看Cluster_List发现与自己的Cluster_List一致则直接丢弃,如果不在同一个集群它们就会在往下进行一次传递,浪费网络资源。

查看各个设备的BGP路由表项

[AR1]dis bgp routing-table

 BGP Local router ID is 10.0.12.1 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 8
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   10.0.1.1/32        0.0.0.0         0                     0      i
 *>i  10.0.2.2/32        2.2.2.2         0          100        0      i
 *>i  10.0.3.3/32        3.3.3.3         0          100        0      i
 * i                     3.3.3.3         0          100        0      i
 *>i  10.0.4.4/32        4.4.4.4         0          100        0      i
 * i                     4.4.4.4         0          100        0      i
 *>i  10.0.5.5/32        5.5.5.5         0          100        0      i
 * i                     5.5.5.5         0          100        0      i
[AR2]dis bgp rout

 BGP Local router ID is 10.0.12.2 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 8
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  10.0.1.1/32        1.1.1.1         0          100        0      i
 *>   10.0.2.2/32        0.0.0.0         0                     0      i
 *>i  10.0.3.3/32        3.3.3.3         0          100        0      i
 * i                     3.3.3.3         0          100        0      i
 *>i  10.0.4.4/32        4.4.4.4         0          100        0      i
 * i                     4.4.4.4         0          100        0      i
 *>i  10.0.5.5/32        5.5.5.5         0          100        0      i
 * i                     5.5.5.5         0          100        0      i
[AR3]dis bgp routing-table 

 BGP Local router ID is 10.0.13.3 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 9
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  10.0.1.1/32        1.1.1.1         0          100        0      i
 * i                     1.1.1.1         0          100        0      i
 *>i  10.0.2.2/32        2.2.2.2         0          100        0      i
 * i                     2.2.2.2         0          100        0      i
 *>   10.0.3.3/32        0.0.0.0         0                     0      i
 *>i  10.0.4.4/32        4.4.4.4         0          100        0      i
 * i                     4.4.4.4         0          100        0      i
 *>i  10.0.5.5/32        5.5.5.5         0          100        0      i
 * i                     5.5.5.5         0          100        0      i
[AR4]dis bgp routing-table 

 BGP Local router ID is 10.0.14.4 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 9
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  10.0.1.1/32        1.1.1.1         0          100        0      i
 * i                     1.1.1.1         0          100        0      i
 *>i  10.0.2.2/32        2.2.2.2         0          100        0      i
 * i                     2.2.2.2         0          100        0      i
 *>i  10.0.3.3/32        3.3.3.3         0          100        0      i
 * i                     3.3.3.3         0          100        0      i
 *>   10.0.4.4/32        0.0.0.0         0                     0      i
 *>i  10.0.5.5/32        5.5.5.5         0          100        0      i
 * i                     5.5.5.5         0          100        0      i
[AR5]dis bgp routing-table 

 BGP Local router ID is 10.0.15.5 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 9
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>i  10.0.1.1/32        1.1.1.1         0          100        0      i
 * i                     1.1.1.1         0          100        0      i
 *>i  10.0.2.2/32        2.2.2.2         0          100        0      i
 * i                     2.2.2.2         0          100        0      i
 *>i  10.0.3.3/32        3.3.3.3         0          100        0      i
 * i                     3.3.3.3         0          100        0      i
 *>i  10.0.4.4/32        4.4.4.4         0          100        0      i
 * i                     4.4.4.4         0          100        0      i
 *>   10.0.5.5/32        0.0.0.0         0                     0      i

以上就是本章的全部内容了,感谢大家的浏览观看!文章若有错误或疑问可联系博主删除更改。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Fanmeang.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值