The Wayback Machine - https://web.archive.org/web/20240921030719/https://www.geeksforgeeks.org/introduction-of-virtual-router-redundancy-protocol-vrrp-and-its-configuration/
Open In App

Introduction of Virtual Router Redundancy Protocol (VRRP) and its configuration

Last Updated : 22 Dec, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

VRRP is an open standard protocol, which is used to provide redundancy in a network. It is a network layer protocol (protocol number-112). The number of routers (group members) in a group acts as a virtual logical router which will be the default gateway of all the local hosts. If one router goes down, one of the other group members can take place for responsibility for forwarding the traffic. 

Some important terms related to VRRP:

  1. virtual IP address: An IP address is assigned as a virtual IP address from the local subnet which is configured as a default gateway for all the local hosts.
  2. Virtual MAC address: A virtual MAC address is automatically generated by taking the last 8 bytes as the VRRP group number in hexadecimal. In VRRP, Mac address used is 0000.5e00.01xx. Here, xx is the VRRP group number in hexadecimal.
  3. Master router: One of the VRRP group member is elected as master router which takes up the responsibility of forwarding the local traffic. The router is elected on the basis of priority. If some group member of VRRP group has higher priority than others then it will be elected as master router. If the priority is same(by default 100) then the router having the highest IP address will become the master router.
  4. Backup routers: Only one of the VRRP group member will become the master router while others will be back up routers. In case the master router fails then one of the backup routers will become master router.
  5. Master advertisement timer: The master router multicast the keep-alive messages at 224.0.0.18 in every 1 second.
  6. Master dead timer: The time in which the backup router will take up the responsibilities of Master router if the master advertisement message is not received. It is, by default, 3.69 seconds.
  7. Preempt: It is a state in which one of the backup routers becomes the master router (when the master router goes down). Also, when the master router comes up again, it will become the master router as its priority is still higher.
  8. Object tracking: The VRRP object tracking provides a way in which the best router will become the master router. The current master router continuously polls the tracked object state (such as line protocol is up or down). Suppose if the master router line protocol is down then the priority of backup router will be increased dynamically i.e it will become the master router.
  9. Authentication: VRRP supports 3 types of authentication – 1. No authentication 2. Plain text authentication 3. MD5 authentication

VRRP rejects packet in any of the following cases : 1. The authentication schemes differ on the routers and the incoming packet. 2. MD5 digest differs on the router and the incoming packet. 3. Text authentication strings are different on the router and the incoming packet.

  Configuration:

  

First of all, we have to enable vrrp routing in the global configuration mode on r1 :

r1(config)# router vrrp

And on r2:

r2(config)# router vrrp

In the above-given topology, there are 2-routers named R1 and R2, where R1 fa 0/0 ip address is 10.1.1.1/24 and R2 fa0/0 ip address is 10.1.1.2/24.   Assigning IP address to router R1:

r1# int fa0/0
r1# ip add 10.1.1.1 255.255.255.0

Assigning IP address to router r2.

r2# int fa0/0
r2# ip address 10.1.1.2 255.255.255.0

Now, let’s provide a virtual IP address(10.1.1.100), group name VRRP_TEST, group number 10 and priority 110. Also, here preempt has been enabled by default i.e. if the master router goes down then the backup router automatically becomes the master router.

r1# int fa0/0
r1# vrrp 10 ip 10.1.1.100
r1# vrrp 10 name VRRP_TEST
r1# vrrp 10 priority 110

Now, provide the virtual IP address(10.1.1.100), group name VRRP_TEST, and priority 100. Also, group number 10 is assigned.

r2# int fa0/0
r2# vrrp 10 ip 10.1.1.100
r2# vrrp 10 name VRRP_TEST
r2# vrrp 10 priority 100

Note: As provided priority 110 to r1, therefore, it will become the master router.



