静态路由的track通常通过探测下一跳IP是否可达来决定是否生效。在某些场景下,可以配置静态路由依赖下一跳接口ARP来替代track的配置,既能简化配置,又可以提高敏感性,多用于HA场景。
如下图,两个VSR堆叠,每台VSR上联一台Service Leaf。多租户场景下,VSR上创建为每个租户创建两个子接口,将这两个子接口加入到一个冗余口中,冗余口绑定租户的VRF。
两台Service Leaf上都需要配置静态路由,下一跳指向VSR上对应的冗余口地址。要实现正常状态下,访问VSR的流量都会通过Service Leaf1来到VSR的主slot;当主slot故障时,流量都会通过Service Leaf2来到备slot。
【Service Leaf的有关配置】
#vpn配置
ip vpn-instance vpna
route-distinguisher 1:2211111
description SDN_VRF_6317e6c9-ef55-42fe-bf5e-4f8efb38c287
#
address-family ipv4
vpn-target 0:2211111 1:2211111 import-extcommunity
vpn-target 1:2211111 export-extcommunity
#
address-family evpn
vpn-target 0:2211111 1:2211111 import-extcommunity
vpn-target 1:2211111 export-extcommunity
#VSI配置
vsi SDN_VSI_2211119
gateway vsi-interface 11119
statistics enable
vxlan 2211119
evpn encapsulation vxlan
mac-advertising disable
arp mac-learning disable
route-distinguisher auto
vpn-target auto export-extcommunity
vpn-target auto import-extcommunity
#L2VNI配置
interface Vsi-interface11119
ip binding vpn-instance vpna
ip address 121.1.1.41 255.255.255.248 sub
mac-address 0056-5656-5656
local-proxy-arp enable
arp route-direct advertise -------开启ARP直连路由通告
distributed-gateway local
#AC口配置
interface Bridge-Aggregation3
port link-type trunk
undo port trunk permit vlan 1
port trunk permit 2 to 500
port trunk pvid vlan 2
link-aggregation mode dynamic
stp edged-port
#
service-instance 201
encapsulation s-vid 201
xconnect vsi SDN_VSI_2211119
#
bgp 65203 instance SDN_INSTANCE_BGP
#
ip vpn-instance vpna
#
address-family ipv4 unicast
balance 4
import-route static---引入静态路由
#
ip route-static vpn-instance vpna 104.78.0.0 16 121.1.1.42 recursive-lookup host-route---------------------指定静态路由只能迭代到直连主机路由
【VSR的有关配置】
#冗余口配置
interface Reth211
ip binding vpn-instance 30_mgtgw_1
ip address 121.1.1.42 255.255.255.248
member interface Route-Aggregation3.200 priority 100
member interface Route-Aggregation4.200 priority 50
#路由子接口配置
interface Route-Aggregation3.200
vlan-type dot1q vid 200
interface Route-Aggregation4.200
vlan-type dot1q vid 2010
VSR部分也可以为其他设备,例如防火墙,LB等
配置关键点在于静态路由配置时添加recursive-lookup参数,并在对应的接口下使能ARP直连路由通告
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作