华为MPLS VPN应用场景之跨域VPN(OptionC方案1)

跨域VPN(OptionC方案1)

文章目录

  • 实验拓扑
  • 实验要求
  • OptionC方案1基本原理
  • 实验步骤
  • 实验配置
  • 路由访问过程分析
  • 数据访问过程分析
    一、实验拓扑
    在这里插入图片描述二、实验要求
    1.如图所示,某企业存在两个Site,计划采用MPLS VPN实现互联互通,但两个Site接入ISP的不同AS,故此需要采用跨域VPN实现互联。ISP经过考虑决定采用OptionC方案1实现客户的业务互联
    2.完成AS100,AS200 IGP,MPLS LDP的配置
    3.完成BGP IPv4单播邻居关系建立 AR5和AR9分别是AS100、AS200内的RR设备,PE设备、ASBR设备都需要与RR设备建立BGP IPv4单播邻居关系,ASBR之间也需要建立BGP IPv4邻居关系,且互联接口间需要开启MPLS
    4.AR3与AR6建立EBGP IPv4邻居关系
    5.所有BGP IPv4单播邻居关系之间都要使能标签IPv4路由交换功能
    6.宣告PE与RR的路由进入BGP并分发标签 在ASBR上宣告本区域内的PE与RR的loopback0接口路由进入BGP,并使能策略在向对端ASBR和本端RR传递路由时分配标签
    7.完成VPNv4邻居关系建立 PE1 需要与PE2 建立VPNv4邻居关系
    三、OptionC方案1基本原理
    通过建立AR2,AR7两台PE路由器之间的EBGP-VPNv4邻居关系来实现
    存在问题:
    1.路由问题:AR2没有去往AR7的路由
    2.标签问题:AR2上没有AR7的标签
    处理方式
    1.路由问题:通过AS域内建立IBGP邻居关系,在ASBR上宣告PE的loopback地址来实现(不能在PE本地宣告loopback接口实现,因为bgp中属性Next-hop中规则目的地址与下一跳相同路由不使用
    2.标签问题:BGP IPv4单播邻居关系之间都要使能标签IPv4路由交换功能,ASBR配置路由策略出方向分配标签
    四、实验步骤
    1.配置CE与PE之间的路由协议(EBGP,ISIS,OSPF)
    2.配置PE与RR反射器,ASBR与RR反射器的BGPIPv4邻居关系
    3.配置两台ASBR之间的BGP IPv4邻居关系
    4.所有BGP IPv4单播邻居关系之间都要使能标签IPv4路由交换功能
    5.ASBR设备配置路由策略,BGP使能路由策略
    五、实验配置
    1.AS100,AS200 底层IBG配置省略
    2.AS100,AS200 MPLS LDP配置省略
3.AR1配置
#
interface GigabitEthernet0/0/0
 ip address 172.16.12.1 255.255.255.0 
 #
interface LoopBack0
 ip address 172.16.1.1 255.255.255.255 
#
bgp 65001
 peer 172.16.12.2 as-number 100 #与PE建立EBGP-IPV4邻居关系
 #
 ipv4-family unicast
  undo synchronization
  network 172.16.1.1 255.255.255.255 #宣告本地loopback地址
  network 172.16.12.0 255.255.255.0 
  peer 172.16.12.2 enable
4.AR2 PE1配置
#
mpls
 lsp-trigger bgp-label-route
#
ip vpn-instance 1
 ipv4-family
  route-distinguisher 1:1
  vpn-target 1:2 export-extcommunity
  vpn-target 2:1 import-extcommunity
#
bgp 100
 peer 10.5.5.5 as-number 100 
 peer 10.5.5.5 connect-interface LoopBack0
 peer 10.7.7.7 as-number 200 
 peer 10.7.7.7 ebgp-max-hop 5    #与PE2建立BGP-VPNv4邻居,由于不是直连所以配置最大跳数
 peer 10.7.7.7 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.5.5.5 enable
  peer 10.5.5.5 label-route-capability  #使能标签IPv4路由交换功能
  undo peer 10.7.7.7 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 10.7.7.7 enable
 #
 ipv4-family vpn-instance 1 
  peer 172.16.12.1 as-number 65001 
#
5.RR配置
#
mpls
 lsp-trigger bgp-label-route
#
bgp 100
 peer 10.2.2.2 as-number 100 
 peer 10.2.2.2 connect-interface LoopBack0
 peer 10.3.3.3 as-number 100 
 peer 10.3.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.2.2.2 enable
  peer 10.2.2.2 reflect-client
  peer 10.2.2.2 label-route-capability
  peer 10.3.3.3 enable
  peer 10.3.3.3 reflect-client
  peer 10.3.3.3 label-route-capability
#
6.AR3路由器ASBR的配置
#
mpls
 lsp-trigger bgp-label-route
#
bgp 100
 peer 10.1.36.6 as-number 200 
 peer 10.5.5.5 as-number 100 
 peer 10.5.5.5 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 10.2.2.2 255.255.255.255 
  peer 10.1.36.6 enable
  peer 10.1.36.6 route-policy lable1 export  #出方向使能路由策略
  peer 10.1.36.6 label-route-capability
  peer 10.5.5.5 enable
  peer 10.5.5.5 route-policy lable1 export
  peer 10.5.5.5 label-route-capability
#
route-policy lable1 permit node 10     #匹配路由打上mpls标签
 apply mpls-label
#

6.AR6路由器ASBR的配置
#
mpls
 lsp-trigger bgp-label-route
#
bgp 200
 peer 10.1.36.3 as-number 100 
 peer 10.9.9.9 as-number 200 
 peer 10.9.9.9 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 10.7.7.7 255.255.255.255 
  peer 10.1.36.3 enable
  peer 10.1.36.3 route-policy lable1 export
  peer 10.1.36.3 label-route-capability
  peer 10.9.9.9 enable
  peer 10.9.9.9 route-policy lable1 export
  peer 10.9.9.9 label-route-capability
#
route-policy lable1 permit node 10 
 apply mpls-label
#
7.AR9 RR路由器配置
#
mpls
 lsp-trigger bgp-label-route
#
bgp 200
 peer 10.6.6.6 as-number 200 
 peer 10.6.6.6 connect-interface LoopBack0
 peer 10.7.7.7 as-number 200 
 peer 10.7.7.7 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.6.6.6 enable
  peer 10.6.6.6 reflect-client
  peer 10.6.6.6 label-route-capability
  peer 10.7.7.7 enable
  peer 10.7.7.7 reflect-client
  peer 10.7.7.7 label-route-capability
#
8.AR7 PE设备配置
#
mpls
 lsp-trigger bgp-label-route
#
bgp 200
 peer 10.2.2.2 as-number 100 
 peer 10.2.2.2 ebgp-max-hop 5 
 peer 10.2.2.2 connect-interface LoopBack0
 peer 10.9.9.9 as-number 200 
 peer 10.9.9.9 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  undo peer 10.2.2.2 enable
  peer 10.9.9.9 enable
  peer 10.9.9.9 label-route-capability
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 10.2.2.2 enable
 #
 ipv4-family vpn-instance 2 
  import-route ospf 2               #ospf2与BGP互相引入
#
ospf 2 vpn-instance 2
 import-route bgp
 area 0.0.0.0 
  network 172.16.107.7 0.0.0.0 
#
9.AR10 CE设备配置
#
ospf 1 
 area 0.0.0.0 
  network 172.16.10.10 0.0.0.0 
  network 172.16.107.10 0.0.0.0 
#

10.可以查看AR2 BGP路由表发现有去往10.7.7.7有效的最优的路由
在这里插入图片描述11.可以查看AR2 mpls lsp表项发现有去往10.7.7.7的标签
在这里插入图片描述六、路由转发过程
在这里插入图片描述七、数据访问过程

1.AR10发送IP包给PE设备

2.PE设备封装IP包发送给AR8
在这里插入图片描述
3.AR8收到数据包替换公网标签(3)弹出
4.AR3收到数据包替换公网标签
在这里插入图片描述
5.AR2收到数据包拆除公网标签根据私网标签往实例转发

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值