[Enterprise SONiC] VRRP Follow
VRRP is the abbreviation of Virtual Router Redundancy Protocol, which is a protocol used to improve the availability and fault tolerance of network devices. VRRP improves network availability and fault tolerance by providing redundant routers and automatic failover functions, ensuring that devices in the network can always access network services.
In comparing VRRP version 2 with VRRP version 3:
- VRRP version 2 is limited to IPv4 support.
- VRRP version 3 supports IPv4 and IPv6. By default, It's version 3 on Edgecore SONiC.
Restriction
- [SONIC-8299] VRRP IP cannot overlap with the IP of its parent interface.
- Maximum number of VRRP groups: 255
- VRRP does not work with MCLAG.
Tested model & firmware version:
- Switch model name:
DCS201(AS5835-54X) - Edgecore SONiC version:
202111.8
Establish VRRP on the VLAN interface with IPv4.
Topology:
Procedure:
Step 1: Create VLAN and Setting VLAN IP. ( The primary purpose of setting the IP on the VLAN interfaces of switch 01 and switch 02 is to facilitate the transmission of VRRP information between the devices
Switch01:
admin@Switch01:~$ sudo config vlan add 1
admin@Switch01:~$ sudo config vlan member add -u 1 Ethernet1
admin@switch01:~$ sudo config interface ip add Vlan1 1.1.1.0/31
Switch02:
admin@Switch02:~$ sudo config vlan add 1
admin@Switch02:~$ sudo config vlan member add -u 1 Ethernet1
admin@switch02:~$ sudo config interface ip add Vlan1 1.1.1.1/31
Switch03:
admin@Switch02:~$ sudo config vlan add 1
admin@Switch02:~$ sudo config vlan member add -u 1 Ethernet48
admin@Switch02:~$ sudo config vlan member add -u 1 Ethernet49
admin@Switch02:~$ sudo config vlan member add -u 1 Ethernet0
Step 2: Create VRRP
* The VRRP interface name always starts with "Vrrp" and combines with the group ID and v4 or v6.
VRRP interface needs to designate a parent interface name, for instance, you want to create a VRRP interface on Vlan1000, you need to type Vlan1000 as the last parameter
Switch01:
admin@switch01:~$ sudo config interface vrrp add Vrrp1-v4 Vlan1
admin@switch01:~$ sudo config interface vrrp ip add Vrrp1-v4 87.87.87.87/24
admin@switch01:~$ vtysh
Hello, this is FRRouting (version 8.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
switch01# con
switch01(config)# int Vlan1
switch01(config-if)# vrrp 1 version 3
switch01(config-if)# vrrp 1 priority 100
switch01(config-if)# vrrp 1 ip 87.87.87.87
Switch02:
admin@switch02:~$ sudo config interface vrrp add Vrrp1-v4 Vlan1
admin@switch02:~$ sudo config interface vrrp ip add Vrrp1-v4 87.87.87.87/24
admin@switch02:~$ vtysh
Hello, this is FRRouting (version 8.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
switch02# con
switch02(config)# int Vlan1
switch02(config-if)# vrrp 1 version 3
switch02(config-if)# vrrp 1 priority 50
switch02(config-if)# vrrp 1 ip 87.87.87.87
Step 3: Check the status
Switch01: Role status is Master.
admin@switch01:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) Vrrp1-v4
VRRP interface (v6) None
Primary IP (v4) 1.1.1.0
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Master
Status (v6) Initialize
Priority 100
Effective Priority (v4) 100
Effective Priority (v6) 100
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 1000 ms
Master Advertisement Interval (v6) 0 ms
Advertisements Tx (v4) 1464
Advertisements Tx (v6) 0
Advertisements Rx (v4) 24
Advertisements Rx (v6) 0
Gratuitous ARP Tx (v4) 2
Neigh. Adverts Tx (v6) 0
State transitions (v4) 4
State transitions (v6) 0
Skew Time (v4) 600 ms
Skew Time (v6) 0 ms
Master Down Interval (v4) 3600 ms
Master Down Interval (v6) 0 ms
IPv4 Addresses 1
.................................. 87.87.87.87
IPv6 Addresses 0
admin@switch01:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 100 1 0 Master Backup
Switch02: Role status is Backup.
admin@switch02:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) Vrrp1-v4
VRRP interface (v6) None
Primary IP (v4)
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Backup
Status (v6) Initialize
Priority 50
Effective Priority (v4) 50
Effective Priority (v6) 50
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 1000 ms
Master Advertisement Interval (v6) 0 ms
Advertisements Tx (v4) 24
Advertisements Tx (v6) 0
Advertisements Rx (v4) 1475
Advertisements Rx (v6) 0
Gratuitous ARP Tx (v4) 1
Neigh. Adverts Tx (v6) 0
State transitions (v4) 3
State transitions (v6) 0
Skew Time (v4) 800 ms
Skew Time (v6) 0 ms
Master Down Interval (v4) 3800 ms
Master Down Interval (v6) 0 ms
IPv4 Addresses 1
.................................. 87.87.87.87
IPv6 Addresses 0
admin@switch02:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 50 1 0 Backup Backup
Step 4: Conduct testing by simulating VRRP role switches and maintaining continuous pinging from Client A to the VRRP IP.
root@87_101:~# ping 87.87.87.87
PING 87.87.87.87 (87.87.87.87) 56(84) bytes of data.
64 bytes from 87.87.87.87: icmp_seq=1 ttl=64 time=0.482 ms
64 bytes from 87.87.87.87: icmp_seq=2 ttl=64 time=0.394 ms
64 bytes from 87.87.87.87: icmp_seq=3 ttl=64 time=0.374 ms
64 bytes from 87.87.87.87: icmp_seq=4 ttl=64 time=0.247 ms
64 bytes from 87.87.87.87: icmp_seq=5 ttl=64 time=0.370 ms
64 bytes from 87.87.87.87: icmp_seq=6 ttl=64 time=0.446 ms
64 bytes from 87.87.87.87: icmp_seq=7 ttl=64 time=0.381 ms
64 bytes from 87.87.87.87: icmp_seq=8 ttl=64 time=0.391 ms
64 bytes from 87.87.87.87: icmp_seq=9 ttl=64 time=0.381 ms
64 bytes from 87.87.87.87: icmp_seq=10 ttl=64 time=0.367 ms
64 bytes from 87.87.87.87: icmp_seq=11 ttl=64 time=0.359 ms
64 bytes from 87.87.87.87: icmp_seq=12 ttl=64 time=0.643 ms
64 bytes from 87.87.87.87: icmp_seq=13 ttl=64 time=0.282 ms
64 bytes from 87.87.87.87: icmp_seq=14 ttl=64 time=0.394 ms
64 bytes from 87.87.87.87: icmp_seq=15 ttl=64 time=0.384 ms
64 bytes from 87.87.87.87: icmp_seq=16 ttl=64 time=0.285 ms
64 bytes from 87.87.87.87: icmp_seq=17 ttl=64 time=0.520 ms
64 bytes from 87.87.87.87: icmp_seq=18 ttl=64 time=0.271 ms
Switch01: Role status changes to Backup.
admin@switch01:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) Vrrp1-v4
VRRP interface (v6) None
Primary IP (v4)
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Backup
Status (v6) Initialize
Priority 100
Effective Priority (v4) 100
Effective Priority (v6) 100
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 1000 ms
Master Advertisement Interval (v6) 0 ms
Advertisements Tx (v4) 1975
Advertisements Tx (v6) 0
Advertisements Rx (v4) 434
Advertisements Rx (v6) 0
Gratuitous ARP Tx (v4) 2
Neigh. Adverts Tx (v6) 0
State transitions (v4) 5
State transitions (v6) 0
Skew Time (v4) 600 ms
Skew Time (v6) 0 ms
Master Down Interval (v4) 3600 ms
Master Down Interval (v6) 0 ms
IPv4 Addresses 1
.................................. 87.87.87.87
IPv6 Addresses 0
admin@switch01:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 100 1 0 Backup Backup
Switch02: Role status changes to Master.
admin@Switch02:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) Vrrp1-v4
VRRP interface (v6) None
Primary IP (v4) 1.1.1.1
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Master
Status (v6) Initialize
Priority 200
Effective Priority (v4) 200
Effective Priority (v6) 200
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 1000 ms
Master Advertisement Interval (v6) 0 ms
Advertisements Tx (v4) 15
Advertisements Tx (v6) 0
Advertisements Rx (v4) 122
Advertisements Rx (v6) 0
Gratuitous ARP Tx (v4) 1
Neigh. Adverts Tx (v6) 0
State transitions (v4) 2
State transitions (v6) 0
Skew Time (v4) 800 ms
Skew Time (v6) 0 ms
Master Down Interval (v4) 3800 ms
Master Down Interval (v6) 0 ms
IPv4 Addresses 1
.................................. 87.87.87.87
IPv6 Addresses 0
admin@Switch02:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 200 1 0 Master Backup
Establish VRRP on the VLAN interface with IPv6.
Topology:
Procedure:
Step 1: Create VLAN and Setting VLAN IP. ( The primary purpose of setting the IP on the VLAN interfaces of switch 01 and switch 02 is to facilitate the transmission of VRRP information between the devices
Switch01:
admin@Switch01:~$ sudo config vlan add 1
admin@Switch01:~$ sudo config vlan member add -u 1 Ethernet1
admin@Switch01:~$ sudo config interface ip add Vlan1 1::0/127
Switch02:
admin@Switch02:~$ sudo config vlan add 1
admin@Switch02:~$ sudo config vlan member add -u 1 Ethernet1
admin@Switch02:~$ sudo config interface ip add Vlan1 1::1/127
Switch03:
admin@Switch03:~$ sudo config vlan add 1
admin@Switch03:~$ sudo config vlan member add -u 1 Ethernet48
admin@Switch03:~$ sudo config vlan member add -u 1 Ethernet49
admin@Switch03:~$ sudo config vlan member add -u 1 Ethernet0
Step 2: Create VRRP
* The VRRP interface name always starts with "Vrrp" and combines with the group ID and v4 or v6.
VRRP interface needs to designate a parent interface name, for instance, you want to create a VRRP interface on Vlan1000, you need to type Vlan1000 as the last parameter
Switch01:
admin@Switch01:~$ sudo config interface vrrp add Vrrp1-v6 Vlan1
admin@Switch01:~$ sudo config interface vrrp ipv6 add Vrrp1-v6 8787::87/64
admin@Switch01:~$ vtysh
Hello, this is FRRouting (version 8.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
Switch01# con
Switch01(config)# int Vlan1
Switch01(config-if)# vrrp 1 version 3
Switch01(config-if)# vrrp 1 priority 100
Switch01(config-if)# vrrp 1 ipv6 8787::87
Switch02:
admin@Switch02:~$ sudo config interface vrrp add Vrrp1-v6 Vlan1
admin@Switch02:~$ sudo config interface vrrp ipv6 add Vrrp1-v6 8787::87/64
vadmin@Switch02:~$ vtysh
Hello, this is FRRouting (version 8.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
Switch02# con
Switch02(config)# int Vlan1
Switch02(config-if)# vrrp 1 version 3
Switch02(config-if)# vrrp 1 priority 50
Switch02(config-if)# vrrp 1 ipv6 8787::87
Step 3: Check the status
Switch01: Role status is Master.
admin@Switch01:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) None
VRRP interface (v6) Vrrp1-v6
Primary IP (v4)
Primary IP (v6) fe80::1ca7:52ff:feaf:3900
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Initialize
Status (v6) Master
Priority 100
Effective Priority (v4) 100
Effective Priority (v6) 100
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 0 ms
Master Advertisement Interval (v6) 1000 ms
Advertisements Tx (v4) 0
Advertisements Tx (v6) 123
Advertisements Rx (v4) 0
Advertisements Rx (v6) 0
Gratuitous ARP Tx (v4) 0
Neigh. Adverts Tx (v6) 1
State transitions (v4) 0
State transitions (v6) 2
Skew Time (v4) 0 ms
Skew Time (v6) 600 ms
Master Down Interval (v4) 0 ms
Master Down Interval (v6) 3600 ms
IPv4 Addresses 0
IPv6 Addresses 1
.................................. 8787::87
admin@Switch01:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 100 0 1 Backup Master
Switch02: Role status is Backup.
admin@Switch02:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) None
VRRP interface (v6) Vrrp1-v6
Primary IP (v4)
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Initialize
Status (v6) Backup
Priority 50
Effective Priority (v4) 50
Effective Priority (v6) 50
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 0 ms
Master Advertisement Interval (v6) 1000 ms
Advertisements Tx (v4) 0
Advertisements Tx (v6) 0
Advertisements Rx (v4) 0
Advertisements Rx (v6) 71
Gratuitous ARP Tx (v4) 0
Neigh. Adverts Tx (v6) 0
State transitions (v4) 0
State transitions (v6) 1
Skew Time (v4) 0 ms
Skew Time (v6) 800 ms
Master Down Interval (v4) 0 ms
Master Down Interval (v6) 3800 ms
IPv4 Addresses 0
IPv6 Addresses 1
.................................. 8787::87
admin@Switch02:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 50 0 1 Backup Backup
Step 4: Conduct testing by simulating VRRP role switches and maintaining continuous pinging from Client A to the VRRP IP.
root@87_101:~# ping6 8787::87
PING 8787::87(8787::87) 56 data bytes
64 bytes from 8787::87: icmp_seq=1 ttl=64 time=0.472 ms
64 bytes from 8787::87: icmp_seq=2 ttl=64 time=0.478 ms
64 bytes from 8787::87: icmp_seq=3 ttl=64 time=0.505 ms
64 bytes from 8787::87: icmp_seq=4 ttl=64 time=0.501 ms
64 bytes from 8787::87: icmp_seq=5 ttl=64 time=0.485 ms
64 bytes from 8787::87: icmp_seq=6 ttl=64 time=0.479 ms
64 bytes from 8787::87: icmp_seq=7 ttl=64 time=0.618 ms
64 bytes from 8787::87: icmp_seq=8 ttl=64 time=0.353 ms
64 bytes from 8787::87: icmp_seq=8 ttl=64 time=1029 ms
64 bytes from 8787::87: icmp_seq=9 ttl=64 time=29.6 ms
64 bytes from 8787::87: icmp_seq=10 ttl=64 time=0.277 ms
64 bytes from 8787::87: icmp_seq=11 ttl=64 time=0.396 ms
64 bytes from 8787::87: icmp_seq=12 ttl=64 time=0.253 ms
64 bytes from 8787::87: icmp_seq=13 ttl=64 time=0.383 ms
64 bytes from 8787::87: icmp_seq=14 ttl=64 time=0.229 ms
64 bytes from 8787::87: icmp_seq=15 ttl=64 time=0.286 ms
64 bytes from 8787::87: icmp_seq=16 ttl=64 time=0.286 ms
64 bytes from 8787::87: icmp_seq=17 ttl=64 time=0.270 ms
Switch01: Role status changes to Backup.
admin@Switch01:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) None
VRRP interface (v6) Vrrp1-v6
Primary IP (v4)
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Initialize
Status (v6) Backup
Priority 100
Effective Priority (v4) 100
Effective Priority (v6) 100
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 0 ms
Master Advertisement Interval (v6) 1000 ms
Advertisements Tx (v4) 0
Advertisements Tx (v6) 450
Advertisements Rx (v4) 0
Advertisements Rx (v6) 57
Gratuitous ARP Tx (v4) 0
Neigh. Adverts Tx (v6) 1
State transitions (v4) 0
State transitions (v6) 3
Skew Time (v4) 0 ms
Skew Time (v6) 600 ms
Master Down Interval (v4) 0 ms
Master Down Interval (v6) 3600 ms
IPv4 Addresses 0
IPv6 Addresses 1
.................................. 8787::87
admin@Switch01:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 100 0 1 Backup Backup
Switch02: Role status changes to Master.
admin@Switch02:~$ show vrrp interface Vlan1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan1
VRRP interface (v4) None
VRRP interface (v6) Vrrp1-v6
Primary IP (v4)
Primary IP (v6) fe80::c068:d6ff:fe8e:21e9
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Initialize
Status (v6) Master
Priority 200
Effective Priority (v4) 200
Effective Priority (v6) 200
Preempt Mode Yes
Accept Mode Yes
Checksum with IPv4 Pseudoheader Yes
Advertisement Interval 1000 ms
Master Advertisement Interval (v4) 0 ms
Master Advertisement Interval (v6) 1000 ms
Advertisements Tx (v4) 0
Advertisements Tx (v6) 69
Advertisements Rx (v4) 0
Advertisements Rx (v6) 375
Gratuitous ARP Tx (v4) 0
Neigh. Adverts Tx (v6) 1
State transitions (v4) 0
State transitions (v6) 2
Skew Time (v4) 0 ms
Skew Time (v6) 800 ms
Master Down Interval (v4) 0 ms
Master Down Interval (v6) 3800 ms
IPv4 Addresses 0
IPv6 Addresses 1
.................................. 8787::87
admin@Switch02:~$ show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan1 1 200 0 1 Backup Master
Comments
0 comments
Please sign in to leave a comment.