MPLS VPN-跨域OptionA

拓扑图

配置

Option A把对方AS当做CE处理

配置VRF

配置接口IP地址

配置ISIS

配置MPLS

配置MP-BGP,通告路由

Tips:如果ASBR之间既需要建立IPv4的BGP邻居,又要建立VPN实例下的BGP邻居,如图中ASBR间(AR3和AR4)只有一根线的情况下,需启用子接口,一个子接口建立IPv4的BGP邻居,一个子接口建立VPN实例下的BGP邻居。

sysname AR1
#
ip vpn-instance BJ-A
 ipv4-family
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:43 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0001.00
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance BJ-A
 ip address 10.0.1.254 255.255.255.0 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
 isis enable 1
#
bgp 100
 undo default ipv4-unicast
 peer 3.3.3.3 as-number 100 
 peer 3.3.3.3 connect-interface LoopBack0
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 3.3.3.3 enable
 #
 ipv4-family vpn-instance BJ-A 
  network 10.0.1.0 255.255.255.0 
#
sysname AR2
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0002.00
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.2 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 23.1.1.2 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
 isis enable 1
#
sysname AR3
#
ip vpn-instance BJ-A
 ipv4-family
  route-distinguisher 100:3
  vpn-target 100:43 export-extcommunity
  vpn-target 100:1 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0003.00
#
interface GigabitEthernet0/0/0
 ip address 23.1.1.3 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance BJ-A
 ip address 34.1.1.3 255.255.255.0 
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
 isis enable 1
#
bgp 100
 undo default ipv4-unicast
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 connect-interface LoopBack0
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 1.1.1.1 enable
 #
 ipv4-family vpn-instance BJ-A 
  peer 34.1.1.4 as-number 200 
#
 sysname AR4
#
ip vpn-instance SH-A
 ipv4-family
  route-distinguisher 100:4
  vpn-target 100:34 export-extcommunity
  vpn-target 100:6 import-extcommunity
#
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0004.00
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance SH-A
 ip address 34.1.1.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 45.1.1.4 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
 isis enable 1
#
bgp 200
 undo default ipv4-unicast
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 6.6.6.6 enable
 #
 ipv4-family vpn-instance SH-A 
  peer 34.1.1.3 as-number 100 
#
sysname AR5
#
mpls lsr-id 5.5.5.5
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0005.00
#
interface GigabitEthernet0/0/0
 ip address 45.1.1.5 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 56.1.1.5 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.255 
 isis enable 1
#
sysname AR6
#
ip vpn-instance SH-A
 ipv4-family
  route-distinguisher 100:6
  vpn-target 100:6 export-extcommunity
  vpn-target 100:34 import-extcommunity
#
mpls lsr-id 6.6.6.6
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0006.00
#
interface GigabitEthernet0/0/0
 ip address 56.1.1.6 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance SH-A
 ip address 10.0.2.254 255.255.255.0 
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.255 
 isis enable 1
#
bgp 200
 undo default ipv4-unicast
 peer 4.4.4.4 as-number 200 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 4.4.4.4 enable
 #
 ipv4-family vpn-instance SH-A 
  network 10.0.2.0 255.255.255.0 
#

查看MP-BGP邻居关系

查看BGP路由

PC1访问PC2,查看路径

AR1上查看路径,可以看到ASBR之间不带MPLS标签,VPNv4邻居之间传递带2层标签

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值