组网如下图:
R5分别与R1 R8建立EBGP,使用的接口属于VPN1,R1 R8分别引入一个32位的100.100.100.100的直连路由,
R5的G0/1所属的接口为VPN2
关键配置:
以下只列出BGP的相关配置
R8
bgp 100
peer 7.7.7.7 as-number 100
peer 7.7.7.7 connect-interface LoopBack0
#
address-family vpnv4
peer 7.7.7.7 enable
#
ip vpn-instance vpn1
peer 10.1.1.1 as-number 65410
peer 10.3.1.1 as-number 65410
#
address-family ipv4 unicast
balance 32
import-route direct
peer 10.1.1.1 enable
peer 10.3.1.1 enable
#
ip vpn-instance vpn2
#
address-family ipv4 unicast
balance 2
R1
bgp 65410
router-id 100.100.100.100
peer 10.1.1.2 as-number 100
#
address-family ipv4 unicast
import-route direct
peer 10.1.1.2 enable
R2
bgp 65410
peer 10.3.1.2 as-number 100
#
address-family ipv4 unicast
import-route direct
peer 10.3.1.2 enable
现象:R5的VPN1实例的BGP路由表中有两条路由,下一跳分别是
10.1.1.1与10.3.1.1
[PE1]display bgp routing-table ipv4 vpn-instance vpn1
Total number of routes: 4
BGP local router ID is 5.5.5.5
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 10.1.1.0/24 10.1.1.1 0 0 65410?
* >e 10.3.1.0/24 10.3.1.1 0 0 65410?
* >e 100.100.100.100/32 10.1.1.1 0 0 65410?
* e 10.3.1.1 0 0 65410?
但是VPN2的BGP路由表中,只有一条100.100.100.100的路由
[PE1-bgp-default]dis bgp routing-table ipv4 vpn-instance vpn2
Total number of routes: 3
BGP local router ID is 5.5.5.5
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 10.1.1.0/24 10.1.1.1 0 0 65410?
* >e 10.3.1.0/24 10.3.1.1 0 0 65410?
* >e 100.100.100.100/32 10.1.1.1 0 0 65410?
默认情况下,BGP VPN路由引入的时候,只能选择最优路由
需要在VPN2的视图下开启vpn-route cross multipath
该命令是让VPN2能够学到所有来自VPN1的路由,PS:VPN2到底能不能学到VPN1的路由是看VPN1的EX RT与VPN2的IM RT是否一致
(4) 开启VPN引入等价路由功能。
vpn-route cross multipath
缺省情况下,VPN引入等价路由功能处于关闭状态,对于前缀和RD均相同的多条路由,只会将最优路由引入到VPN实例的路由表中。
BGP IPv4单播地址族视图和BGP IPv6单播地址族视图下配置本命令后,会将多条路由全部引入到公网实例的路由表中。公网实例的详细介绍,请参见“EVPN配置指导”中的“EVPN”。
解决方法:在BGP视图下开启如下命令
bgp 100
vpn-route cross multipath
peer 7.7.7.7 as-number 100
peer 7.7.7.7 connect-interface LoopBack0
#
address-family ipv4 unicast
#
ip vpn-instance vpn1
peer 10.1.1.1 as-number 65410
peer 10.3.1.1 as-number 65410
#
address-family ipv4 unicast
peer 10.1.1.1 enable
peer 10.3.1.1 enable
#
ip vpn-instance vpn2
#
address-family ipv4 unicast
display bgp routing-table ipv4 vpn-instance vpn2
Total number of routes: 4
BGP local router ID is 5.5.5.5
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 10.1.1.0/24 10.1.1.1 0 0 65410?
* >e 10.3.1.0/24 10.3.1.1 0 0 65410?
* >e 100.100.100.100/32 10.1.1.1 0 0 65410?
* e 10.3.1.1
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作