mpls vpn OSPF配置

来源:互联网 发布:惠普spectre 13知乎 编辑:程序博客网 时间:2024/05/21 10:13

 sysname AR2


ip vpn-instance lab
 ipv4-family
  route-distinguisher 100:1
  vpn-target 100:25 export-extcommunity
  vpn-target 100:25 import-extcommunity
#
mpls lsr-id 10.1.2.2
mpls
#
mpls ldp


#
interface GigabitEthernet0/0/0
 ip binding vpn-instance lab
 ip address 10.1.12.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.1.23.1 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.1.2.2 255.255.255.255 
#
bgp 100
 undo default ipv4-unicast
 peer 10.1.5.5 as-number 100 
 peer 10.1.5.5 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.1.5.5 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 10.1.5.5 enable
 #
 ipv4-family vpn-instance lab 
  import-route ospf 10
#
ospf 1 router-id 10.1.2.2 
 area 0.0.0.10 
  network 0.0.0.0 255.255.255.255 
#
ospf 10 vpn-instance lab
 import-route bgp
 area 0.0.0.1 
  network 10.1.12.0 0.0.0.255 

sysname AR5


#
ip vpn-instance lab
 ipv4-family
  route-distinguisher 100:1
  vpn-target 100:25 export-extcommunity
  vpn-target 100:25 import-extcommunity
#
mpls lsr-id 10.1.5.5
mpls
#
mpls ldp


interface GigabitEthernet0/0/0
 ip address 10.1.45.2 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance lab
 ip address 10.1.56.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.1.5.5 255.255.255.255 
#
bgp 100
 undo default ipv4-unicast
 peer 10.1.2.2 as-number 100 
 peer 10.1.2.2 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.1.2.2 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 10.1.2.2 enable
 #
 ipv4-family vpn-instance lab 
  import-route ospf 10
#
ospf 1 router-id 10.1.5.5 
 area 0.0.0.10 
  network 0.0.0.0 255.255.255.255 
#
ospf 10 vpn-instance lab
 import-route bgp
 area 0.0.0.1 
  network 10.1.56.0 0.0.0.255 

1 0
原创粉丝点击