-
带
RR
环境的
MPLS
VPN
1
、实验目的
:在
Mpls-VPN
的
backbone
区域应用
VPN
的
RR<
/p>
来传递
VPNv4
的路由,
两个
CE
(
R1
和
R5
)可以互相通信
2
、理论支持
:默认情况下,
VPNv4
的路由只有在
RT
< br>中的
import
和
expor
t
吻合的情
况下才会被接收,
除非关闭
针对
RT
的过滤
(用于复杂
VPN
)
,
另外一个就是
我们今天实验的
VPN
的
RR
的情况,它也打破了
VPNv4
中
iBGP
的水平分割原则,能否接收并公告
VPNv
4
的
路由
3
、
拓扑描述
:
拓扑如下图所示。
老规矩老习惯,
R1
上
s1/0
地址为
12.1.1.1<
/p>
(
符合
XY.1.1.X
的规则,
XY
代表设备号)
,
R2
上
s1/0=12.1.1.2<
/p>
。同时每个设备上有一个环回口
=XX.1.1.1
,如
R1
的环回口
=11.
1.1.1/24
图中
PE1
为
p>
R2
,
PE2
为<
/p>
R4
,
R1
和<
/p>
R5
为
CE
4
、实验步骤
步骤
1
、
Backpone
区域内通过
IGP
,环回口互相可达,本例采用
eigrp
(配置不再赘述)
PE1#sh ip route
ei
PE1#sh ip route
eigrp
34.0.0.0/24 is subnetted, 1
subnets
D
34.1.1.0 [90/30720] via 23.1.1.3,
00:18:30, FastEthernet1/0
33.0.0.0/24 is subnetted, 1 subnets
D
33.1.1.0 [90/156160] via 23.1.1.3,
00:18:30, FastEthernet1/0
44.0.0.0/24 is subnetted, 1 subnets
D
44.1.1.0 [90/158720] via 23.1.1.3,
00:17:14, FastEthernet1/0
PE1#ping
44.1.1.1
Type escape
sequence to abort.
Sending 5, 100-byte
ICMP Echos to 44.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100
percent (5/5), round-trip min/avg/max = 8/36/76 ms
步骤
2
、<
/p>
MPLS
的
LDP
邻居建立
---sh mpls ldp nei
p>
沿途建立
LSP
通道,沿途相关接口配置命
令
mpls ip.
PE1#sh
run int f1/0
terface
FastEthernet1/0
ip address
23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls
ip
R3#sh mpls ldp neighbor
Peer LDP Ident: 22.1.1.1:0;
Local LDP Ident 33.1.1.1:0
TCP connection:
22.1.1.1.646 - 33.1.1.1.15237
State: Oper; Msgs sent/rcvd: 29/29;
Downstream
Up time: 00:18:29
LDP discovery sources:
FastEthernet1/0, Src IP
addr: 23.1.1.2
Addresses bound to peer LDP
Ident:
23.1.1.2
22.1.1.1
Peer LDP Ident: 44.1.1.1:0; Local LDP
Ident 33.1.1.1:0
TCP connection:
44.1.1.1.31420 - 33.1.1.1.646
State: Oper; Msgs sent/rcvd: 28/29;
Downstream
Up time: 00:18:19
LDP discovery sources:
FastEthernet1/1, Src IP
addr: 34.1.1.4
Addresses bound to peer LDP
Ident:
34.1.1.4
44.1.1.1
当然可以通过
mpls label range 100 2
00
配置分配的标签范围,
通过
mpl
s ldp router-id loopback
0
force
指定
router-id
,
注意此环回口必须在其
LDP
的邻居路由可达,否则将无法建立
ldp
邻
居
如在
PE1
增加环回口
loopback1
,并将其指定为
LDP
router-ID
PE1(config)#mpls ldp router-
id lo1 force
而该地址在
R3
不可达
R3#sh ip
route 111.1.1.0
% Network not in table
则该
LDP
邻居会断掉,而会选择其他接口建立
L
DP
邻居
3
、建立
VRF(
虚拟路由转发
)----sh ip vrf detail(note
:连接
p>
CE
的接口才能划入
VRF)
R1
ip vrf YESLAB
rd 100:1
route-
target export 100:1
route-
target import 100:1
interface Serial2/0
ip vrf forwarding YESLAB
ip address 12.1.1.2 255.255.255.0
PE1#sh ip vrf detail
VRF YESLAB; default RD
100:1; default VPNID
Interfaces:
Se2/0
VRF Table ID = 1
Export VPN
route-target communities
RT:100:1
Import VPN
route-target communities
RT:100:1
No import
route-map
No
export route-map
VRF label distribution protocol: not
configured
VRF
label allocation mode: per-prefix
4
、
MP-BGP
< br>先建立
BGP
关系
R1
router bgp 1
no synchronization
bgp router-id 22.1.1.1
bgp log-neighbor-changes
neighbor 33.1.1.1 remote-as 1
neighbor 33.1.1.1 update-
source Loopback0
no auto-
summary
R3
作为
RR
router bgp 1
no
synchronization
bgp log-
neighbor-changes
neighbor
22.1.1.1 remote-as 1
neighbor 22.1.1.1 update-source
Loopback0
neighbor 22.1.1.1
route-reflector-client
neighbor 44.1.1.1 remote-as 1
neighbor 44.1.1.1 update-
source Loopback0
neighbor
44.1.1.1 route-reflector-client
no auto-summary
R3#sh ip bgp
summary
BGP router
identifier 33.1.1.1, local AS number 1
BGP table version is 1, main routing
table version 1
Neighbor
V
AS
MsgRcvd MsgSent
TblVer
InQ OutQ
Up/Down
22.1.1.1
4
1
34
34
1
0
0
00:19:07
44.1.1.1
4
1
33
32
1
0
0
00:19:10
在
BGP
进程下建立
MP-
BGP
关系
R1
:
router bgp 1
address-family vpnv4
neighbor 33.1.1.1 activate
neighbor
33.1.1.1 send-community extended
exit-address-family
R3
router bgp 1
address-family vpnv4
neighbor 22.1.1.1 activate
neighbor
22.1.1.1 send-community extended
neighbor 22.1.1.1 route-
reflector-client
neighbor 44.1.1.1 activate
neighbor 44.1.1.1 send-
community extended
neighbor 44.1.1.1 route-reflector-
client
exit-address-family
R3#sh ip bgp vpnv4 all su
BGP router identifier 33.1.1.1, local
AS number 1
BGP table version is 5,
main routing table version 5
4 network
entries using 624 bytes of memory
4
path entries using 272 bytes of memory
5/4 BGP path/bestpath attribute entries
using 740 bytes of memory
2 BGP
extended community entries using 80 bytes of
memory
0 BGP route-map cache entries
using 0 bytes of memory
0 BGP filter-
list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at
peak 1) using 32 bytes of memory
BGP
using 1748 total bytes of memory
State/PfxRcd
0
0
BGP
activity 4/0 prefixes, 4/0 paths, scan interval 15
secs
Neighbor
V
AS MsgRcvd
MsgSent
TblVer
InQ OutQ Up/Down
State/PfxRcd
22.1.1.1
4
1
37
37
5
0
0 00:21:52
2
44.1.1.1
4
1
36
35
5
0
0 00:21:55
2
步骤
5
、<
/p>
PE
与
CE
的邻
居以及重分布
CE
运行标准的
ospf
CE1#
router ospf 1
log-adjacency-changes
network 11.1.1.1 0.0.0.0
area 0
network 12.1.1.1
0.0.0.0 area 0
PE
上
PE1#
router ospf 1 vrf
YESLAB
log-adjacency-
changes
redistribute bgp 1
subnets
network 12.1.1.2
0.0.0.0 area 0
PE1#sh ip os nei
Neighbor ID
Pri
State
Dead Time
Address
Interface
11.1.1.1
0
FULL/
-
00:00:36
12.1.1.1
Serial2/0
PE1
Router bgp 1
address-family ipv4 vrf YESLAB
redistribute
ospf 1 vrf YESLAB match internal external 1
external 2
no
synchronization
exit-
address-family
----
< br>缺省情况下只重分步
ospf
的内部路由,诸如如果
p>
CE
有外部路由,切记加上
externa
l
参
数
PE1#sh ip bgp vpnv4 all
BGP table version is 9, local router ID
is 22.1.1.1
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
Route Distinguisher: 100:1 (default for
vrf YESLAB)
*> 11.1.1.1/32
12.1.1.1
65
32768 ?
*> 12.1.1.0/24
0.0.0.0
0
32768 ?
*>i45.1.1.0/24
44.1.1.1
0
100
0 ?
*>i55.1.1.1/32
44.1.1.1
65
100
0 ?
PE1#sh ip route vrf YESLAB
-
-
-
-
-
-
-
-
-
上一篇:流固耦合计算实例
下一篇:Quicker 使用说明