HSRP-SLB-VRRP-GLBP

Source: Internet
Author: User

Link redundancy: HSRP-SLB-VRRP-GLBP
1. HSRP introduction and related configuration

1) HSRP Introduction
Hot Standby Routing Protocol is a simple principle, similar to a server HA cluster,
Two or more routers are configured as clusters in the same way to create a single virtual router,
Then the Client points the gateway to the vro.
At last, HSRP determines which router acts as the real default gateway.

Specifically, HRSP is used to prevent the failure of the default route when the source host cannot dynamically learn the gateway IP address.
It is mainly used for multi-access, multicast, and broadcast LAN (such as Ethernet ).

2) Related Technologies
In a LAN, how to find a backup gateway when the gateway fails:

Proxy ARP
IRDP
Dynamic Routing
HSRP

Proxy ARP
Computers that support Proxy ARP send ARP broadcasts to find the MAC address corresponding to the destination address, regardless of whether they communicate with computers in different network segments,
At this time, the router that knows the target address will respond to the ARP request and broadcast its MAC address to the source computer,
The source computer then sends the IP packet to the router, and the router finally sends the packet to the destination.

The main disadvantage of ARP proxy is that the switchover takes a long time. If the main gateway fails to transmit data, the client will continue to send packets, resulting in transmission interruption,
The slave gateway can be found for transmission only after the Proxy ARP request is sent or restarted.

IRDP
Customers who support IRDP can listen to the "Hello" Multicast information package sent by the gateway,
If the computer no longer receives the "Hello" message, it will use the backup router for data transmission.

Dynamic Routing
If dynamic routing is used for gateway switching, there is a problem of slow convergence and memory usage.

HRSP
Automatic Switch

3) HRSP Principle
Note that each member router in the Cluster is still a standard router,
The client can still configure the member router as its default gateway.

A maximum of 256 HSRP groups can be configured in a Cisco router,
Because the MAC address that HSRP can use is similar to 255.c07.ac **.

HRSP sends hello packets every 3 seconds, including group ID, HSRP group, and priority (100 by default ).
Based on their priorities, vrouters are the active vrouters with the highest priority.
If the priority is the same, the router becomes active when the IP address is high.

In the HRSP group, only one active router can exist at the same time, and all other routers are in the standby status,
The Standby Router does not forward data packets.

If the Standby Router continuously receives the hello packet from the active router,
It will remain in the STANDBY state.
Once the Standby Router does not receive the hello packet within the specified Time (Hold Time, 10 seconds by default ,,
The active router is considered invalid,
The secondary router with the highest priority takes over the role of the active router and starts to forward data packets.

4) HRSP preempt Technology
HRSP Technology ensures that the router with a higher priority is always active after the fault is restored.

When the active router fails, the Standby Router with the highest priority is active,
If the preempt technology is not used,
After the active router is restored, it can only be in the standby status,
The previous backup server is active in place of its role until the next election.

5) HRSP track Technology
If the monitored port fails, you can also switch the vro.

If multiple lines on the primary router are tracked,
When a line fails, it will switch to the backup router, even if the other lines work normally,
The switch can be switched back only when the line of the primary router works normally.

This function can be fully implemented by the line backup function in practical applications.

6) Configure HRSP
Rouw.# conf t
Routeconfig # int e0
Routeconfig # standby ip 172.16.1.254
Routeconfig # standby preempt
Routeconfig # standby track serial 0
Routeconfig # exit
Roupid #


Ii. SLB introduction and related configuration

1) SLB Introduction
Server Load Balancing can be seen as an extension of HSRP to achieve complex Balancing among multiple servers.

A virtual server represents a cluster of multiple real servers,
When a client initiates a connection to a virtual server, it forwards the connection to a real server through a complex balancing algorithm.

There are two load balancing algorithms:
Weighted round robin (WRR) and Weighted least connections (WLC ),
WRR uses the Weighted Round robin algorithm to allocate connections. WLC assigns the next connection to a server with fewer active connections through a certain weight value.

2) SLB Configuration
The configuration is divided into two parts,
The first part is to use the slb serverfarm serverfarm_name command to define the SLB option, including specifying the real server address;
The second part is to use the ip slb vserver virtual_server-name to specify the virtual server address.

Router # config t
Router (config) # ip Server Load balancer serverfarm email
Router (config-slb-sfarm) # real 192.168.1.1
Router (config-slb-sfarm) # inservice
Router (config-slb-sfarm) # real 192.168.1.2
Router (config-slb-sfarm) # inservice
Router (config-slb-sfarm) # exit
Router (config) # ip Server Load balancer vserver vserver_one
Router (config-slb-vserver) # vitual 10.1.1.1 tcp 25
Router (config-slb-vserver) # serverfarm email
Router (config-slb-vserver) # inservice
Router (config-slb-vserver) # exit
Router (config) # exit
Router #

Iii. VRRP Introduction

The full name is Virtual Router Redundancy Protocol, which is similar to HSRP,
Only HSRP is a Cisco proprietary protocol and only applies to Cisco devices.
VRRP complies with Internet standards. For definitions, see RFC2338. VRRP is a standard shared by different manufacturers.
VRRP selects one from the VRRP router group as the Master,
Then the client uses the vro address as its default gateway.


Iv. GLBP introduction and Configuration

1) GLBP Introduction
Gateway Load Banancing Protocol,
Unlike HRSP and VRRP, GLBP not only provides redundant gateways, but also provides load balancing between gateways,
Both HRSP and VRRP must select an active router, while the Standby Router is idle.

Unlike HRSP, GLBP can bind multiple MAC addresses to virtual IP addresses,
This allows the client to select different vrouters as its default gateway, while the gateway address still uses the same virtual IP address,
So as to achieve certain redundancy.

2) campaign gateway election
Use a mechanism similar to HRSP to elect an active gateway,
The router with the highest priority is an active drop-down machine called Acitve Virtual Gateway. Other non-AVG routers provide redundancy.

After a vro is elected as AVG, unlike HRSP, AVG allocates a virtual MAC address to other GLBP members.
All routers in the GLBP Group forward packets,
However, each router is only responsible for forwarding packets related to its own virtual MAC address.

3) Address Allocation
Each GLBP group has up to four virtual MAC addresses, and non-AVG routers have AVG allocated virtual MAC addresses in order,
Non-AVG is also called Active Virtual Forwarder (AVF ).

AVF has two types: Primary Virtual Forwarder and Secondary Virtual Forwarder.
A router that directly allocates a Virtual MAC address by AVG is called Primary Virtual Forwarder,
If you do not know the real IP address of the AVG, you can only use the hellos package to identify it, And then assign a Virtual MAC address, which is called Secondary Virtual Forwarder.

4) GLBP Configuration
If the AVG is invalid, the recommendation takes place and determines which AVF replaces the AVG to allocate the MAC address. The recommendation mechanism depends on the priority.
Up to 1024 GLBP groups can be configured. different user groups can be configured to use different groups of AVG as their gateways.

Router # conf t
Router (config) # int fastethernet 0/0
Router (config-if) # ip address 10.1.1.1
Router (config-if) # glbp 99 ip address 10.1.1.254
Router (config-if) # glbp 99 priority 105
Router (config-if) # glbp 99 preempt delay 10
Router (config-if) # glbp 99 weighting track int s0 10
Router (config-if) # exit
Router (config) # ^ Z

Author: "I'm going to see you here !"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.