【实验】使用MPLS解决BGP路由黑洞的问题

我希望你不会看晕,主页菌已经尽力描述得很细致了,如有疑问欢迎在文章最下方留言,如有错误也欢迎留言指正。_(:з」∠)_

 

实验环境:

操作系统:Windows 10(1607,14393.351,当时最新测试版),模拟器:GNS3 IOU for Windows 1.5.2(当时最新正式版)
注:当然,只要有思科模拟器都可以做这个实验

【实验】使用MPLS解决BGP路由黑洞的问题
【实验】使用MPLS解决BGP路由黑洞的问题

实验需求:

  • IOU2、IOU3、IOU4和IOU5之间开启了ISIS做为IGP,并且开启了MPLS;
  • IOU1(router bgp 1)和IOU2(router bgp 2345)是EBGP邻居关系,IOU2和IOU5是IBGP邻居关系,IOU5(router bgp 2345)和IOU6(router bgp 6)是EBGP邻居关系;
  • IOU1上有10.1.1.0/24、10.1.2.0/24和10.1.3.0/24三个LAN网段,并将LAN网段通告到BGP中;
  • IOU6上有172.16.6.0/24、172.16.7.0/24和172.16.8.0/24三个LAN网段,并将LAN网段通告到BGP中。

实验步骤:

1、先完成基础配置(IP地址和IGP):

IOU1:

conf t

int l 0
ip add 1.1.1.1 255.255.255.255
ip add 10.1.1.1 255.255.255.0 secondary
ip add 10.1.2.1 255.255.255.0 secondary
ip add 10.1.3.1 255.255.255.0 secondary

int e 0/0
ip add 12.1.1.1 255.255.255.0
no sh

IOU6:

conf t

int l 0
ip add 6.6.6.6 255.255.255.255
ip add 172.16.6.6 255.255.255.0 secondary
ip add 172.16.7.6 255.255.255.0 secondary
ip add 172.16.8.6 255.255.255.0 secondary

int e 0/0
ip add 56.1.1.6 255.255.255.0
no sh

IOU2:

conf t

int l 0
ip add 2.2.2.2 255.255.255.255

int e 0/0
ip add 12.1.1.2 255.255.255.0
no sh

int e 0/1
ip add 23.1.1.2 255.255.255.0
no sh

router isis 1
net 49.0001.0000.0000.0002.00
is-type level-1
pass l 0
adv pass

int e 0/1
ip router isis 1

IOU3:

conf t

int l 0
ip add 3.3.3.3 255.255.255.255

int e 0/0
ip add 34.1.1.3 255.255.255.0
no sh

int e 0/1
ip add 23.1.1.3 255.255.255.0
no sh

router isis 1
net 49.0001.0000.0000.0003.00
is-type level-1
pass l 0
adv pass

int r e 0/0 , e 0/1
ip router isis 1

IOU4:

conf t

int l 0
ip add 4.4.4.4 255.255.255.255

int e 0/0
ip add 34.1.1.4 255.255.255.0
no sh

int e 0/1
ip add 45.1.1.4 255.255.255.0
no sh

router isis 1
net 49.0001.0000.0000.0004.00
is-type level-1
pass l 0
adv pass

int r e 0/0 , e 0/1
ip router isis 1

IOU5:

conf t

int l 0
ip add 5.5.5.5 255.255.255.255

int e 0/0
ip add 56.1.1.5 255.255.255.0
no sh

int e 0/1
ip add 45.1.1.5 255.255.255.0
no sh

router isis 1
net 49.0001.0000.0000.0005.00
is-type level-1
pass l 0
adv pass

int e 0/1
ip router isis 1

2、接着完成MPLS的配置:

IOU2:

mpls ip
mpls label protocol ldp
mpls ldp router-id Loopback0 force
mpls label range 2000 2999

int e 0/1
mpls ip

IOU3:

mpls ip
mpls label protocol ldp
mpls ldp router-id Loopback0 force
mpls label range 3000 3999

