FAQ----CE6850交换机两个vpn(RT值相同):本地路由如何交叉

发布时间:  2016-10-23 浏览次数:  123 下载次数:  0
问题描述

CE6850交换机本地创建两个vpn,rt值互相包含,如何在本地实现两个vpn-instance里路由相互交叉

#
ip vpn-instance isp
 ipv4-family
  route-distinguisher 100:100
  vpn-target 100:100 export-extcommunity
  vpn-target 100:100 import-extcommunity
  vpn-target 200:200 import-extcommunity
#
ip vpn-instance zf-ipsec
 ipv4-family
  route-distinguisher 200:200
  import route-policy filter
  vpn-target 200:200 export-extcommunity
  vpn-target 200:200 import-extcommunity
  vpn-target 100:100 import-extcommunity
#

以上两个vpn-instance实例实现互相学习对方路由。

解决方案


需要在本地创建BGP进程,在BGP视图下的vpn-instance实例里引入import direct路由后,两个vpn路由才能正常交叉。

#
bgp 1000
#
ipv4-family unicast
  undo synchronization
   #
ipv4-family vpnv4
  policy vpn-target
 #
ipv4-family vpn-instance isp
  import-route direct      //引入本地路由
#                                       
 ipv4-family vpn-instance zf-ipsec
  import-route direct          //引入本地路由
#

查看路由如下:

[xx_xx-2F-B07_08-GT-CE6850-i2-1]display ip routing-table vpn-instance zf-ipsec
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: zf-ipsec
         Destinations : 4        Routes : 4       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       10.1.1.0/24  BGP     255  0           D   10.1.1.1        LoopBack10    //路由实现交叉学习
      10.1.1.1/32  BGP     255  0           D   127.0.0.1       InLoopBack0
       20.1.1.0/24  Direct  0    0           D   20.1.1.1        LoopBack20
       20.1.1.1/32  Direct  0    0           D   127.0.0.1       LoopBack20
[xx_xx-2F-B07_08-GT-CE6850-i2-1]

END