Similar Reads

Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol used to provide redundancy in a network. Only one router is the active router while others will be in standby state i.e the standby router will be responsible for forwarding the traffic when the active router fails. Virtual Router Redundancy Protocol (VRRP) is an open standard proto
3 min read
HSRP vs VRRP vs GLBP Protocols
HSRP, VRRP, and GLBP all are First Hop Redundancy Protocols and network-layer protocols which are used to provide redundancy in the network. The main purpose of them is to provide redundancy to the default gateway in a LAN environment. Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, that provides a mechanism that is designed to
4 min read
Open shortest path first (OSPF) router roles and configuration
Prerequisite - Open shortest path first (OSPF) Open shortest path first (OSPF) is a link-state routing protocol which is used to find the best path between the source and the destination router using its own SPF algorithm. Open shortest path first (OSPF) router roles - An area is a group of contiguous networks and routers. Routers belonging to same
3 min read
Configuration of Router on a stick
Prerequisite - Access and trunk ports Switches divide broadcast domain through VLAN (Virtual LAN). VLAN is a partitioned broadcast domain from a single broadcast domain. Switch doesn't forward packets across different VLANs by itself. If we want to make these virtual LANs communicate with each other, a concept of Inter VLAN Routing is used. Inter V
3 min read
Working of Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol (DHCP) is a network management protocol used in networks to dynamically assign IP addresses & other network configuration information like default gateway, mask, DNS server address etc. DHCP server automatically assigns IP address to various devices in network. This in turn reduces work of Network Administrat
3 min read
File transfer protocol server configuration using cisco packet tracer
In this article we are going to design a file transfer protocol server configuration in cisco packet tracer and checking the connectivity for uploading and downloading the file from remote PC. Objectives: To Configure FTP Services on Server.To Upload a File into the FTP Server from Remote PC.To Download a File from the FTP Server from Remote PC.Pro
3 min read
Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol is a network protocol used to automate the process of assigning IP addresses and other network configuration parameters to devices (such as computers, smartphones, and printers) on a network. Instead of manually configuring each device with an IP address, DHCP allows devices to connect to a network and receive al
14 min read
Hot Standby Router Protocol (HSRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, which provides redundancy for a local subnet. In HSRP, two or more routers gives an illusion of a virtual router. HSRP allows you to configure two or more routers as standby routers and only a single router as an active router at a time. All the routers in a single HSRP group share
4 min read
Difference between Stop and Wait protocol and Sliding Window protocol
Both the Stop and Wait protocol and the Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between the Stop-and-wait protocol and the Sliding window protocol is that in the Stop-and-Wait Protocol, the sender sends one frame and waits for acknowledgment from the receiver whereas in the sliding wi
5 min read
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission. Cisco Discovery Protocol (CDP) and Link Layer Discovery P
2 min read
Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
When dealing with network routing, it's crucial to understand the various protocols that help direct traffic across complex networks. Two significant protocols in this space are the Border Gateway Protocol (BGP) and the Routing Information Protocol (RIP). Each serves different purposes and operates under different principles. This article explores
5 min read
Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
Data transfer is the most common task in network and system communications, and they involve transfer of files using two means i.e the File Transfer Protocol (FTP) and the Secure File Transfer Protocol (SFTP). FTP is a commonly applied protocol that enables files to be transferred through a network from one computer to another, but FTP is unsecure
5 min read
Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP), are designed to avoid network loops in Ethernet. It provide loop-free logical topology. They were both designed to provide network reliability and particularly avoid broadcast radiation, but the major differences are on the rate, functionality and versatility. In this article we
5 min read
Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
SLIP and PPP, which are the widely used serial connection techniques, help to connect the distant devices of the network. The fullform of SLIP is Session Layer Internetworking Protocol. SLIP being a primitive protocol put into use during the early connections to the Internet, when there was not much overhead. PPP is slightly more complex as the pro
6 min read
Network Design Principles for High Availability and Redundancy
In today's interconnected world, most businesses rely on their networks for data access, services, and uninterrupted communication. Network failures can occur due to various reasons such as hardware failure, disrupted operations, unexpected events, or software glitches. Such failures can result in downtime and financial loss. Therefore, high availa
7 min read
Difference Between Virtual Private Network (VPN) and Multi-Protocol Label Switching (MPLS)
Virtual Private Network (VPN) and Multi-Protocol Label Switching (MPLS) are two networking technologies that allow for secure and efficient data transmissions. VPN is a secure connection which is established over a public network connection enabling users to remotely access private networks with encrypted information being sent through it. On the o
6 min read
Cyclic Redundancy Check in Python
Prerequisites: Know about Cyclic redundancy, Socket Programming What is CRC? CRC or Cyclic Redundancy Check is a method of detecting accidental changes/errors in the communication channel. CRC uses Generator Polynomial which is available on both sender and receiver sides. An example generator polynomial is of the form of x^3 + 1. This generator pol
6 min read
Vertical Redundancy Check (VRC) or Parity Check
Vertical Redundancy Check is also known as Parity Check. In this method, a redundant bit also called parity bit is added to each data unit. This method includes even parity and odd parity. Even parity means the total number of 1s in data is to be even and odd parity means the total number of 1s in data is to be odd. Example - If the source wants to
3 min read
Longitudinal Redundancy Check (LRC)/2-D Parity Check
Longitudinal Redundancy Check (LRC) is also known as 2-D parity check. In this method, data which the user want to send is organised into tables of rows and columns. A block of bit is divided into table or matrix of rows and columns. In order to detect an error, a redundant bit is added to the whole block and this block is transmitted to receiver.
2 min read
Stop and Wait protocol, its problems and solutions
It is the simplest flow control method in which the sender will send the packet and then wait for the acknowledgement by the receiver that it has received the packet then it will send the next packet. Stop and wait protocol is very easy to implement. Total time taken to send is, Ttotal = Tt(data) + Tp + Tq + Tprocess + Tt(ack) + Tp ( since, Tq and
2 min read
Introduction of a Router
Network devices are physical devices that allow hardware on a computer network to communicate and interact with one another. For example Repeater, Hub, Bridge, Switch, Routers, Gateway, Router, and NIC, etc. What is a Router?A Router is a networking device that forwards data packets between computer networks. One or more packet-switched networks or
12 min read
Types of Virtual Private Network (VPN) and its Protocols
VPN stands for Virtual Private Network (VPN), that allows a user to connect to a private network over the Internet securely and privately. VPN creates an encrypted connection that is called VPN tunnel, and all Internet traffic and communication is passed through this secure tunnel. Virtual Private Network (VPN) is basically of 2 types: 1. Remote Ac
7 min read
Introduction of Spanning Tree Protocol (STP)
In a LAN, redundant links are added to improve the network availability of LAN. But these redundant links may cause the frame to loop in the network for an infinite time until some action is taken, e.g, some links are taken down. To cope with the problem of frame looping, Spanning Tree Protocol (STP) comes into play. Need for Spanning Tree: Conside
3 min read
Introduction of Message Queue Telemetry Transport Protocol (MQTT)
Message Queuing Telemetry Transport, or MQTT, is a communications protocol designed for Internet of Things devices with extremely high latency and restricted low bandwidth. Message Queuing Telemetry Transport is a perfect protocol for machine-to-machine (M2M) communication since it is designed specifically for low-bandwidth, high-latency settings.
9 min read
Introduction to Virtual Private Network (VPN)
In today's digital era, communication has become one of the most important aspects of every individual's life. So the threats and cyber attacks have become more aggressive than ever before. The threat ratio has increased by 45% in the past 7 years & global cybercrime is estimated to be around USD 6 Trillion (by 2025). That's why it becomes impo
3 min read
AAA (Authentication, Authorization and Accounting) configuration (locally)
Prerequisite - AAA (Authentication, Authorization and Accounting) To provide security to access network resources, AAA is used. AAA is a standard based framework used to control who is permitted to use network resources (through authentication), what they are authorized to do (through authorization) and capture the actions performed while accessing
3 min read
Encryption, Its Algorithms And Its Future
Encryption is very important in today's world, it is the process of transforming plaintext into ciphertext to maintain data security, and it is a crucial tool used in modern cyber security. It secures sensitive data by rendering it unreadable to unauthorized events, making sure of confidentiality, integrity, and authenticity. What is Encryption?Enc
6 min read
Difference between Bridge and Router
Prerequisite - Network Devices Bridge is a network device, which works in data link layer. Through bridge, data or information is not stored and sent in the form of packets. Whereas Router is also a network device which works in network layer. Through router, data or information is stored and sent in the form of packets. The main difference between
2 min read
Port Forwarding on Router and Why do we need It
Router port forwarding is used to allow the remote computers to connect to a specific service or computer on a Local Area Network. Now the question is why do we need it. And we will discuss all of these things one by one. Use Cases : Suppose you are at the office and want to connect to your computer which is present in your house, the computer pres
4 min read
Difference between User Mode and Privileged Mode in Cisco Router
A router is a layer 3 device used to forward packets from one network to another. It forwards the packet through one of its ports on the basis of destination IP address and the entry in the routing table. By using a routing table, it finds an optimized path between the source and destination network. In this article we will see difference between U
3 min read