router isis 1
mpls ldp autoconfig

IOU4:

mpls ip
mpls label protocol ldp
mpls ldp router-id Loopback0 force
mpls label range 4000 4999

router isis 1
mpls ldp autoconfig

IOU5:

mpls ip
mpls label protocol ldp
mpls ldp router-id Loopback0 force
mpls label range 5000 5999

int e 0/1
mpls ip

3、配置BGP:

IOU1:

router bgp 1
bgp router-id 1.1.1.1
network 10.1.1.0 mask 255.255.255.0
network 10.1.2.0 mask 255.255.255.0
network 10.1.3.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 2345

IOU2:

router bgp 2345
bgp router-id 2.2.2.2
neighbor 12.1.1.1 remote-as 1
neighbor 5.5.5.5 remote-as 2345
neighbor 5.5.5.5 up l 0
neighbor 5.5.5.5 next-hop-self

IOU5:

router bgp 2345
bgp router-id 5.5.5.5
neighbor 56.1.1.6 remote-as 6
neighbor 2.2.2.2 remote-as 2345
neighbor 2.2.2.2 up l 0
neighbor 2.2.2.2 next-hop-self

IOU6:

router bgp 6
bgp router-id 6.6.6.6
network 172.16.6.0 mask 255.255.255.0
network 172.16.7.0 mask 255.255.255.0
network 172.16.8.0 mask 255.255.255.0
neighbor 56.1.1.5 remote-as 2345

基于MPLS的BGP配置没什么特殊的,MPLS域内的IBGP邻居关系用loopack口建立,EBGP邻居关系还是用直连口建立,都是标准的BGP配置。

现在用IOU1上的LAN网段是可以ping通IOU6上的LAN网段的:

IOU1#p 172.16.6.6 so 10.1.1.1 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.6.6, timeout is 2 seconds:
Packet sent with a source address of 10.1.1.1 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

为什么IOU1 ping 172.16.6.6 so 10.1.1.1能通呢?

回答:如下图所示,当数据包横穿MPLS域时,数据包在IOU2上借用了172.16.6.0/24这条BGP路由的下一跳IP地址5.5.5.5/32的MPLS标签,然后数据包使用5.5.5.5/32的MPLS标签横穿MPLS域到达另一个MPLS域边界路由器IOU5。数据包传出MPLS域后,IOU5再转发给IOU6。

【实验】使用MPLS解决BGP路由黑洞的问题
【实验】使用MPLS解决BGP路由黑洞的问题

让我们详细地跟踪一下:

当ping包从IOU1发往IOU2后,因为这个数据包不带MPLS标签,是纯的IP数据包,所以IOU2默认会先查找FIB(开启MPLS的前提条件就是开启CEF,纯IP数据包自然就要先查FIB),通过FIB来决定这个数据包该如何进行下一步的处理。由下图可知,下一跳发往23.1.1.3,从Ethernet0/1接口转发出去,同时要打上MPLS出标签3002。

IOU2#sh ip cef 172.16.6.6
172.16.6.0/24
  nexthop 23.1.1.3 Ethernet0/1 label 3002

其他相关文章:

了解CEF转发机制的盆友们都知道,FIB里的数据其实是RIB(路由表)的拷贝,那我们去IOU2的RIB(路由表)里面看一下。如下图所示,去往172.16.6.6的下一跳是5.5.5.5,再经过递归查找发现,去往5.5.5.5的下一跳也确实是23.1.1.3。

IOU2#sh ip ro
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      3.0.0.0/32 is subnetted, 1 subnets
i L1     3.3.3.3 [115/10] via 23.1.1.3, 00:16:38, Ethernet0/1
      4.0.0.0/32 is subnetted, 1 subnets
i L1     4.4.4.4 [115/20] via 23.1.1.3, 00:16:28, Ethernet0/1
      5.0.0.0/32 is subnetted, 1 subnets
