1、MPLS VPN 实验手册ciscoMPLS VPN 实验一、拓朴图说明:1、设备接互联地址:如R1与R2间的互联地址为10.1。12。0/24;LOOKBACK接口地址为:1。1。1。1/32;2、CORE内运行OSPF(进行号100,area 0),激活MPLS;3、PE上创建VRF(VPNA),PE与CE间通过OSPF互联(进程号:1);4、R2与R4两台PE间建立MP-IBGP邻接关系,(BGP AS234)5、完成PECE间的路由重发布;二、配置信息:R1:(CE1)R1#show run!hostname R1!ip cef!interface Loopback0 ip addre
2、ss 1。1.1.1 255.255.255。255 ip ospf network pointtopoint!interface FastEthernet0/0 ip address 10。1.12。1 255。255。255。0 duplex auto speed auto mpls ip!interface FastEthernet0/1 no ip address shutdown duplex auto speed auto!router ospf 1 routerid 1。1.1。1 logadjacency-changes network 1。1。1.1 0。0.0。0 area
3、 0 network 10.1.12.1 0.0.0.0 area 0!endR1 R2:(PE1)R2R2#show run!hostname R2!ip cef!ip vrf vpna rd 1:1 routetarget export 234:2 route-target import 234:4!mpls label range 200 299mpls ldp router-id Loopback0!!interface Loopback0 ip address 2.2。2。2 255.255。255。255!interface FastEthernet0/0 ip vrf forwa
4、rding vpna ip address 10.1.12.2 255.255。255。0 duplex auto speed auto!interface FastEthernet0/1 ip address 10.1.23。2 255。255。255。0 duplex auto speed auto mpls ip!router ospf 1 vrf vpna logadjacencychanges redistribute bgp 234 subnets network 10。1.12.2 0。0.0.0 area 0!router ospf 100 routerid 2.2。2.2 l
5、og-adjacency-changes network 2.2。2。2 0.0。0。0 area 0 network 10.1。23.2 0.0。0.0 area 0!router bgp 234 bgp router-id 2。2。2.2 no bgp default ipv4-unicast bgp log-neighbor-changes neighbor 4.4。4。4 remote-as 234 neighbor 4。4。4.4 update-source Loopback0 ! address-family vpnv4 neighbor 4.4。4。4 activate neig
6、hbor 4。4。4。4 send-community extended exit-addressfamily ! addressfamily ipv4 vrf vpna redistribute ospf 1 vrf vpna match internal external 1 external 2 no autosummary no synchronization exit-address-family!end R2 R3:(P)R3R3#show run!hostname R3!ip cef!mpls label range 300 399mpls ldp router-id Loopb
7、ack0!interface Loopback0 ip address 3.3。3。3 255.255。255。255!interface FastEthernet0/0 ip address 10。1.23。3 255.255。255。0 duplex auto speed auto mpls ip!interface FastEthernet0/1 ip address 10。1.34。3 255。255。255。0 duplex auto speed auto mpls ip!router ospf 100 router-id 3.3。3.3 logadjacency-changes n
8、etwork 3。3.3.3 0。0。0.0 area 0 network 10.1.23.3 0.0.0。0 area 0 network 10.1.34.3 0.0.0.0 area 0!!endR3 R4:(PE2)R4#R4show runBuilding configuration.。.!hostname R4!ip cef!ip vrf vpna rd 1:1 routetarget export 234:4 routetarget import 234:2!mpls label range 400 499mpls ldp router-id Loopback0!!interfac
9、e Loopback0 ip address 4.4.4.4 255.255.255.255!interface FastEthernet0/0 ip address 10。1.34。4 255。255。255。0 duplex auto speed auto mpls ip!interface FastEthernet0/1 ip vrf forwarding vpna ip address 10。1。45。4 255.255.255.0 duplex auto speed auto!router ospf 1 vrf vpna log-adjacency-changes redistrib
10、ute bgp 234 subnets network 10.1。45。4 0.0。0。0 area 0!router ospf 100 router-id 4。4。4.4 log-adjacency-changes network 4.4.4.4 0.0.0.0 area 0 network 10。1。34。4 0。0。0.0 area 0!router bgp 234 bgp routerid 4。4。4。4 no bgp default ipv4-unicast bgp log-neighborchanges neighbor 2.2.2。2 remoteas 234 neighbor
11、2.2.2。2 update-source Loopback0 ! addressfamily vpnv4 neighbor 2.2.2。2 activate neighbor 2.2.2.2 sendcommunity extended exit-address-family ! address-family ipv4 vrf vpna redistribute ospf 1 vrf vpna match internal external 1 external 2 no auto-summary no synchronization exit-address-family!end R5:(
12、CE2)R5#R5show runBuilding configuration.。.!hostname R5!ip cef!interface Loopback0 ip address 5.5.5.5 255.255。255.0 ip ospf network point-to-point!interface FastEthernet0/0 ip address 10。1.45.5 255。255.255.0 duplex auto speed auto!interface FastEthernet0/1 no ip address shutdown duplex auto speed aut
13、o!router ospf 1 routerid 5。5.5.5 log-adjacency-changes network 5.5。5。5 0.0.0。0 area 0 network 10。1.45。5 0.0.0.0 area 0!endR5 三、相关检查命令:1、R2sh ip ospf neighbor /查PE的OSPF邻居R2#sh ip ospf neighbor /查PE的OSPF邻居Neighbor ID Pri State Dead Time Address Interface3。3.3.3 1 FULL/DR 00:00:30 10。1.23.3 FastEtherne
14、t0/11。1。1.1 1 FULL/BDR 00:00:30 10。1。12.1 FastEthernet0/02、R2sh mpls ldp neighbor /查PE上的MPLS邻居信息R2sh mpls ldp neighbor /查PE上的MPLS邻居信息 Peer LDP Ident: 3。3。3.3:0; Local LDP Ident 2.2.2。2:0 TCP connection: 3。3。3.3。19951 2.2.2。2.646 State: Oper; Msgs sent/rcvd: 11/11; Downstream Up time: 00:03:23 LDP di
15、scovery sources: FastEthernet0/1, Src IP addr: 10。1。23.3 Addresses bound to peer LDP Ident: 10。1。23.3 3.3.3.3 10.1。34。3 3、R2sh mpls forwarding-table /查PE上的MPLS标签转发表R2#sh mpls forwardingtable /查PE上的MPLS标签转发表Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interfac
16、e 200 Pop tag 10.1。34。0/24 0 Fa0/1 10。1.23.3 201 Pop tag 3。3.3。3/32 0 Fa0/1 10。1。23。3 202 300 4.4。4.4/32 0 Fa0/1 10。1.23。3 203 Untagged 1。1。1。1/32V 3138 Fa0/0 10。1.12。1 204 Aggregate 10。1。12。0/24V 0 R24、R2sh ip bgp vpnv4 all summary /查PE上的VPNV4邻居信息R2#sh ip bgp vpnv4 all summary /查PE上的VPNV4邻居信息:BGP r
17、outer identifier 2。2.2.2, local AS number 234BGP table version is 9, main routing table version 94 network entries using 548 bytes of memory4 path entries using 272 bytes of memory5/4 BGP path/bestpath attribute entries using 620 bytes of memory2 BGP extended community entries using 80 bytes of memo
18、ry0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 1520 total bytes of memoryBGP activity 4/0 prefixes, 4/0 paths, scan interval 15 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd4。4.4.4 4 234 19 19 9 0 0 00:
19、12:01 25、R2sh ip bgp vpnv4 all /查PE上的VPNV4路由信息,可判断路由重发布是否正确R2sh ip bgp vpnv4 all /查PE上的VPNV4路由信息,可判断路由重发布是否正确BGP table version is 9, local router ID is 2.2.2。2Status codes: s suppressed, d damped, h history, valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e EGP, ? incomplete
20、Network Next Hop Metric LocPrf Weight PathRoute Distinguisher: 1:1 (default for vrf vpna)* 1.1。1.1/32 10。1.12.1 2 32768 ?i5.5.5.0/24 4.4.4。4 2 100 0 ? 10.1。12.0/24 0.0。0.0 0 32768 ?*i10。1.45.0/24 4。4.4。4 0 100 0 ?6、R2sh ip ro vrf vpna /查看VRF下的路由表信息R2#sh ip ro vrf vpna /查看VRF下的路由表信息Routing Table: vpn
21、aCodes: 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 - ISIS, su - ISIS summary, L1 ISIS level-1, L2 ISIS level-2 ia IS-IS in
22、ter area, * - candidate default, U - per-user static route o ODR, P - periodic downloaded static routeGateway of last resort is not set 1。0。0。0/32 is subnetted, 1 subnetsO 1。1。1。1 110/2 via 10。1。12.1, 00:17:52, FastEthernet0/0 5。0.0。0/24 is subnetted, 1 subnetsB 5。5.5.0 200/2 via 4.4.4.4, 00:17:02 1
23、0.0.0.0/24 is subnetted, 2 subnetsC 10.1。12.0 is directly connected, FastEthernet0/0B 10。1。45.0 200/0 via 4。4.4。4, 00:17:02R27、R2#sh ip cef /查看CEF表R2sh ip cef /查看CEF表Prefix Next Hop Interface0.0.0.0/0 drop Null0 (default route handler entry)0.0.0.0/32 receive2。2.2.2/32 receive3.3。3.3/32 10。1.23。3 Fa
24、stEthernet0/14。4。4.4/32 10.1。23.3 FastEthernet0/110。1.23。0/24 attached FastEthernet0/110.1。23。0/32 receive10.1。23。2/32 receive10.1。23。3/32 10。1。23。3 FastEthernet0/110。1。23.255/32 receive10。1。34.0/24 10。1.23。3 FastEthernet0/1224。0.0.0/4 drop224。0.0。0/24 receive255。255.255.255/32 receiveR28、R1#ping 5。
25、5。5。5 source 1.1。1。1 /在CE1上带源地址拼CE2R1ping 5.5。5。5 source 1.1.1。1 /在CE1上带源地址拼CE2Type escape sequence to abort。Sending 5, 100-byte ICMP Echos to 5。5。5。5, timeout is 2 seconds:Packet sent with a source address of 1。1.1。1 !9、R1traceroute 5.5.5。5 source 1。1。1.1 /在CE1上带源地址路由跟踪CE2R1traceroute 5.5。5。5 sourc
26、e 1.1。1。1 /在CE1上带源地址路由跟踪CE2Type escape sequence to abort。Tracing the route to 5。5。5。5 1 10.1。12。2 128 msec 188 msec 196 msec 2 10.1。23.3 MPLS: Labels 300/403 Exp 0 664 msec 600 msec 616 msec 3 10。1。45。4 MPLS: Label 403 Exp 0 372 msec 408 msec 560 msec 4 10.1.45。5 624 msec 764 msec 576 msecR1#10、R1sh
27、ow ip ospf neighbor /查看CE1上的OSPF邻居表R1show ip ospf neighbor /查看CE1上的OSPF邻居表Neighbor ID Pri State Dead Time Address Interface10。1.12。2 1 FULL/DR 00:00:38 10。1。12.2 FastEthernet0/0R111、R1#sh ip ro /查CEF上的路由表R1#sh ip ro /查CEF上的路由表Codes: C connected, S - static, R - RIP, M mobile, B - BGP D - EIGRP, EX -
28、 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 - ISIS summary, L1 IS-IS level1, L2 - IS-IS level2 ia IS-IS inter area, * candidate default, U - peruser static route o - ODR, P p
29、eriodic downloaded static routeGateway of last resort is not set 1。0。0.0/32 is subnetted, 1 subnetsC 1.1.1。1 is directly connected, Loopback0 5.0.0.0/24 is subnetted, 1 subnetsO IA 5。5.5.0 110/3 via 10。1.12.2, 00:02:00, FastEthernet0/0 10。0.0。0/24 is subnetted, 2 subnetsC 10.1.12.0 is directly connected, FastEthernet0/0O IA 10.1。45.0 110/2 via 10.1.12。2, 00:02:00, FastEthernet0/0R1
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2