MPLS經(jīng)典問(wèn)題利用MPLS解決和避免bgp路由黑洞問(wèn)題
R1---(R2---R3---R4)--R5
|__EBGP__|_____IBGP______|__EBGP_|
12.0/24 23.0/24 34.0/24 45.0/24
R2-R4是MPLS域
在R2和R4上重分布直連面向EBGP鄰居的接口
使用R1和R5上的loopback1做為internet路由
r1#sh ip b
BGP table version is 7, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 0.0.0.0 0 32768 i
*> 55.55.55.55/32 192.168.12.2 0 1 3 i
*> 192.168.12.0 192.168.12.2 0 0 1 ?
*> 192.168.45.0 192.168.12.2 0 1 ?
r5#sh ip b
BGP table version is 7, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 192.168.45.4 0 1 2 i
*> 55.55.55.55/32 0.0.0.0 0 32768 i
*> 192.168.12.0 192.168.45.4 0 1 ?
*> 192.168.45.0 192.168.45.4 0 0 1 ?
-------------------------------
r2# sh ip b
BGP table version is 5, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 192.168.12.1 0 0 2 i
*>i55.55.55.55/32 192.168.45.5 0 100 0 3 i
*> 192.168.12.0 0.0.0.0 0 32768 ?
*>i192.168.45.0 4.4.4.4 0 100 0 ?
r2#sh ip route
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/129] via 192.168.23.3, 01:26:32, Serial2/0
r2查找路由表,發(fā)現(xiàn)i55.55.55.55/32是一條bgp路由,而mpls不會(huì)為從bgp收到的路由分配標(biāo)簽,它再次查找,發(fā)現(xiàn) i55.55.55.55/32的下一跳地址是192.168.45.5,同理,再次查找路由表,終于發(fā)現(xiàn)4.4.4.4是一條IGP路由,正好R3給4.4.4.4分配了一個(gè)301的標(biāo)簽給R2,這時(shí)候,最無(wú)恥的事情發(fā)生了,R2將這個(gè)標(biāo)簽copy到CEF表里面關(guān)于到55.55.55.55和192.168.45.0/24,的壓入標(biāo)簽里面,也就是所有從192.168.45.5收到的bgp路由都有這種行為,如下所示:
r2#show ip cef detail
4.4.4.4/32, version 10, epoch 0, cached adjacency to Serial2/0
0 packets, 0 bytes
tag informationset, shared
local tag: 201
fast tag rewrite with Se2/0, point2point, tags imposed: {301}
via 192.168.23.3, Serial2/0, 1 dependency
next hop 192.168.23.3, Serial2/0
valid cached adjacency
tag rewrite with Se2/0, point2point, tags imposed: {301}
55.55.55.55/32, version 19, epoch 0, cached adjacency to Serial2/0
0 packets, 0 bytes
tag information from 4.4.4.4/32, shared
local tag: 201
fast tag rewrite with Se2/0, point2point, tags imposed: {301}
via 192.168.45.5, 0 dependencies, recursive
next hop 192.168.23.3, Serial2/0 via 192.168.45.0/24
valid cached adjacency
tag rewrite with Se2/0, point2point, tags imposed: {301}
192.168.45.0/24, version 18, epoch 0, cached adjacency to Serial2/0
0 packets, 0 bytes
tag information from 4.4.4.4/32, shared
local tag: 201
fast tag rewrite with Se2/0, point2point, tags imposed: {301}
via 4.4.4.4, 1 dependency, recursive
next hop 192.168.23.3, Serial2/0 via 4.4.4.4/32
valid cached adjacency
tag rewrite with Se2/0, point2point, tags imposed: {301}
------------------------------------
路由器不會(huì)對(duì)從bgp收到的路由分配標(biāo)簽,所以在這里看不到55.55.55.55/32的標(biāo)簽綁定
r2#sho tag tdp bind
tib entry: 2.2.2.2/32, rev 4
local binding: tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: 300
tib entry: 3.3.3.3/32, rev 6
local binding: tag: 200
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 4.4.4.4/32, rev 8
local binding: tag: 201
remote binding: tsr: 3.3.3.3:0, tag: 301
tib entry: 192.168.12.0/24, rev 2
local binding: tag: imp-null
tib entry: 192.168.23.0/24, rev 10
local binding: tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: imp-null
tib entry: 192.168.34.0/24, rev 12
local binding: tag: 202
remote binding: tsr: 3.3.3.3:0, tag: imp-null
當(dāng)R3收到帶有301標(biāo)簽的mpls packet的時(shí)候,根據(jù)自己的標(biāo)簽轉(zhuǎn)發(fā)表,進(jìn)行次末跳彈出,下一跳是4.4.4.4/32,而4.4.4.4/32已經(jīng)具有internet路由,所以它可以正常轉(zhuǎn)發(fā)
r3#show tag-switching forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
300 Pop tag 2.2.2.2/32 4061 Se2/0 point2point
301 Pop tag 4.4.4.4/32 4457 Se1/0 point2point
而這時(shí)候,在R3上不存在55.55.55.55/32路由
r3#sh ip rou
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 192.168.23.2, 00:28:23, Serial2/0
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
O 4.4.4.4 [110/65] via 192.168.34.4, 00:28:23, Serial1/0
C 192.168.23.0/24 is directly connected, Serial2/0
C 192.168.34.0/24 is directly connected, Serial1/0
這就是利用mpls來(lái)避免bgp的路由黑洞問(wèn)題,應(yīng)該是說(shuō)清楚了吧?^_^
文章錄入:csh 責(zé)任編輯:csh相關(guān)文章
實(shí)例講解破解交換機(jī)密碼地全部過(guò)程
實(shí)例講解破解交換機(jī)密碼地全部過(guò)程...2007-09-09Windows XP系統(tǒng)常見(jiàn)的進(jìn)程列表
Windows XP系統(tǒng)常見(jiàn)的進(jìn)程列表...2007-09-09校園網(wǎng)smoothwall 解決方案--多VLAN問(wèn)題的解決
校園網(wǎng)smoothwall 解決方案--多VLAN問(wèn)題的解決...2007-09-09網(wǎng)絡(luò)常見(jiàn)故障問(wèn)答
網(wǎng)絡(luò)常見(jiàn)故障問(wèn)答...2007-09-09兩臺(tái)思科路由器互相升級(jí)IOS過(guò)程
兩臺(tái)思科路由器互相升級(jí)IOS過(guò)程...2007-09-09