i L1     5.5.5.5 [115/30] via 23.1.1.3, 00:16:28, Ethernet0/1
      10.0.0.0/24 is subnetted, 3 subnets
B        10.1.1.0 [20/0] via 12.1.1.1, 00:15:34
B        10.1.2.0 [20/0] via 12.1.1.1, 00:15:34
B        10.1.3.0 [20/0] via 12.1.1.1, 00:15:34
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.1.1.0/24 is directly connected, Ethernet0/0
L        12.1.1.2/32 is directly connected, Ethernet0/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.1.1.0/24 is directly connected, Ethernet0/1
L        23.1.1.2/32 is directly connected, Ethernet0/1
      172.16.0.0/24 is subnetted, 3 subnets
B        172.16.6.0 [200/0] via 5.5.5.5, 00:15:24
B        172.16.7.0 [200/0] via 5.5.5.5, 00:15:24
B        172.16.8.0 [200/0] via 5.5.5.5, 00:15:24

那FIB怎么就知道要打编号为3002的MPLS出标签啦?因为你在IOU2上开启MPLS了嘛,MPLS往FIB里面添加的。如下图所示,通过查找IOU2的LFIB我们可以看到,去往5.5.5.5/32路由的出标签为3002,出接口为Et0/1,下一跳为23.1.1.3。

IOU2#sh mpls forwarding-table 
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
2000       Pop Label  3.3.3.3/32       0             Et0/1      23.1.1.3    
2001       3001       4.4.4.4/32       0             Et0/1      23.1.1.3    
2002       3002       5.5.5.5/32       0             Et0/1      23.1.1.3

综上所述,IOU2最终会为ping包打上去往5.5.5.5路由的MPLS标签(Label 3002)并将数据包传给IOU3。

因为此时ping包带有MPLS标签了,所以IOU3和IOU4都依靠MPLS标签完成转发,最终数据包到达IOU5。这样数据包就以极小的代价在IOU2上使用172.16.6.0/24这条BGP路由的下一跳IP地址5.5.5.5的LSP(MPLS的标签交换通道)从IOU2穿越到了IOU5。显然,此时IOU3和IOU4并不关心ping包的源IP地址(10.1.1.1)和目的IP地址(172.16.6.6)分别是什么,IOU3和IOU4只通过MPLS标签进行转发。

其他相关文章:

使用MPLS解决BGP路由黑洞的问题有诸多的优点:

a. 首先,MPLS域的非边缘设备上的路由表非常小,这些设备不需要承载大量的来自MPLS域外的路由(如IOU1和IOU6发来的BGP路由),大大减小了硬件开销。在本实验拓扑里MPLS域的非边缘设备指的就是IOU3和IOU4。如下图所示,IOU3的路由表里只有MPLS域内的路由。

IOU3#sh ip ro
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
i L1     2.2.2.2 [115/10] via 23.1.1.2, 00:30:56, Ethernet0/1
      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      4.0.0.0/32 is subnetted, 1 subnets
i L1     4.4.4.4 [115/10] via 34.1.1.4, 00:30:41, Ethernet0/0
      5.0.0.0/32 is subnetted, 1 subnets
i L1     5.5.5.5 [115/20] via 34.1.1.4, 00:29:29, Ethernet0/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.1.1.0/24 is directly connected, Ethernet0/1
L        23.1.1.3/32 is directly connected, Ethernet0/1
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.1.1.0/24 is directly connected, Ethernet0/0
L        34.1.1.3/32 is directly connected, Ethernet0/0

b. MPLS只给BGP路由的下一跳分配标签,不会给BGP路由本身分配标签,所以MPLS域内各个路由器的LFIB(标签转发信息库)也是很小的,这有助于加快查表速度和提高转发速率。如下图所示,IOU3的LFIB只有2.2.2.2、4.4.4.4和5.5.5.5这三条路由的MPLS标签。

