Currently Empty: 0.00 €
SONiC hands-on training - Module 4 - Lab 2 – VRRP Configuration
You are a network engineer tasked with configuring VRRP. You have two switches – SW1 and SW2, which are connected to a simple switch.
There’s also an end host connected to the switch which is already pre-configured.
Configure a VRRP between SW1 and SW2 – SW1 should be a Master router and SW2 should be a back-up router.
The SW1, SW2 and PC1 are connected to the pre-configured SW-N switch.
Step 1: Configure interfaces on SW1 and SW2
- Log in to the switches (SW1, SW2) using the default credentials, use the Klish CLI. Configure properly an interfaces that are connected to SW-N.
- Step 2: Configure VRRP
Configure VRRP of both switches (SW1, SW2). They should be in group 10, and the Virtual IP should be 10.0.0.1. Disable preemption on both routers. Make SW1 master router by configuring priority to 200 in this switch.
- Step 3: Check if the VRRP is properly configured
Use command show vrrp to check if VRRP is properly configured – SW1 should be MASTER, and SW2 should be BACKUP router. Try to ping from PC1 10.0.0.1 to see if the connection works.
- Step 4: Disable and Enable the Ethernet0 port on SW1 switch to see if no preempt works.
Disable the Ethernet0 port on SW1 switch, and after that check the vrrp using command show vrrp to check the status of SW1 – after reset SW1 should be the backup router.
- Default credentials: admin / YourPaSsWoRd
- Remember to assign the IP address to the interfaces before you’ll configure the VRRP
- Remember – to disable preemption use command no preempt
- To change the priority of the Router in VRRP use priority command
- The names of the virtual computers are different in remote access to those shown on the topology. Virtual computers and their counterparts in remote access are motioned below:
- SW1 – mod4lab2-sw1
- SW2 – mod4lab2-sw2
- PC1 – mod4lab2-vpc1
- Credentials for Virtual computer is login: root password: route2open
The aim of the lab is to gain hands-on experience in configuring VRRP.
Step 1: Configure interfaces on SW1 and SW2
SW1
1. sonic(config)# interface Ethernet0
2. sonic(config–if–Ethernet0)# ip address 10.0.0.2/24
3. sonic(config–if–Ethernet0)# no shutdown
SW2
1. sonic(config)# interface Ethernet1
2. sonic(config–if–Ethernet0)# ip address 10.0.0.3/24
3. sonic(config–if–Ethernet0)# no shutdown
Step 2: Configure VRRP
SW1
1. sonic(config)# interface Ethernet0
2. sonic(config–if–Ethernet0)# vrrp 10 address–family ipv4
3. sonic(config–if–Ethernet0–vrrp–ipv4–10)# vip 10.0.0.1
4. sonic(config–if–Ethernet0–vrrp–ipv4–10)# no preempt
5. sonic(config–if–Ethernet0–vrrp–ipv4–10)# priority 200
SW2
1. sonic(config)# interface Ethernet1
2. sonic(config–if–Ethernet1)# vrrp 10 address–family ipv4
3. sonic(config–if–Ethernet1–vrrp–ipv4–10)# vip 10.0.0.1
4. sonic(config–if–Ethernet1–vrrp–ipv4–10)# no preempt
Step 3: Check if the VRRP is properly configured
SW1
1. sonic(config)# show vrrp
2. Interface_Name VRID State VIP Cfg_Prio Curr_Prio
3. Ethernet0 10 Master 10.0.0.1 200 200
SW2
1. sonic(config)# show vrrp
2. Interface_Name VRID State VIP Cfg_Prio Curr_Prio
3. Ethernet0 10 Backup 10.0.0.1 100 100
PC1
1. PC1> ping 10.0.0.1
3. 84 bytes from 10.0.0.1 icmp_seq=1 ttl=64 time=2.443 ms
4. 84 bytes from 10.0.0.1 icmp_seq=2 ttl=64 time=2.374 ms
5. 84 bytes from 10.0.0.1 icmp_seq=3 ttl=64 time=4.073 ms
6. 84 bytes from 10.0.0.1 icmp_seq=4 ttl=64 time=6.993 ms
Step 4: Disable and Enable the Ethernet0 port on SW1 switch to see if no preempt works.
SW1
1. sonic(config)# interface Ethernet0
2. sonic(config–if–Ethernet0)# shutdown
3. sonic(config–if–Ethernet0)# no shutdown
4. sonic(config–if–Ethernet0)# exit
5. sonic(config)# show vrrp
Interface_Name VRID State VIP Cfg_Prio Curr_Prio
Ethernet0 10 Down 10.0.0.1 200 200
SW2
1. sonic(config)# show vrrp
2. Interface_Name VRID State VIP Cfg_Prio Curr_Prio
3. Ethernet0 10 Master 10.0.0.1 200 200
PC1
1. PC1> ping 10.0.0.1
3. 84 bytes from 10.0.0.1 icmp_seq=1 ttl=64 time=2.443 ms
4. 84 bytes from 10.0.0.1 icmp_seq=2 ttl=64 time=2.374 ms
5. 84 bytes from 10.0.0.1 icmp_seq=3 ttl=64 time=4.073 ms
6. 84 bytes from 10.0.0.1 icmp_seq=4 ttl=64 time=6.993 ms