华为MPLS 虚拟专网 Option A 配置实验

MPLS Option A 配置实验

拓扑图及IP地址规划如图所示:

在这里插入图片描述
本例采用OptionA方式实现。配置主要思路是:

  1. 各AS内的MPLS骨干网上分别配置IGP协议,实现各自骨干网ASBR-PE和PE之间的互通。
  2. 各AS内的MPLS骨干网上分别配置MPLS基本能力和MPLS LDP,建立LDP LSP。
  3. 各AS内,PE与ASBR-PE之间建立MP-IBGP对等体关系,交换VPN路由信息。
  4. 各AS内,与CE相连的PE上需配置VPN实例,并把与CE相连的接口和相应的VPN实例绑定。
  5. 各AS内,PE与CE之间建立EBGP对等体关系,交换VPN路由信息。
  6. 在两个ASBR-PE上创建VPN实例,并将此实例绑定到连接另一个ASBR-PE的接口(把一个ASBR-PE当成是自己的CE),并在ASBR-PE之间建立EBGP对等体关系传递VPN路由信息。

CE1配置(CE2配置类似)

CE1:
bgp 100
 peer 100.0.0.2 as-number 230  //与对端PE设备建立邻居
 import-route direct //引入直连路由
#

PE1配置(PE2配置类似)

PE1:
ip vpn-instance A // 创建实例
 ipv4-family
  route-distinguisher 100:1  //设置RD值,区分重叠路由
  vpn-target 230:100 export-extcommunity  //设置出方向RT值
  vpn-target 100:230 import-extcommunity  //设置入方向RT值
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance A  //端口绑定实例
 ip address 100.0.0.2 255.255.255.0 
#
bgp 230
 peer 2.2.2.2 as-number 230 //与自治系统内的ASBR-PE设备建立邻居
 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  //激活ASBR-PE邻居
 #
 ipv4-family vpn-instance A  //在实例下与对端CE设备建立邻居
  peer 100.0.0.1 as-number 100 
#

ASBR-PE1配置(ASBR-PE2配置类似)

ip vpn-instance A  创建实例
 ipv4-family
  route-distinguisher 230:1  //设置RD值,区分重叠路由

  vpn-target 100:230 export-extcommunity  //设置出方向RT值!注意与本自治系统PE上的实例入方向RT值匹配

  vpn-target 230:100 import-extcommunity  //设置入方向RT值!注意与本自治系统PE上的实例出方向RT值匹配
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance A   //在与对端ASBR相连的端口上绑定实例
 ip address 23.0.0.2 255.255.255.0 
#
bgp 230
 peer 1.1.1.1 as-number 230    //与自治系统内的PE设备建立VPNV4邻居
 peer 1.1.1.1 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  //激活PE邻居
 #
 ipv4-family vpn-instance A   //在实例下与对端ASBR设备建立邻居
  peer 23.0.0.3 as-number 450 
#

在PE1上检查

在这里插入图片描述
可以看到PE与CE之间的BGP对等体关系已建立。
在这里插入图片描述
可以看到PE与CE之间、PE与ASBR-PE之间的BGP对等体关系已建立。
在这里插入图片描述
查看BGP维护的所有路由

在CE设备上验证

在这里插入图片描述
可以看到到达对端CE设备的路由
在这里插入图片描述
本地私网可以ping通对端私网

猜你喜欢

转载自blog.csdn.net/m0_46674735/article/details/108376807