MPLS show commads:
comands | Description |
show ip cef | 查看cef LIB |
show ip cef summary | |
show ip cef vrf XXX detail | |
show cef interface | |
show adjacency detail | |
show mpls interfaces | |
show mpls interfaces detail | |
show mpls forwarding-table | |
show mpls forwarding-table x.x.x.x detail | |
show mpls forwarding-table labels xx [detail] | |
show mpls ldp discovery | |
show mpls ldp neighbor | |
show mpls ldp bindings | |
show mpls ldp parameters | |
show ip vrf interfaces | |
show ip vrf detail xxx | |
show ip protocols vf xxx | |
show ip route vrf xxx | |
show ip eigrp vrf xxx interfaces | |
show ip eigrp vrf xxx neighbors | |
show ip eigrp vrf xxx topology | |
show ip eigrp vrf xxx traffic | |
show ip bgp vpnv4 vrf xxx labels | |
show ip pim mdt bgp |
Step 1: 配置IP地址与接口
Step 2:MPLS域启用IGP OPSF 协议
R3(config)#router ospf 1 R3(config-router)#network 10.10.3.3 0.0.0.0 area 0 R3(config-router)#network 1.1.34.3 0.0.0.0 area 0 R4(config)#router ospf 1 R4(config-router)#network 10.10.4.4 0.0.0.0 area 0 R4(config-router)#network 1.1.34.4 0.0.0.0 area 0 R4(config-router)#network 1.1.45.4 0.0.0.0 area 0 R5(config)#router ospf 1 R5(config-router)#network 1.1.45.5 0.0.0.0 area 0 R5(config-router)#network 10.10.5.5 0.0.0.0 area 0
且OSPF, Loopback 0 接口网络类型改成point-to-point
R1,R2,R3 interface loopback 0 ip ospf network point-to-point
R3#show ip route ospf 1.0.0.0/24 is subnetted, 2 subnets O 1.1.45.0 [110/128] via 1.1.34.4, 00:21:43, Serial1/2 10.0.0.0/24 is subnetted, 3 subnets O 10.10.4.0 [110/65] via 1.1.34.4, 00:22:27, Serial1/2 O 10.10.5.0 [110/129] via 1.1.34.4, 00:21:33, Serial1/2
Step 3: MPLS域内运行CEF, 相关接口开启MPLS转发, 修改MPLS的MTU 1512
R3(config)#ip cef R3(config)#interface s1/2 R3(config-if)#mpls ip R3(config-if)#mpls mtu 1512 R4(config)#ip cef R4(config-if)#interface s1/2 R4(config-if)#mpls ip R4(config-if)#mpls mtu 1512 R4(confg-if)#interface s1/0 R4(config-if)#mpls ip R4(config-if)#mpls mtu 1512 R5(config)#ip cef R5(config)#interface s1/0 R5(config-if)#mpls ip R5(config-if)#mpls mtu 1512
step 4: 配置PE-CE端的连接
R1(config)#router rip
R1(config-router)#no auto-summary
R1(config-router)#version 2
R1(config-router)#netwrok 1.0.0.0
R1(config-router)#network 10.0.0.0
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 1.1.23.2 0.0.0.0
R2(config-rotuer)#netwrok 10.10.2.2 0.0.0.0
R3(config)#ip vrf CompanyA
R3(config-vrf)#rd 1:1
R3(config-vrf)#router-target 1:1
R3(config)#interface s1/0
R3(config-if)#ip vrf forwarding CompanyA
% Interface Serial1/0 IP address 1.1.13.3 removed due to enabling VRF CompanyA
R3(config-if)#ip address 1.1.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 1.0.0.0
R3(config)#ip vrf CompanyB
R3(config-vrf)#rd 2:1
R3(config-vrf)#route-target 2:1
R3(config)#interface s1/1
R3(config-if)#ip vrf forwarding CompanyB
% Interface Serial1/1 IP address 1.1.23.3 removed due to enabling VRF CompanyB
R3(config-if)#ip address 1.1.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 1.1.23.3 0.0.0.0
R6(config)#router rip
R6(config-router)#no auto-summary
R6(config-router)#version 2
R6(config-router)#netwrok 1.0.0.0
R6(config-router)#network 10.0.0.0
R7(config)#router eigrp 1
R7(config-router)#no auto-summary
R7(config-router)#network 1.1.57.7 0.0.0.0
R7(config-router)#network 10.10.7.7 0.0.0.0
R5(config)#ip vrf ComapnyA
R5(config-vrf)#rd 1:1
R5(config-vrf)#route-target 1:1
R5(config)#interface s1/1
R5(config-if)#ip vrf forwarding CompanyA
% Interface Serial1/1 IP address 1.1.56.5 removed due to enabling VRF CompanyA
R5(config-if)#ip address 1.1.56.5 255.255.255.0
R5(config-if)#no shutdown
R5(config)#router rip
R5(config-router)#no auto-summary
R5(config-router)#version 2
R5(config-router)#address-family ipv4 vrf CompanyA
R5(config-router)#version 2
R5(config-router)#no auto-summary
R5(config-router)#network 1.0.0.0
R5(config)#ip vrf CompanyB
R5(config-vrf)#rd 2:1
R5(config-vrf)#route-target 2:1
R5(config)#interface s1/2
R5(config-if)#ip vrf forwarding CompanyB
% Interface Serial1/2 IP address 1.1.57.5 removed due to enabling VRF CompanyB
R5(config-if)#ip add 1.1.57.5 255.255.255.0
R5(config-if)#no shutdown
R5(config)#router eigrp 1
R5(config-router)#no auto-summary
R5(config-router)#address-family ipv4 vrf CompanyB
R5(config-router-af)#no auto-summary
R5(config-router-af)#network 1.1.57.5 0.0.0.0
Step 5: 创建MP-BGP路由用来传输VPNv4
R3(config)#router bgp 1
R3(config-router)#no auto-summary
R3(config-router)#no synchronization
R3(config-router)#neighbor 10.10.5.5 remote-as 1
R3(config-router)#neighbor 10.10.5.5 update-source loopback 0
R3(config-router)#address-family vpnv4
R3(config-router)#neighbor 10.10.5.5 active
R3(config-router)#neighbor 10.10.5.5 send-community
R5(config)#router bgp 1
R5(config-router)#no auto-summary
R5(config-router)#no synchronization
R5(config-router)#neighbor 10.10.3.3 remote-as 1
R5(config-router)#neighbor 10.10.3.3 update-source loopback 0
R5(config-router)#address-family vpnv4
R5(config-router)#neighbor 10.10.3.3 active
R5(config-router)#neighbor 10.10.3.3 send-community
Step 6: 相互重分布路由
R3(config)#router rip
R3(config-router)#address-family ipv4 vrf CompanyA
R3(config-router)#redistribute bgp 1 metric transparent
R3(config)#router bgp 1
R3(config-router)#address-family ipv4 vrf CompanyA
R3(config-router)#redistribute rip
R5(config)#router rip
R5(config-router)#address-family ipv4 vrf CompanyA
R5(config-router)#redistribute bgp 1 metric transparent
R5(config)#router bgp 1
R5(config-router)#address-family ipv4 vrf CompanyA
R5(config-router)#redistribute rip