{"id":34006,"date":"2019-10-31T21:55:54","date_gmt":"2019-10-31T18:55:54","guid":{"rendered":"https:\/\/prohoster.info\/blog\/printsip-raboty-protokola-vrrp\/"},"modified":"2019-10-31T21:55:54","modified_gmt":"2019-10-31T18:55:54","slug":"printsip-raboty-protokola-vrrp","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsip-raboty-protokola-vrrp","title":{"rendered":"How the VRRP protocol works","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><b>FHRP (First Hop Redundancy Protocol)<\/b> is a family of protocols designed to create redundancy for the default gateway. The common concept for these protocols is to combine multiple routers into a single virtual router with a shared IP address. This IP address will be assigned to hosts as the default gateway address. A free implementation of this idea is the VRRP (Virtual Router Redundancy Protocol). In this article, we will cover the basics of the VRRP protocol.<\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/d9af3141a4b0573e206409ac6dbbd60f.jpg\" style=\"display:block;margin: 0 auto;\" \/><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nVRRP routers are grouped into a single virtual router. All routers in the group share a common virtual IP (VIP) address and a common group number or VRID (Virtual Router Identifier). One router can belong to multiple groups, each having its own unique pair of VIP\/VRID.<\/p>\n<p>In the case of Cisco, the virtual router is configured on the desired interface with the command:<\/p>\n<pre><code class=\"plaintext\">R1(config-if)# vrrp  ip<\/code><\/pre>\n<p>\nAll routers are divided into two types: VRRP Master and VRRP Backup. <\/p>\n<p><b>VRRP Master<\/b> is the router that handles packet forwarding for this virtual group. <\/p>\n<p><b>VRRP Backup<\/b> is the router that waits for packets from the Master. If packets from the Master stop arriving, the Backup attempts to become the Master. <\/p>\n<p>A router becomes the Master if it has the highest priority. The Master continuously sends messages to the broadcast address 224.0.0.18 to inform Backup routers that it is operational. The Master sends messages according to the Adver Timer, which is set to 1 second by default. <\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/c7a60362445dd9d89fec7bdbd2ff513d.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nThe MAC address of the sender uses the group address 00:00:5E:00:01:xx, where xx is the VRID in hexadecimal format. In this example, the first group is used. <\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/5d16bcf86a6ce3c8ebe8c610dfe17156.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nIf Backup routers do not receive messages for three Adver Timers (Master Down Timer), the new Master becomes the router with the highest priority, or the router with the highest IP. In this case, a Backup router with a higher priority will take over the role of Master from a lower-priority one. However, when the Backup's preempt mode is disabled, the Backup will not take over the Master role. <\/p>\n<pre><code class=\"plaintext\">R1(config-if)# no vrrp  preempt<\/code><\/pre>\n<p>\nIf the VRRP router is the owner of the VIP address, it always takes over the Master role. <\/p>\n<p>The VRRP priority is set to values from 1 to 254. The value 0 is reserved for cases when the Master needs to <i>be removed.<\/i> is responsible for routing. The value 255 is assigned to the VIP owner router. The default priority is 100 but can be set administratively:<\/p>\n<pre><code class=\"plaintext\">R1(config-if)#vrrp  priority<\/code><\/pre>\n<p>\nHere we can see the router's priority when it is set administratively:<\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/1b7d6de438b7d44ee9ae1d4a9e4fb8ca.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nAnd here is a case where the router is the owner of the VIP:<\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/c593d3fa9dde81fb694b3e3cb0358444.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nA VRRP router can have three states: Initialize, Backup, Master. These states are changed sequentially by the router. <\/p>\n<p>In the Initialize state, the router is waiting to start working. If this router is the owner of the VIP address (priority equal to 255), it sends messages indicating it becomes the Master. It also sends <noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/Address_Resolution_Protocol\">gratuitous ARP request<\/a><\/noindex>, where the source MAC address equals the address of the virtual router. Then it transitions to the Master state. If the router is not the owner of the VIP, it moves to the Backup state. <\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/faa6941e52a9edcef72022b75333fc03.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nIn the Backup state, the router waits for packets from the Master. The router in this state does not respond to ARP requests from the VIP address. It also does not accept packets that have the virtual router's MAC address as the destination. <\/p>\n<p>If the Backup does not receive messages from the Master during the Master Down Timer, it sends a VRRP message indicating it intends to become the Master. Then it sends a broadcast VRRP message, where the source MAC address equals that of the virtual router. In this message, the router specifies its priority.<\/p>\n<p>In the Master state, the router processes packets addressed to the virtual router. It also responds to ARP requests for the VIP. The Master sends VRRP messages every Adver Timer to confirm that it is operational. <\/p>\n<pre><code class=\"plaintext\">*May 13 19:52:18.531: %VRRP-6-STATECHANGE: Et1\/0 Grp 1 state Init -&gt; Backup\n*May 13 19:52:21.751: %VRRP-6-STATECHANGE: Et1\/0 Grp 1 state Backup -&gt; Master<\/code><\/pre>\n<p>\nVRRP also allows load balancing among multiple routers. For this, two VRRP groups are created on one interface. One group is assigned a higher priority than the other. Meanwhile, the second router's priority is set oppositely. That is, if one router's priority for the first group is 100, and for the second group is 200, then on the other router, the priority for the first group will be 200, and for the second, 100. <\/p>\n<p>As stated earlier, each group must have its unique VIP. In the end, we have two IP addresses served by two routers, each of which can act as the default gateway. <\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/2f2246fd8e673a6fd64d4c74b0a79ce2.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nHalf of the computers are assigned one default gateway address, while the other half receives another. This way, half of the traffic will go through one router, and the other half will go through the other. In the event of one router failing, the second takes over the workload of both VIPs.<\/p>\n<p><img decoding=\"async\" alt=\"How the VRRP protocol works\" src=\"\/wp-content\/uploads\/2019\/05\/31501226c0cb7a668ced43e38791f1c3.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nThus, VRRP enables the establishment of redundancy for the default gateway, enhancing network reliability. Additionally, using multiple virtual routers allows for load balancing among the actual routers. The response time to a failure can be reduced by decreasing timers.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/452490\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>FHRP (First Hop Redundancy Protocol) \u2014 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0448\u043b\u044e\u0437\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041e\u0431\u0449\u0435\u0439 \u0438\u0434\u0435\u0435\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u0441 \u043e\u0431\u0449\u0438\u043c IP \u0430\u0434\u0440\u0435\u0441\u043e\u043c. \u042d\u0442\u043e\u0442 IP \u0430\u0434\u0440\u0435\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0445\u043e\u0441\u0442\u0430\u0445 \u043a\u0430\u043a \u0430\u0434\u0440\u0435\u0441 \u0448\u043b\u044e\u0437\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0421\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u0434\u0435\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b VRRP (Virtual Router Redundancy Protocol). [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":25663,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-34006","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"FHRP (First Hop Redundancy Protocol) \u2014 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0448\u043b\u044e\u0437\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsip-raboty-protokola-vrrp\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 VRRP | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"FHRP (First Hop Redundancy Protocol) \u2014 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0448\u043b\u044e\u0437\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsip-raboty-protokola-vrrp\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:55:54+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:55:54+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47The Operational Principle of the VRRP Protocol | ProHoster","description":"FHRP (First Hop Redundancy Protocol) is a family of protocols designed to create redundancy for the default gateway.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsip-raboty-protokola-vrrp","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 VRRP | ProHoster","og:description":"FHRP (First Hop Redundancy Protocol) \u2014 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0448\u043b\u044e\u0437\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/printsip-raboty-protokola-vrrp","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:55:54+00:00","article:modified_time":"2019-10-31T18:55:54+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"34006","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 17:33:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:29:44","updated":"2026-01-21 17:33:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/34006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=34006"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/34006\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/25663"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=34006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=34006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=34006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}