要求:全网通
部分代码
- isp
- ip可达
- 建立bgp邻居关系
- 启用mp-bgp 也就是mpls
- bgp传递社团属性
[r2]bgp 100
[r2-bgp]ipv4-family vpnv4
[r2-bgp-af-vpnv4]peer 5.5.5.5 enable
[r2-bgp-af-vpnv4]peer 5.5.5.5 next-hop-local
- 在pe上创建虚拟空间
[r2]ip vpn-instance 1
[r2-vpn-instance-1]route-distinguisher 1:1
[r2-vpn-instance-1-af-ipv4]vpn-target 1:1 export-extcommunity
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r2-vpn-instance-1-af-ipv4]vpn-target 2:2 import-extcommunity
IVT Assignment result:
Info: VPN-Target assignment is successful.
绑定在连接ce的接口
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]undo ip address
[r2-GigabitEthernet0/0/0]ip binding vpn-instance 1
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
pe上进行rip宣告
在ce端正常启动rip
[r8]rip 1 vpn-instance 3
[r8-rip-1]version 2
[r8-rip-1]network 12.0.0.0
ospf
[r7]ospf 2 vpn-instance 2
[r7-ospf-2]area 0
[r7-ospf-2-area-0.0.0.0]network 57.1.1.2 0.0.0.0
双向重发布
[r8]bgp 100
[r8-bgp]ipv4-family vpn-instance 3
[r8-bgp-1]import-route rip 3
[r8]rip 1 vpn-instance 3
[r8-rip-1]import-route bgp