简介
本文档介绍如何通过功能模板、配置组和CLI在Cisco IOS® XE Catalyst SD-WAN边缘上配置服务端VRRP。
先决条件
要求
Cisco 建议您了解以下主题:
- Cisco Catalyst软件定义的广域网(SD-WAN)
- 虚拟路由器冗余协议(VRRP)基本操作
- 管理器图形用户界面(GUI)
- 配置组
使用的组件
- 思科IOS® XE Catalyst SD-WAN边缘17.9.4a
- 思科Catalyst SD-WAN管理器20.12.4
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
背景信息
虚拟路由器冗余协议(VRRP)是LAN端协议,为交换机和其他IP终端站提供冗余网关服务。在Cisco SD-WAN软件中,您可以在虚拟专用网络(VPN)内的接口(通常在子接口)上配置VRRP。
只有服务端VPN支持VRRP(VPN 0和512不支持VRRP)。
配置
网络图
网络图
配置
这可以通过三种方式实现:
1 — 通过设备功能模板:
在SD-WAN Manager中,导航到配置>模板>功能模板。
如果已经为服务端接口创建了功能模板,请搜索模板名称,然后单击Edit。
如果没有为服务端接口创建功能模板,请点击Add template,搜索设备型号,然后选择Cisco VPN Interface Ethernet。
单击VRRP选项卡和新建VRRP。
VRRP选项卡
配置VRRP参数:
Group ID:范围为1至255。
优先级:范围:1到254。路由器的优先级。具有最高优先级的路由器被选为主要VRRP路由器。如果两台路由器具有相同优先级,具有较高IP地址的路由器将被选为主要VRRP路由器。
计时器(毫秒):范围为100至40950毫秒。指定主VRRP路由器发送VRRP通告消息的频率。如果从属路由器丢失三个连续的VRRP通告,则它们会选举新的主VRRP路由器。建议使用1000ms作为默认值。
跟踪OMP(可选)
跟踪前缀列表(可选)
IP Address:虚拟IP地址必须与两个路由器接口不同,但位于同一子网(本地和对等)。
注意:当Cisco IOS® XE Catalyst SD-WAN设备上的VRRP功能模板的计时器为100毫秒时,如果LAN接口上的流量过高,则VRRP将失败。建议将默认计时器设置为1000ms或更高。
VRRP配置示例主设备
单击Add,然后单击Save。
对VRRP对等体/备用体执行相同的过程(除VRRP优先级外,所有值都必须匹配)。
VRRP配置示例备用设备
将VPN接口以太网功能模板添加到所需服务VPN下的设备模板,然后点击保存。
屏幕上将显示将更改推送到设备以完成此过程。
等效的 CLI 命令
首选:
interface GigabitEthernet0/0/1
<snipped>
vrf forwarding 10
ip address 192.168.23.2 255.255.255.0
no ip redirects
ip mtu 1496
vrrp 1 address-family ipv4
timers advertise 1000
priority 200
vrrpv2
address 192.168.23.1 primary
exit-vrrp
arp timeout 1200
end
备用:
interface GigabitEthernet0/0/1
<snipped>
vrf forwarding 10
ip address 192.168.23.3 255.255.255.0
no ip redirects
ip mtu 1496
vrrp 1 address-family ipv4
timers advertise 1000
priority 150
vrrpv2
address 192.168.23.1 primary
exit-vrrp
arp timeout 1200
end
2 — 通过配置组:
导航到配置>配置组。
导航到现有配置组,然后选择编辑。
导航到服务配置文件部分,并查找功能LAN接口。
Service Profile部分
单击Edit Feature。
Edit Feature部分
在新选项卡中,单击VRRP部分,然后单击Add VRRP IPv4。
VRRP部分配置组
配置VRRP参数:
Group ID:范围为1至255。
优先级:范围:1到254。路由器的优先级。具有最高优先级的路由器被选为主要VRRP路由器。如果两台路由器具有相同优先级,具有较高IP地址的路由器将被选为主要VRRP路由器。
计时器(毫秒):范围为100至40950毫秒。指定主VRRP路由器发送VRRP通告消息的频率。如果从属路由器丢失三个连续的VRRP通告,则它们会选举新的主VRRP路由器。建议使用1000ms作为默认值。
跟踪OMP(可选)
跟踪前缀列表(可选)
IP Address:虚拟IP地址必须与两个路由器接口不同,但位于同一子网(本地和对等)。
注意:当Cisco IOS XE Catalyst SD-WAN设备上的VRRP功能模板的计时器为100毫秒时,如果LAN接口上的流量过高,则VRRP将失败。建议将默认计时器设置为1000ms或更高。
VRRP配置示例主要
然后,单击Add按钮。
验证配置已添加,然后点击保存。
保存VRRP配置
然后,在主设备中部署更改。
对VRRP对等体/备用体执行相同的过程(除VRRP优先级外,所有值都必须匹配)。
VRRP配置示例备用
3 — 通过CLI:
CLI示例配置。
主
Device# config-transaction
Device (config)# interface GigabitEthernet0/0/1
Device (config-if)# vrrp 1 address-family ipv4
Device (config-if-vrrp)# timers advertise 1000
Device (config-if-vrrp)# priority 200
Device (config-if-vrrp)# vrrpv2
Device (config-if-vrrp)# address 192.168.23.1 primary
Device (config-if-vrrp)# commit
备用:
Device# config-transaction
Device (config)# interface GigabitEthernet0/0/1
Device (config-if)# vrrp 1 address-family ipv4
Device (config-if-vrrp)# timers advertise 1000
Device (config-if-vrrp)# priority 150
Device (config-if-vrrp)# vrrpv2
Device (config-if-vrrp)# address 192.168.23.1 primary
Device (config-if-vrrp)# commit
验证
Device# show vrrp all
Vlan10 - Group 1 - Address-Family IPv4
State is MASTER
State duration 2 hours 0 mins 49 secs
Virtual IP address is 192.168.23.1
Virtual MAC address is 0000.5E00.0164
Advertisement interval is 1000 msec
Preemption enabled
Priority is 200
Master Router is 192.168.23.2 (local), priority is 200
Master Advertisement interval is 1000 msec (expires in 256 msec)
Master Down interval is unknown
FLAGS: 1/1
Device# show vrrp detail
Vlan10 - Group 1 - Address-Family IPv4
State is MASTER
State duration 2 hours 0 mins 55 secs
Virtual IP address is 192.168.23.1
Virtual MAC address is 0000.5E00.0164
Advertisement interval is 1000 msec
Preemption enabled
Priority is 200
Master Router is 192.168.23.2 (local), priority is 200
Master Advertisement interval is 1000 msec (expires in 717 msec)
Master Down interval is unknown
FLAGS: 1/1
VRRPv3 Advertisements: sent 27392 (errors 0) - rcvd 1220
VRRPv2 Advertisements: sent 27392 (errors 0) - rcvd 4
Group Discarded Packets: 0
VRRPv2 incompatibility: 0
IP Address Owner conflicts: 0
Invalid address count: 0
IP address configuration mismatch : 0
Invalid Advert Interval: 0
Adverts received in Init state: 0
Invalid group other reason: 0
Group State transition:
Init to master: 1 (Last change Mon Nov 27 11:04:00.406)
Init to backup: 3 (Last change Mon Nov 27 15:29:29.265)
Backup to master: 5 (Last change Mon Nov 27 15:29:32.914)
Master to backup: 3 (Last change Mon Nov 27 10:38:15.722)
Master to init: 2 (Last change Mon Nov 27 15:25:12.248)
Backup to init: 1 (Last change Mon Nov 27 10:35:32.215)
Device# show vrrp internal
GroupId:100 AF:IPv4 Interface:Vlan10
ref_cnt:3 flags:0 vrrs_hdl:1
mac_programmed:1 vrrp_mcast_join_v4:1
if_ctx_:0x7F43DE017178
if_oper_state:1
system_ctx_:0x7F43DE029FA0
primary address: 192.168.23.1
operational:1 is_active:1 match_addr:1 compatv2:1
shutdown:0 cfg_shutdown:0 priority:200 cfg_priority:200
state_ctx_:0x7F43DE02A040
hybernation:0 preempt:enabled state_time:2 hours 0 mins 59 secs
preempt_delay:0 secs master_priority:0
ready_to_preempt:90 master_reason:0
timer_ctx_:0x7F43DE02A0B8
master_down_timer:0 msec use_learned_timer:0
master_adv_interval:1000 cfg_adv_interval:1000 master_down_interval:0
comms_ctx_:0x7F43DE02A0F8
v2rtr_valid:1 listen:1
track_ctx_:0x7F43DE02A178
track_count:0 decrement:0 force_shutdown:0
Device# show vrrp statistics
VRRP Global Statistics:
Dropped Packets : 0
VRRP Statistics for Vlan10
Header Discarded Packets: 0
Invalid TTL/Hop Limit: 0
Invalid Checksum: 0
Invalid Version: 0
Invalid Msg Type: 0
Invalid length/Incomplete packet: 0
Invalid group no: 0
Invalid packet other reason: 0
VRRP Statistics for Vlan10 - Group 1 - Address-Family IPv4
State is MASTER
State duration 2 hours 1 mins 3 secs
VRRPv3 Advertisements: sent 27401 (errors 0) - rcvd 1220
VRRPv2 Advertisements: sent 27401 (errors 0) - rcvd 4
Group Discarded Packets: 0
VRRPv2 incompatibility: 0
IP Address Owner conflicts: 0
Invalid address count: 0
IP address configuration mismatch : 0
Invalid Advert Interval: 0
Adverts received in Init state: 0
Invalid group other reason: 0
Group State transition:
Init to master: 1 (Last change Mon Nov 27 11:04:00.406)
Init to backup: 3 (Last change Mon Nov 27 15:29:29.265)
Backup to master: 5 (Last change Mon Nov 27 15:29:32.914)
Master to backup: 3 (Last change Mon Nov 27 10:38:15.722)
Master to init: 2 (Last change Mon Nov 27 15:25:12.248)
Backup to init: 1 (Last change Mon Nov 27 10:35:32.215)
有用的调试:
debug vrrp all detail
debug vrrp error
debug vrrp packet
debug vrrp process
debug vrrp state