In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to configure vrrp, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
VRRP principle
Virtual Router redundancy Protocol (VRRP) is a standardized protocol that is mainly used by non-cisco equipment manufacturers. It can dynamically assign the responsibility of a virtual router to one of the VRRP routers on the local area network. The VRRP router that controls the IP address of the virtual router is called the master router and is responsible for forwarding packets to these virtual IP addresses. Once the primary router is unavailable, this selection process provides a dynamic failover mechanism, which allows the IP address of the virtual router to be the default first-hop router for the end host. The advantage of using VRRP is that there is a higher availability of default paths without the need to configure dynamic routing or route discovery protocols on each end host. VRRP packets are encapsulated and sent in IP packets.
Multiple routers in a VRRP group share a virtual physical address and IP address, which is used as the default gateway address for all hosts in the LAN. The VRRP protocol determines which router is activated, and the activated router receives and routes incoming packets. Call signals are exchanged between routers in the group, and if the current router becomes unavailable, the standby router will enter the active state and take over the routing task.
VRRP configuration commands:
1) Huawei series switch configuration:
Vrrp ping-enable: according to VRRP's standard protocol, the virtual IP address of a backup group cannot be ping using the ping command. This command enables the user to use the ping command to ping the virtual IP address of the backup group. If a host is required to be able to ping the gateway, this command must be enabled before configuring vrrp.
Vrrp vrid virtual-router-ID virtual-ip virtual-address: assign the IP address of a local network segment to a virtual router
Vrrp vrid virtual-router-ID priority priority-value: set the priority of the router in the backup group. The higher the priority, the more likely it is to become the primary device in the backup group.
Vrrp vrid virtual-router-ID preempt-mode [timer delay delay-value]: sets the router preemption mode. In non-preemptive mode, once a router in the backup group becomes Master, as long as it does not fail, the other routers will not become Master even if they are subsequently configured with a higher priority. If the router is set to preemption mode, once it finds that it has a higher priority than the current Master, it will become Master, and accordingly, the original Master will become Backup.
Vrrp vrid virtual-router-ID track interface interface-type interface-number [reduced priority-reduced]: if the router has the highest priority in the backup group, it is the master in the backup group, but when this device down down for some reason, other backup devices will not preempt it to become master because it is not as high-priority as this device. This will cause the original route to remain unchanged, but in practice the route has been broken, so the packets are lost. This command can be used on high priority devices. When a down drop occurs on a master device, the priority is reduced to a lower priority than one of the backup devices, so that the backup device will preempt to master and the link will not be disconnected.
Vrrp vrid virtual-router-id authentication-mode {md5 key | simple key}: sets authentication in the backup group. You can choose both md5 and ciphertext authentication, but both sides must be the same.
Display vrrp-related commands:
Operation
Command
Display summary information for VRRP
Display vrrp [interface type number]
Display details of VRRP
Display vrrp verbose [interface type number [vrid virtual-router-ID]]
Enable debugging of VRRP messages
Debugging vrrp packet
Prohibit debugging of VRRP messages
Undo debugging vrrp packet
Enable debugging of VRRP state
Debugging vrrp state
Disable debugging of VRRP state
Undo debugging vrrp state
2) Cisco series device configuration:
Router vrrp: activate the vrrp protocol.
Virtual-ip: sets the vip.
Interface {IFNAME | ethernet IFNAME | Vlan}: vrpp-enabled interface.
Enable: enable vrrp under the interface.
Preempt-mode {true | false}: sets whether to use preemption mode.
Priority: sets the priority of the router vrrp.
Circuit-failover {IFNAME | ethernet IFNAME | Vlan}: sets the parameter that is degraded when the device down is dropped.
Display vrrp-related commands:
Show vrrp
Debug vrrp
The specific instance configuration is as follows:
Huawei 5510 and cisco3750 do vrrp dual backup configuration.
The relevant configurations of Huawei 5510 are as follows:
[switch] vrrp ping-enable / / to ping the gateway, this command must be enabled before configuring vrrp.
[switch] interface vlan 100
[switch- vlan100] ip address 192.168.0.1 255.255.255.0
[switch- vlan100] vrrp vrid 1 virtual-ip 192.168.0.254
[switch- vlan100] vrrp vrid 1 priority 160
[switch- vlan100] vrrp vrid 1 timer advertise 5
[switch- vlan100] vrrp vrid 1 track interface vlan100 reduced 50 / / is just an introduction. It is not configured in practice because the priority of this device is not as high as cisco3750. Settings are not necessary.
The configurations related to Cisco3750 are as follows:
SwitchA (config) # interface vlan 200
SwitchA (Config-if-Vlan1) # ip address 192.168.0.2 255.255.255.0
SwitchA (Config-if-Vlan1) # exit
SwitchA (config) # router vrrp 1
SwitchA (config-router) # virtual-ip 192.168.0.254
SwitchA (config-router) # interface vlan 200
SwitchA (config-router) # enable
SwitchA (config-router) # priority 200
SwitchA (config-router) # preempt-mode true
SwitchA (config-router) # circuit-failover vlan 20050 / / specifies that the priority is lowered by 50 when the host down is dropped.
The above is all the content of this article "how to configure vrrp". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.