MPLS跨域OptionC

不同AS的PE之间建立Multihop方式的EBGP连接,交换VPNv4路由

ASBR上不保存VPN-IPv4路由,相互之间也不通告VPN-IPv4路由

特点:

VPN路由在入口PE和出口PE之间直接交换,不需要中间设备的保存

VPN路由信息只出现在PE设备上,P和ASBR只负责报文转发,中间域设备可以不支持MPLS VPN业务,只需支持MPLS转发

更适合支持MPLS VPN的负载分担

维护一条端到端的PE连接管理代价比较大

传递路由给PE1

PE1:
ip vpn-instance 1
 ipv4-family
  route-distinguisher 1:1
  vpn-target 100:200 export-extcommunity
  vpn-target 100:100 import-extcommunity
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance 1
 ip address 192.168.1.1 255.255.255.0 
#
ospf 100 router-id 1.1.1.1 vpn-instance 1
 import-route bgp
 area 0.0.0.0 
  network 192.168.1.0 0.0.0.255 

PE2:
ip vpn-instance 1
 ipv4-family
  route-distinguisher 2:2
  vpn-target 100:100 export-extcommunity
  vpn-target 100:200 import-extcommunity
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance 1
 ip address 192.168.2.1 255.255.255.0 
 ospf enable 100 area 0.0.0.0
#
ospf 100 router-id 6.6.6.6 vpn-instance 1
 import-route bgp
 area 0.0.0.0 

 PE之间建立邻居

PE1:
bgp 100
 peer 3.3.3.3 as-number 100 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 ebgp-max-hop 255 
 peer 6.6.6.6 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 3.3.3.3 enable
  peer 6.6.6.6 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 6.6.6.6 enable
#

PE2:
bgp 200
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 ebgp-max-hop 255 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 4.4.4.4 as-number 200 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 1.1.1.1 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 1.1.1.1 enable

ASBR1:
bgp 100
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 34.1.1.4 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  import-route ospf 1
  peer 1.1.1.1 enable
  peer 34.1.1.4 enable

ASBR2:
bgp 200
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 peer 34.1.1.3 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  import-route ospf 1
  peer 6.6.6.6 enable
  peer 34.1.1.3 enable

 

 

 

 

 配置标签

ASBR1:
route-policy 1-2 permit node 10 
 apply mpls-label
#
route-policy 1-1 permit node 10 
 if-match mpls-label 
 apply mpls-label
#
interface GigabitEthernet0/0/1
 mpls
#
bgp 100
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 34.1.1.4 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  import-route ospf 1
  peer 1.1.1.1 enable
  peer 1.1.1.1 route-policy 1-1 export
  peer 1.1.1.1 label-route-capability
  peer 34.1.1.4 enable
  peer 34.1.1.4 route-policy 1-2 export
  peer 34.1.1.4 label-route-capability

ASBR2:
route-policy 2-2 permit node 10 
 if-match mpls-label 
 apply mpls-label
#
route-policy 2-1 permit node 10 
 apply mpls-label
#
interface GigabitEthernet0/0/1
 mpls
#
bgp 200
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 peer 34.1.1.3 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  import-route ospf 1
  peer 6.6.6.6 enable
  peer 6.6.6.6 route-policy 2-2 export
  peer 6.6.6.6 label-route-capability
  peer 34.1.1.3 enable
  peer 34.1.1.3 route-policy 2-1 export
  peer 34.1.1.3 label-route-capability

PE1:
bgp 100
 peer 3.3.3.3 as-number 100 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 ebgp-max-hop 255 
 peer 6.6.6.6 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 3.3.3.3 enable
  peer 3.3.3.3 label-route-capability
  peer 6.6.6.6 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 6.6.6.6 enable
 #
 ipv4-family vpn-instance 1 
  import-route ospf 100


PE2:
bgp 200
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 ebgp-max-hop 255 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 4.4.4.4 as-number 200 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 1.1.1.1 enable
  peer 4.4.4.4 enable
  peer 4.4.4.4 label-route-capability
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 1.1.1.1 enable
 #
 ipv4-family vpn-instance 1 
  import-route ospf 100

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值