IOU3#sh mpls forwarding-table 
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
3000       Pop Label  2.2.2.2/32       6779          Et0/1      23.1.1.2    
3001       Pop Label  4.4.4.4/32       0             Et0/0      34.1.1.4    
3002       4002       5.5.5.5/32       6880          Et0/0      34.1.1.4

c. 在MPLS域的非边缘设备上,RIB和LFIB都这么小,但是却不影响来自MPLS域外的数据包穿过MPLS域。因为无论MPLS域外的BGP路由和需要传输的数据包有多少,他们在MPLS域内统一使用5.5.5.5路由的LSP(MPLS的标签交换通道)从IOU2穿越到IOU5。如下图所示,IOU2为这些ping包分配相同的MPLS标签。

IOU1#tra 172.16.6.6 so 10.1.1.1
Type escape sequence to abort.
Tracing the route to 172.16.6.6
VRF info: (vrf in name/id, vrf out name/id)
  1 12.1.1.2 1 msec 1 msec 0 msec
  2 23.1.1.3 [MPLS: Label 3002 Exp 0] 1 msec 1 msec 1 msec
  3  *  *  * 
  4 45.1.1.5 2 msec 1 msec 2 msec
  5 56.1.1.6 1 msec 2 msec 1 msec

IOU1#tra 172.16.7.6 so 10.1.1.1
Type escape sequence to abort.
Tracing the route to 172.16.7.6
VRF info: (vrf in name/id, vrf out name/id)
  1 12.1.1.2 1 msec 1 msec 0 msec
  2 23.1.1.3 [MPLS: Label 3002 Exp 0] 1 msec 2 msec 1 msec
  3  *  *  * 
  4 45.1.1.5 2 msec 1 msec 1 msec
  5 56.1.1.6 2 msec 1 msec 2 msec

IOU1#tra 172.16.8.6 so 10.1.2.1
Type escape sequence to abort.
Tracing the route to 172.16.8.6
VRF info: (vrf in name/id, vrf out name/id)
  1 12.1.1.2 0 msec 1 msec 0 msec
  2 23.1.1.3 [MPLS: Label 3002 Exp 0] 2 msec 1 msec 1 msec
  3  *  *  * 
  4 45.1.1.5 2 msec 1 msec 2 msec
  5 56.1.1.6 1 msec 2 msec 1 msec

d. 使用MPLS解决BGP路由黑洞,大大简化了网络拓扑的设计。不需要配置BGP联邦,也不需要配置RR(路由反射器)。

那如果MPLS域内的IBGP邻居关系不是用loopback口建立的,而是用物理口建立的,IOU1和IOU6还能正常通信么?

IOU2和IOU5是通过loopback口来建立的IBGP邻居关系(IOU2:2.2.2.2 <——> 5.5.5.5:IOU5);现在,我们修改一下,让IOU2和IOU5通过物理口来建立IBGP邻居关系:(IOU2:23.1.1.2 <——> 45.1.1.5:IOU5)

IOU2:

router isis 1
no advertise passive-only
no passive-interface Loopback0

int l 0
ip router isis 1

router bgp 2345
nei 45.1.1.5 remote-as 2345
nei 45.1.1.5 next-hop-self
nei 5.5.5.5 shutdown

do clear ip bgp * soft

IOU5:

router isis 1
no advertise passive-only
no passive-interface Loopback0

int l 0
ip router isis 1

router bgp 2345
nei 23.1.1.2 remote-as 2345
nei 23.1.1.2 next-hop-self
nei 2.2.2.2 shutdown

do clear ip bgp * soft

经过上面的修改以后,IOU2和IOU5之间通过物理口来建立IBGP邻居关系了。由下图可知,控制层面的BGP路由传递是没有问题的。

IOU2#sh ip b
BGP table version is 19, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  10.1.1.0/24      12.1.1.1                 0             0 1 i
 *>  10.1.2.0/24      12.1.1.1                 0             0 1 i
 *>  10.1.3.0/24      12.1.1.1                 0             0 1 i
 *>i 172.16.6.0/24    45.1.1.5                 0    100      0 6 i
 *>i 172.16.7.0/24    45.1.1.5                 0    100      0 6 i
 *>i 172.16.8.0/24    45.1.1.5                 0    100      0 6 i

