Generally, all hosts in the same CIDR block have the same default route with the gateway as the next hop. When the gateway fails, all hosts that use the gateway as the default route in this segment cannot communicate with the external network.
The network interruption caused by a single point of failure (spof) of the LAN gateway can be avoided through the connection between the routers and VRRP.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/0054391315-0.png "title =" Q1.png "/>
If the Network Gateway in the figure above fails, the Intranet will not be able to access the Internet.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/00543955M-1.png "title =" Q2.png "/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/00543945V-2.png "title =" Q3.png "/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/005439A22-3.png "title =" Q4.png "/>
HSRPhot standby router protocol) can add multiple routers to the backup group to form a virtual router.
As long as there is still one route in the backup group working properly, the vro still works normally. This group has only one
Vro is active.
Dynamic router. From the perspective of hosts in the network, the gateway has not changed.
The HSRP router uses the Hello packet to listen to each other's existence. When the router does not receive the Hello packet for a long time
If the active router fails, the backup router will become the active router. The HSRP protocol uses Priority to determine which vro becomes
Active router. If a vro has a higher priority than other vrouters, The vro。 becomes an active vro. Routing
The default priority is 100. In a group, there is a maximum of one active router and one backup router.
The HSRP router sends the following multicast messages:
① Hello: The Hello Message notifies other routers Of The HSRP priority and status information of the routers. The default HSRP router is
Send a Hello message every 3 seconds;
② Coup: Send a Coup message when a Standby Router changes to an active router;
③ Resign: When the active router is down or a router with a higher priority sends a Hello message, the first
Resign messages.
The HSRP router is in the following 6 states.
① Initial: the status of HSRP when it is started. HSRP is not running yet. It is generally entered when the configuration is changed or the interface is just started.
Status;
② Learn: The vro has obtained a virtual IP address, but it is neither an active router nor a backup router.
Directly listen for Hello messages sent from Active Routers and backup routers;
③ Listent: The vro is listening for Hello messages;
④ Speak: In this status, the router regularly sends Hello messages and actively participates in the active router or backup router
Campaign;
⑤ Standby: When the active router fails, the router is ready to take over the data transmission function;
⑥ Active: the Router performs the data transmission function.
The active router uses the MAC address of the virtual router to respond to ARP requests. The Standby Router is located in the 224.0.0.2 group, so that
Use UDP port 1985 to listen for the regular Hello messages sent by the active route. It is a candidate for active vrouters and also known as virtual routers.
The IP address of the router.
Instance 1:
Create vlan20 and vlan30 on SW1 and SW2 respectively. Both F0 and 2 are in vlan10 and F0 and 3 are in vlan20. Zheng
In general, the traffic of vlan10 is from R1, and that of vlan20 is from vlan20.
Configuration:
R1 R2
Interface f0/0 interface f0/0
Noshutdown
Interface f0/0.10 interface f0/0.10
Encapslution dot1q 10 encapslution dot1q 10
Ip add 192.168.10.1 255.255.255.0 ip add 192.168.10.2 255.255.255.0
Standby10 ip 192.168.10.254 standby 10 ip 192.168.10.254
Standby10 priority 120 standby 10 priority 100 (default)
Standby10 preempt standby 10 preempt
No shutdown
Interface f0/0.20 interface f0/0.20
Encapslution dot1q 20 encapslution dot1q 20
Ipadd 192.168.20.1 255.255.255.0 ip add 192.168.20.2 255.255.255.0
Standby20 ip 192.168.255.254 standby 20 ip 192.168.255.254
Standby20 priority 100 standby 20 priority 120
Standby 20 preempt standby 20 preempt
No shutdown
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/0054391307-4.png "title =" Q5.png "/>
SW1 SW2
Interface range f0/0-1 interface range f0/0-1
Switchport mode trunk
Vlan database
Vlan 10 vlan 10
Vlan 20 vlan 20
Interface f0/2 interface f0/2
Switchport mode access
Switchport access vlan 10 switchport access vlan 10
Interface f0/3 interface f0/3
Switchport mode access
Switchport access vlan 20 switchport access vlan 20
After configuring the vro and vswitch, set the ip address and gateway of the PC. The ip address must be the same as the vlan CIDR block where the gateway is a virtual network.
The virtual gateway in the vlan10 CIDR block is 192.168.10.254, and the virtual gateway in the vlan20 CIDR block is 192.168.255.254.
Test:
When a host in vlan10 accesses a host in vlan20, the data is first sent to the virtual gateway.
To f0/0.10 on R1, then to f0/0.20 on R2, and finally to the host in vlan20.
If f0/0 on R1 is disconnected, R2 starts and becomes an active route. If the host in vlan10 needs
To communicate with the vlan20 host, SW1 will hand over the data to R2 and then to the host in vlan20.
This article from the "life in service, do not why get" blog, please be sure to keep this source http://wangjun51.blog.51cto.com/6124567/1263642