目录
1.拓扑图
2.实验思路
3.主要配置
4.测试
5.实验总结
1.拓扑图
2.实验思路
-
IGP路由
-
MPLS Domain
-
配置MPLS VPN
-
PE之间的MP-BGP邻居关系
-
CE端与PE端的路由交换
-
双向重发布,实现路由共享
3.主要配置
R6:
*公网环境:
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 46.1.1.2 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 36.1.1.2 0.0.0.0
*MPLS Domain:
[r6]mpls lsr-id 6.6.6.6
[r6]mpls
[r6]mpls ldp
[r6]int GigabitEthernet 0/0/0
[r6-GigabitEthernet0/0/0]mpls
[r6-GigabitEthernet0/0/0] mpls ldp
*MPLS VPN:
[r6]ip vpn-instance a3
[r6-vpn-instance-a3]ipv4-family
[r6-vpn-instance-a3-af-ipv4]route-distinguisher 1:1
[r6-vpn-instance-a3-af-ipv4]vpn-target 1:1
[r6]int GigabitEthernet 0/0/2
[r6-GigabitEthernet0/0/2]ip binding vpn-instance a3
[r6-GigabitEthernet0/0/2]ip address 192.168.6.2 24
*MP-BGP:
[r6]bgp 2
[r6-bgp]router-id 6.6.6.6
[r6-bgp]peer 2.2.2.2 as-number 2
[r6-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r6-bgp]peer 2.2.2.2 next-hop-local
[r6-bgp]peer 5.5.5.5 as-number 2
[r6-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[r6-bgp]peer 5.5.5.5 next-hop-local
[r6-bgp]ipv4-family vpnv4
[r6-bgp-af-vpnv4]peer 2.2.2.2 enable
[r6-bgp-af-vpnv4]peer 5.5.5.5 enable
CE端与PE端的路由交换:
[r6]ospf 2 vpn-instance a3
[r6-ospf-2]area 0
[r6-ospf-2-area-0.0.0.0]network 192.168.6.0 0.0.0.255
[r6-ospf-2-area-0.0.0.0]network 192.168.5.0 0.0.0.255
[r6]bgp 2
[r6-bgp]ipv4 vpn-instance a3
[r6-bgp-a3]import-route ospf 2
[r6]ospf 2 vpn-instance a3
[r6-ospf-2]import-route bgp
4.测试







5.实验总结
根据实验配置思路完成实验配置,首先公网环境全网可达(ISP,MPLS Domain),然后在Edge LSR设备上配置MPLS VPN并且与私网之间的路由共享;需要注意的是MPLS VPN只能让所有公网之间完成通信,如果想要访问互联网,就必须重新有一条线路指向ISP。