IOU5#sh ip b
BGP table version is 16, 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, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 10.1.1.0/24      23.1.1.2                 0    100      0 1 i
 *>i 10.1.2.0/24      23.1.1.2                 0    100      0 1 i
 *>i 10.1.3.0/24      23.1.1.2                 0    100      0 1 i
 *>  172.16.6.0/24    56.1.1.6                 0             0 6 i
 *>  172.16.7.0/24    56.1.1.6                 0             0 6 i
 *>  172.16.8.0/24    56.1.1.6                 0             0 6 i

那IOU1和IOU6之间还能否通信?

IOU1#p 172.16.6.6 so 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.6.6, timeout is 2 seconds:
Packet sent with a source address of 10.1.1.1 
.....
Success rate is 0 percent (0/5)

答案是否定的。

那为啥IOU1和IOU6之间就不能通信了呢?

IOU2#sh ip b
BGP table version is 19, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  10.1.1.0/24      12.1.1.1                 0             0 1 i
 *>  10.1.2.0/24      12.1.1.1                 0             0 1 i
 *>  10.1.3.0/24      12.1.1.1                 0             0 1 i
 *>i 172.16.6.0/24    45.1.1.5                 0    100      0 6 i
 *>i 172.16.7.0/24    45.1.1.5                 0    100      0 6 i
 *>i 172.16.8.0/24    45.1.1.5                 0    100      0 6 i

如上图所示,你在IOU2上注意看,172.16.6.0/24这条BGP路由的下一跳IP地址是45.1.1.5(注意:如果用loopback口建立IBGP邻居关系的话,这里的下一跳IP地址应该是5.5.5.5),这就意味着IOU2收到来自IOU1的ping包后,会为该ping包打上45.1.1.5路由的MPLS标签(如下两张图所示),并转发给IOU3。

这里我可能又需要重复一遍,因为IOU1没有运行MPLS,所以IOU1发给IOU2的ping包是纯的IP数据包。在IOU2收到纯的IP数据包以后会查找FIB(只有带有MPLS标签的数据包才会先查找LFIB),根据FIB的指示去转发数据包。如下图所示,IOU2将会把该数据包从Ethernet0/1接口转发出去,下一跳是23.1.1.3,同时会打上编号为3003的MPLS出标签。

IOU2#sh ip cef 172.16.6.6
172.16.6.0/24
  nexthop 23.1.1.3 Ethernet0/1 label 3003
IOU2#sh mpls forwarding-table 
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
2000       Pop Label  3.3.3.3/32       0             Et0/1      23.1.1.3    
2001       3001       4.4.4.4/32       0             Et0/1      23.1.1.3    
2002       3002       5.5.5.5/32       0             Et0/1      23.1.1.3    
2003       3003       45.1.1.0/24      0             Et0/1      23.1.1.3

IOU3收到一个带有MPLS标签的数据包后,默认会先查找LFIB。由下图可知,根据LFIB的指示,IOU3将会弹出一层标签(Pop Label),同时将数据包从Et0/0口转发出去,下一跳是34.1.1.4。

IOU3#sh mpls forwarding-table 
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
3000       Pop Label  2.2.2.2/32       0             Et0/1      23.1.1.2    
3001       Pop Label  4.4.4.4/32       0             Et0/0      34.1.1.4    
3002       4001       5.5.5.5/32       0             Et0/0      34.1.1.4    
3003       Pop Label  45.1.1.0/24      1778          Et0/0      34.1.1.4

这就奇怪了,IOU3为啥要弹出一层标签(Pop Label)呀?

显然,这个Pop Label是由IOU4发给IOU3的,换句话说,是IOU4让IOU3弹出这一层标签的。如下图所示,45.1.1.0/24这段路由不仅仅是IOU5的直连网段,也是IOU4的直连网段。所以,IOU4让IOU3弹出一层标签是正常的次末跳标签弹出行为。

