MPLS VP恩 后门链路shamlink
- 一、shamlink实验
- 1.拓扑
- 2.CE1配置
- 3.PE1配置
- 4.P1配置
- 5.P2配置
- 6.PE2配置
- 7.CE2配置
- 二、实验论证
一、shamlink实验
1.拓扑
2.CE1配置
sysname CE1interface GigabitEthernet0/0/0ip address 172.16.1.1 255.255.255.0 interface GigabitEthernet0/0/1ip address 12.1.1.1 255.255.255.0 ospf cost 10interface LoopBack0ip address 1.1.5.5 255.255.255.0 ospf 1 area 0.0.0.0 network 1.1.5.5 0.0.0.0 network 12.1.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255
[CE1]
3.PE1配置
sysname PE1ip vpn-instance vpnaipv4-familyroute-distinguisher 100:1vpn-target 100:1 export-extcommunityvpn-target 100:1 import-extcommunitympls lsr-id 10.1.1.1
mpls mpls ldpinterface GigabitEthernet0/0/0ip binding vpn-instance vpnaip address 172.16.1.2 255.255.255.0
interface GigabitEthernet0/0/1ip address 10.1.12.1 255.255.255.0 mplsmpls ldp interface LoopBack0ip address 10.1.1.1 255.255.255.0 interface LoopBack1ip binding vpn-instance vpnaip address 1.1.1.1 255.255.255.255 bgp 100peer 10.1.4.4 as-number 100 peer 10.1.4.4 connect-interface LoopBack0ipv4-family unicastundo synchronizationpeer 10.1.4.4 enableipv4-family vpnv4policy vpn-targetpeer 10.1.4.4 enableipv4-family vpn-instance vpna network 1.1.1.1 255.255.255.255 import-route ospf 2ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.1.12.0 0.0.0.255
ospf 2 vpn-instance vpnaimport-route bgparea 0.0.0.0 network 172.16.1.0 0.0.0.255 sham-link 1.1.1.1 4.4.4.4
4.P1配置
sysname P1mpls lsr-id 10.1.2.2
mplsmpls ldpinterface GigabitEthernet0/0/0ip address 10.1.12.2 255.255.255.0 mplsmpls ldpinterface GigabitEthernet0/0/1ip address 10.1.23.2 255.255.255.0 mplsmpls ldpinterface LoopBack0ip address 10.1.2.2 255.255.255.0 ospf 1 area 0.0.0.0 network 10.1.2.2 0.0.0.0 network 10.1.12.0 0.0.0.255 network 10.1.23.0 0.0.0.255
5.P2配置
sysname P2mpls lsr-id 10.1.3.3
mplsmpls ldpinterface GigabitEthernet0/0/0ip address 10.1.23.3 255.255.255.0 mplsmpls ldp
interface GigabitEthernet0/0/1ip address 10.1.34.3 255.255.255.0 mplsmpls ldpinterface LoopBack0ip address 10.1.3.3 255.255.255.0
ospf 1 area 0.0.0.0 network 10.1.3.3 0.0.0.0 network 10.1.23.0 0.0.0.255 network 10.1.34.0 0.0.0.255
6.PE2配置
sysname PE2ip vpn-instance vpnaipv4-familyroute-distinguisher 100:1vpn-target 100:1 export-extcommunityvpn-target 100:1 import-extcommunitympls lsr-id 10.1.4.4
mpls mpls ldpinterface GigabitEthernet0/0/0ip address 10.1.34.4 255.255.255.0 mplsmpls ldp
interface GigabitEthernet0/0/1ip binding vpn-instance vpnaip address 172.16.2.2 255.255.255.0 interface LoopBack0ip address 10.1.4.4 255.255.255.0
interface LoopBack1ip binding vpn-instance vpnaip address 4.4.4.4 255.255.255.255
bgp 100peer 10.1.1.1 as-number 100 peer 10.1.1.1 connect-interface LoopBack0ipv4-family unicastundo synchronizationpeer 10.1.1.1 enableipv4-family vpnv4policy vpn-targetpeer 10.1.1.1 enableipv4-family vpn-instance vpna network 4.4.4.4 255.255.255.255 import-route ospf 2
ospf 1 area 0.0.0.0 network 10.1.4.4 0.0.0.0 network 10.1.34.0 0.0.0.255
ospf 2 vpn-instance vpnaimport-route bgparea 0.0.0.0 network 172.16.2.0 0.0.0.255 sham-link 4.4.4.4 1.1.1.1
7.CE2配置
sysname CE2interface GigabitEthernet0/0/0ip address 172.16.2.1 255.255.255.0
interface GigabitEthernet0/0/1ip address 12.1.1.2 255.255.255.0 ospf cost 3
interface LoopBack0ip address 1.1.6.6 255.255.255.0
ospf 1 area 0.0.0.0 network 1.1.6.6 0.0.0.0 network 12.1.1.0 0.0.0.255 network 172.16.2.0 0.0.0.255
二、实验论证