{"id":945,"date":"2024-05-19T20:15:23","date_gmt":"2024-05-19T20:15:23","guid":{"rendered":"https:\/\/www.spktechfit.com\/?p=945"},"modified":"2024-06-14T03:20:36","modified_gmt":"2024-06-14T03:20:36","slug":"8-vrrp-virtual-router-redundancy-protocol","status":"publish","type":"post","link":"https:\/\/www.spktechfit.com\/?p=945","title":{"rendered":"8. VRRP (Virtual Router Redundancy Protocol)"},"content":{"rendered":"<p>An endpoint may only have one DG (Default Gateway), and a single DG means a single point of failure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-946 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.1.png\" alt=\"\" width=\"405\" height=\"437\" \/><\/p>\n<p>In this example, if Core-1 is the DG for PC-1 and Core-1 fails, PC-1 and any other endpoints using Core-1 as the DG will be isolated.<br \/>\nYou could add another DG for redundancy, but you would have to somehow change the IP of the DG configured all the endpoints network configuration in the case of a failure (either manually for each end point or by reconfiguring the DHCP scope. This is not practical.<\/p>\n<h2>First Hop Redundancy Protocol (FHRP)<\/h2>\n<p>The solution to this issue is to use some kind of First Hop Routing Protocol. This uses a coordinated Gateway Solution which means there is no change to endpoint IP configuration.<br \/>\nFHRP creates a single coordinated gateway from two or more physical routers. They appear as a single device to the endpoints with a single <strong>Virtual IP address<\/strong> (VIP).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-947 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.2.png\" alt=\"\" width=\"513\" height=\"262\" \/><\/p>\n<p>Normally, the Primary routing device serves the DG role, forwarding traffic for endpoints. The Secondary unit monitors the Primary device state. If the Primary fails the Secondary device takes over. From the endpoint perspective the VIP address is always available and there is no disruption to users.<\/p>\n<h2>Virtual Router Redundancy Protocol (VRRP)<\/h2>\n<p>RFC 5798 defines the VRRP, a standard FHRP that enables two or more routing devices to provide gateway redundancy.\u00a0VRRP uses a Master-Standby architecture, one gateway forwards traffic sent to the VIP address, while the other non-forwarding device is the backup.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-948 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.3.png\" alt=\"\" width=\"560\" height=\"248\" \/><\/p>\n<h3>VRRP Instances<\/h3>\n<p>AOS-CX allows you to deploy multiple instances of VRRP, often to balance the load for VLANs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-949 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.4.png\" alt=\"\" width=\"615\" height=\"301\" \/><\/p>\n<p>Each instance has a unique Virtual Router ID (VRID) which AOS-CX refers to as Group ID. In this example VRRP Group 1 serves VLAN 10 while VRRP Group 2 serves VLAN 20.<br \/>\nIn this example both Core switches are being used as a Master and Standby for load balancing.<br \/>\nCore 1 is the Master for VLAN 10 with Core 2 as the Standby.<br \/>\nCore 2 is the Master for VLAN 20 with Core as 1 the Standby.<\/p>\n<h3>VRRP Instances Capacity<\/h3>\n<p>Instances in VVRP are also known as Virtual Router IDs (VRIDs), the number the switch supports depends on the switch type. You can verify this by using the show capacities VRRP command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-950 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.5.png\" alt=\"\" width=\"581\" height=\"174\" \/><\/p>\n<h3>Master Election<\/h3>\n<p>VRRP members exchange multicast messages to elect the Master gateway using address 224.0.0.18, IP protocol number 112. To control the Master election you set a priority value from 1 to 255. The highest priority wins. If both devices have the same priority the gateway with the highest IP address wins the election. The default priority is set to 100.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-951 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.6.png\" alt=\"\" width=\"544\" height=\"140\" \/><\/p>\n<h3>Virtual IP Address<\/h3>\n<p>You assign a unique &#8220;real&#8221; IP address to each individual gateway, then a unique IP for the VIP address. Each VRRP instance must also have a unique IP address.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-952 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.7.png\" alt=\"\" width=\"619\" height=\"352\" \/><\/p>\n<p>A Virtual MAC address (vMAC) is automatically assigned to the VIP. This MAC is:<br \/>\n&#8211; 00:00:5e:00:00:XX, where XX= the VRID (Group ID)<br \/>\nIn the above example the VRID = 10, so the vMAC is:<br \/>\n&#8211; 00:00:5e:00:00:0A (in Hex A = 10 decimal)<br \/>\nWhen the endpoints ARP for the DG address of 10.0.10.3, they will learn the vMAC and add it to their ARP table.<\/p>\n<h3>VRRP Failover Operation<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-953 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.8.png\" alt=\"\" width=\"612\" height=\"288\" \/><\/p>\n<p>The Standby monitors the Master gateway via a keepalive mechanism. If the Master fails the standby stops receiving keepalive messages. The former Standby then takes over as the new VRRP Master and begins to froward traffic sent to VIP 10.10.10.3<\/p>\n<h4>VRRP Preemption<\/h4>\n<p>In the previous example, what happens when the switch on the left comes back online?<\/p>\n<ul>\n<li>If preemption is enabled this switch will resume its original role as the Master the switch on the right goes back to Standby. This can be useful in the cause of multiple VRRP instances where in the case of a failure, one switch could be carrying the load for all endpoints. <strong>Preemption is on by default<\/strong><\/li>\n<li>If preemption is disabled, switch on the right remains the Master and the switch on the left remains the Standby. <strong>To disable preemption use the command: <em>no prempt<\/em><\/strong><\/li>\n<\/ul>\n<h3>VRRP and MSTP Coordination<\/h3>\n<p>When using VVRP and MSTP there must be coordination between the MSTP Root Bridge and the VRRP. Otherwise if there is a loop there could be some unexpected behaviours.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-954 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/8.9.png\" alt=\"\" width=\"604\" height=\"331\" \/><\/p>\n<p>In figure 8-10, Core 1 is configure as the Root Bridge for MSTP 1 which supports VLANs 1-20. Core 1 is also the VRRP Master for the same VLAN range. If Core 1 fails, Core 2 becomes the new MSTP Root Bridge for instance 1 and the new VVRP Master. Both L2 and L3 protocols are coordinated, L2 STP uses the same forwarding path as L3 Routing.<\/p>\n<h2>Configuring VRRP<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">On Core switch 1<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">On int VLAN 1111 create the VRRP routing process using Group 1<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Interface vlan 1111<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">VRRP 11 address-family ipv4<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><strong>Define 10.11.11.254 as the virtual IP address then enable the group<\/strong><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Address 10.11.11.254 primary<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">No shutdown <\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">exit<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><strong>Display the VRRP information<\/strong><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Show VRRP in vlan 1111<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">You must then configure core switch 2<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold; font-style: italic;\">conf<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Interface vlan 1111<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">VRRP 11 address-family ipv4<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Address 10.11.11.254 primary<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">No shutdown <\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Priority 254<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Exit<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">As we set the higher priority on Core 2 it will become the master.<\/span><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">\n","protected":false},"excerpt":{"rendered":"<p>An endpoint may only have one DG (Default Gateway), and a single DG means a single point of failure. In this example, if Core-1 is the DG for PC-1 and Core-1 fails, PC-1 and any other endpoints using Core-1 as the DG will be isolated. You could add another DG for redundancy, but you would [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/945"}],"collection":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=945"}],"version-history":[{"count":2,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/945\/revisions"}],"predecessor-version":[{"id":1000,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/945\/revisions\/1000"}],"wp:attachment":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}