【实验】使用MPLS解决BGP路由黑洞的问题
【实验】使用MPLS解决BGP路由黑洞的问题

PS:不知道次末跳标签弹出行为(Pop Label)是啥意思?请看:《【实验】MPLS下,Pop Label和No Label的区别

IOU1和IOU6之间不能通信的原因现在就搞清楚了:因为IOU3上弹出了一层标签(Pop Label),所以IOU4收到的是一个纯的IP数据包,在FIB里查找该数据包的目的IP地址发现,IOU4不知道怎么去往172.6.6.6,于是IOU4丢包。

IOU4#sh ip cef 172.16.6.6
0.0.0.0/0
  no route

总结:

  1. 单播应用中IGP路由的FEC(标签的分配对象)是FIB的每一个目的前缀;
  2. 单播应用中BGP路由的FEC(标签的分配对象)是BGP路由的下一跳;
  3. 任何时候进入MPLS域内的数据包,如果该数据包的目的IP地址在边界设备上是以BGP路由的形式出现的,边界设备转发该数据包将是借其去往BGP路由的下一跳标签来发送(也就是说本地如何去往下一跳就如何发送该数据包)。

其他相关文章:

 

主页菌相信本文的描述已经非常详尽了,如果读到这里你还有疑问,欢迎在下方留言。如有错误也欢迎在下方留言指正。主页菌去睡觉了,好困,撑不住了。_(:з」∠)_

这篇文章对你有帮助吗?

相关文章

7条评论

  1. dpan

    引用
    “为什么IOU1 ping 172.16.6.6 so 10.1.1.1能通呢?

    回答:如下图所示,当数据包横穿MPLS域时,数据包在IOU2上借用了172.16.6.0/24这条BGP路由的下一跳IP地址5.5.5.5/32的MPLS标签,然后数据包使用5.5.5.5/32的MPLS标签横穿MPLS域到达另一个MPLS域边界路由器IOU5。数据包传出MPLS域后,IOU5再转发给IOU6。”
    疑问:当数据包横穿MPLS域时,数据包在IOU2上借用了172.16.6.0/24这条BGP路由的下一跳IP地址5.5.5.5/32,下一跳的IP地址应该是56.1.1.5/24,不是5.5.5.5/32

  2. dpan

    请忽略我的评论,自己的理解不到位,此下一跳应该在IOU2上看

    1. 是的,IOU2 上看这个 BGP 路由的下一跳是 5.5.5.5/32,因为 IOU5 上配置了 update-source loopback 0 。

  3. dpan

    感谢你的回复,好开心^_^期待主页菌可以出视频讲解

  4. tian

    您好,非常感谢,非常详尽,但是我有个疑问,这个黑洞是怎么形成的,也就是说,R2和R5
    建立了BGP的邻居,而中间R3,R4并没有建立ibgp邻居,那从控制层面讲,从R2或者R1上看R5或者R6的bgp路由是怎么让R2或者R1学到的呢?是通过ISIS么? 那ISIS是怎么传递BGP的路由的呢?

    1. R2 和 R5 建立了 IBGP 邻居关系,R5 上的 BGP 路由自然是通过这个 IBGP 邻居关系传递给了 R2 ,所以 R2 就学到了 R5 的 BGP 路由。

      ISIS 这些 IGP 协议的目的就是让 R2 能找到 R5 ,只要 R2 能找到 R5 ,那么 R2 就能和 R5 建立 IBGP 邻居关系,那么 R2 和 R5 之间就能传递 BGP 路由,所以控制层面上就通了,但数据层面还没有通(于是出现了路由黑洞)。

      BGP 路由黑洞的解决方法除了 MPLS ,还有 full mesh 、使用路由反射器( RR )和使用联邦( Confederation )等等。

      1. tian

        我明白了,非常感谢您的回复,没想到还能够回复我。

发表评论?

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据