华为mpls vpn跨域方案A
R1
ip vpn-instance a
ipv4-family
route-distinguisher 1:1
vpn-target 100:100 export-extcommunity
vpn-target 100:100 import-extcommunity
mpls lsr-id 1.1.1.1
mpls
mpls ldp
interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip binding vpn-instance a
ip address 10.0.17.1 255.255.255.0
ospf enable 2 area 0.0.0.0
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
bgp 100
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.2 enable
ipv4-family vpn-instance a
import-route ospf 2
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
ospf 2 vpn-instance a
import-route bgp
area 0.0.0.0
R2
mpls lsr-id 2.2.2.2
mpls
mpls ldp
interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip address 10.0.23.2 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
peer 1.1.1.1 reflect-client
peer 3.3.3.3 enable
peer 3.3.3.3 reflect-client
ipv4-family vpnv4
undo policy vpn-target
peer 1.1.1.1 enable
peer 1.1.1.1 reflect-client
peer 3.3.3.3 enable
peer 3.3.3.3 reflect-client
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
R3:
ip vpn-instance a
ipv4-family
route-distinguisher 1:1
vpn-target 100:100 export-extcommunity
vpn-target 100:100 import-extcommunity
mpls lsr-id 3.3.3.3
mpls
mpls ldp
interface GigabitEthernet0/0/0
ip address 10.0.23.3 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip binding vpn-instance a
ip address 10.0.34.3 255.255.255.0
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
bgp 100
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.2 enable
ipv4-family vpn-instance a
peer 10.0.34.4 as-number 200
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
R4
ip vpn-instance a
ipv4-family
route-distinguisher 1:1
vpn-target 100:100 export-extcommunity
vpn-target 100:100 import-extcommunity
mpls lsr-id 4.4.4.4
mpls
mpls ldp
interface GigabitEthernet0/0/0
ip binding vpn-instance a
ip address 10.0.34.4 255.255.255.0
interface GigabitEthernet0/0/1
ip address 10.0.41.4 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
bgp 200
peer 10.10.10.10 as-number 200
peer 10.10.10.10 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 10.10.10.10 enable
ipv4-family vpnv4
policy vpn-target
peer 10.10.10.10 enable
ipv4-family vpn-instance a
peer 10.0.34.3 as-number 100
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.0.41.4 0.0.0.0
R7
router id 7.7.7.7
interface GigabitEthernet0/0/0
ip address 10.0.17.7 255.255.255.0
ospf enable 1 area 0.0.0.0
interface LoopBack0
ip address 7.7.7.7 255.255.255.255
ospf enable 1 area 0.0.0.0
ospf 1
area 0.0.0.0
R10
mpls lsr-id 10.10.10.10
mpls
mpls ldp
interface GigabitEthernet0/0/0
ip address 10.0.41.10 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip address 10.0.111.10 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 10.10.10.10 255.255.255.255
bgp 200
peer 4.4.4.4 as-number 200
peer 4.4.4.4 connect-interface LoopBack0
peer 11.11.11.11 as-number 200
peer 11.11.11.11 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 4.4.4.4 enable
peer 11.11.11.11 enable
ipv4-family vpnv4
undo policy vpn-target
peer 4.4.4.4 enable
peer 4.4.4.4 reflect-client
peer 11.11.11.11 enable
peer 11.11.11.11 reflect-client
ospf 1
area 0.0.0.0
network 10.0.41.10 0.0.0.0
network 10.0.111.10 0.0.0.0
network 10.10.10.10 0.0.0.0
R11
ip vpn-instance a
ipv4-family
route-distinguisher 1:1
vpn-target 100:100 export-extcommunity
vpn-target 100:100 import-extcommunity
mpls lsr-id 11.11.11.11
mpls
mpls ldp
interface GigabitEthernet0/0/0
ip address 10.0.111.11 255.255.255.0
mpls
mpls ldp
interface GigabitEthernet0/0/1
ip binding vpn-instance a
ip address 10.0.112.1 255.255.255.0
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 11.11.11.11 255.255.255.255
bgp 200
peer 10.10.10.10 as-number 200
peer 10.10.10.10 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 10.10.10.10 enable
ipv4-family vpnv4
policy vpn-target
peer 10.10.10.10 enable
ipv4-family vpn-instance a
import-route ospf 2
ospf 1
area 0.0.0.0
network 10.0.111.11 0.0.0.0
network 11.11.11.11 0.0.0.0
ospf 2 vpn-instance a
import-route bgp
area 0.0.0.0
network 10.0.112.1 0.0.0.0
R12
interface GigabitEthernet0/0/0
ip address 10.0.112.2 255.255.255.0
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2
interface NULL0
interface LoopBack0
ip address 12.12.12.12 255.255.255.255
ospf 1
area 0.0.0.0
network 10.0.112.2 0.0.0.0
network 12.12.12.12 0.0.0.0
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!