发布时间 : 星期二 文章MPLS VPN 实验手册(cisco)更新完毕开始阅读
speed auto mpls ip !
router ospf 100 router-id 3.3.3.3
log-adjacency-changes
network 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 ! ! end
R3#
session-192.168.197.1 2003-20170116.log
R4:(PE2)
R4#
R4#show run
Building configuration... !
hostname R4 ! ip cef !
ip vrf vpna rd 1:1
route-target export 234:4 route-target import 234:2 !
mpls label range 400 499 mpls ldp router-id Loopback0 ! !
interface 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
redistribute 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 router-id 4.4.4.4
no bgp default ipv4-unicast bgp log-neighbor-changes neighbor 2.2.2.2 remote-as 234
neighbor 2.2.2.2 update-source Loopback0 !
address-family vpnv4 neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community 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
session-192.168.197.1 2004-20170116.log
R5:(CE2)
R5#
R5#show run
Building 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 auto !
router ospf 1 router-id 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 ! end
R5#
session-192.168.197.1 2005-20170116.log
三、相关检查命令:
1、R2#sh ip ospf neighbor //查PE的OSPF邻居
R2#sh ip ospf neighbor //查PE的OSPF邻居
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:30 10.1.23.3 FastEthernet0/1 1.1.1.1 1 FULL/BDR 00:00:30 10.1.12.1 FastEthernet0/0
2、R2#sh mpls ldp neighbor //查PE上的MPLS邻居信息
R2#sh 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 discovery 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、R2#sh mpls forwarding-table //查PE上的MPLS标签转发表
R2#sh mpls forwarding-table //查PE上的MPLS标签转发表
Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 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/32[V] 3138 Fa0/0 10.1.12.1 204 Aggregate 10.1.12.0/24[V] 0 R2#