Hot Standby Routing Protocol (HSRP) configuration

Source: Internet
Author: User
Tags traceroute command

----The configuration of the PC-------
Pc#configure Terminal
PC (config) #no IP routing
PC (config) #ip Default-gateway 192.168.1.100
PC (config) #interface e0/0
PC (config-if) #ip address 192.168.1.200 255.255.255.0
PC (config-if) #no shutdown
PC (config-if) #end
----The configuration of the R1-------
R1#configure Terminal
R1 (config) #interface f0/0
R1 (config-if) #ip address 192.168.1.1 255.255.255.0
R1 (config-if) #no shutdown
R1 (config-if) #standby 1 IP 192.168.1.100
R1 (config-if) #standby 1 priority 120
R1 (config-if) #standby 1 preempt
R1 (config-if) #standby 1 track s1/0 30
R1 (config-if) #exit
R1 (config-if) #interface s1/0
R1 (config-if) #ip address 13.13.13.1 255.255.255.0
R1 (config-if) #no shutdown
R1 (config-if) #end

----The configuration of the R2-------
R2#configure Terminal
R2 (config) #interface f0/0
R2 (config-if) #ip address 192.168.1.2 255.255.255.0
R2 (config-if) #no shutdown
R2 (config-if) #standby 1 IP 192.168.1.100
R2 (config-if) #standby 1 priority 100
R2 (config-if) #standby 1 preempt
R2 (config-if) #interface S1/1
R2 (config-if) #ip address 23.23.23.2 255.255.255.0
R2 (config-if) #no shutdown
R2 (config-if) #end
----The configuration of the R3-------
R3#configure Terminal
R3 (config) #interface s1/0
R3 (config-if) #ip address 13.13.13.3 255.255.255.0
R3 (config-if) #no shutdown
R3 (config-if) #interface S1/1
R3 (config-if) #ip address 23.23.23.3 255.255.255.0
R3 (config-if) #no shutdown
R3 (config-if) #exit
R3 (config-if) #interface loopback 0
R3 (config-if) #ip address 202.101.18.8 255.255.255.0
R3 (config-if) #end
Quick Configuration Method
----The configuration of the PC-------
Configure Terminal
No IP routing
IP Default-gateway 192.168.1.100
Interface e0/0
IP Address 192.168.1.200 255.255.255.0
No shutdown
End
----The configuration of the R1-------
Configure Terminal
Interface f0/0
IP address 192.168.1.1 255.255.255.0
No shutdown
Standby 1 IP 192.168.1.100
Standby 1 priority 120
Standby 1 preempt
Standby 1 Track s1/0 30
Interface s1/0
IP address 13.13.13.1 255.255.255.0
No shutdown
End
----The configuration of the R2-------
Configure Terminal
Interface f0/0
IP address 192.168.1.2 255.255.255.0
No shutdown
Standby 1 IP 192.168.1.100
Standby 1 priority 100
Standby 1 preempt
Interface s1/0
IP address 23.23.23.2 255.255.255.0
No shutdown
End
----The configuration of the R3-------
Configure Terminal
Interface s1/0
IP address 13.13.13.3 255.255.255.0
No shutdown
Interface S1/1
IP address 23.23.23.3 255.255.255.0
No shutdown
Interface Loopback 0
IP address 202.101.18.8 255.255.255.0
End

Description: If you want to view the results of a configuration, you can enter a command on the R1
R1#show Standby
You can see the following information
Virtual IP address is 192.168.1.100 configured
Active Router is local
Standby Router is 192.168.1.2 expires in 7.900
Description 192.168.1.2 is standby status
If you disable the s1/0 port of R1
R1#configure Terminal
R1 (config) #interface s1/0
R1 (config-if) #shutdown
R1#show Standby
You can see the following information:
Virtual IP address is 192.168.1.100 configured
Active router is 192.168.1.2, priority expires in 7.940
Standby Router is local
Description 192.168.1.2 is active state
Of course if you want to traceroute 202.101.18.8 on your PC, you must configure the routing protocol.
If you don't want R1 and R2 to find each other through RIP routing protocols, you can configure this
R1 (config) #router rip
R1 (config-router) #network 13.13.13.0
R1 (config-router) #network 192.168.1.0
R1 (config-router) #passive-interface f0/0
R2 (config) #router rip
R1 (config-router) #network 23.23.23.0
R1 (config-router) #network 192.168.1.0
R2 (config-router) #passive-interface f0/0
Now, you can try the traceroute command on your PC
Pc#traceroute 202.101.18.8
Type escape sequence to abort.
Tracing the route to 202.101.18.8
1 192.168.1.1 msec msec msec
2 13.13.13.3 msec * msec
pc#
Close the s1/0 port of R1 and try again.
Pc#traceroute 202.101.18.8
Type escape sequence to abort.
Tracing the route to 202.101.18.8
1 192.168.1.2 msec 109 msec msec
2 23.23.23.3 msec * 0 msec
pc#
The correctness of the results is seen from two outputs.


650) this.width=650; "src=" http://fmn.xnimg.cn/fmn038/20100718/2150/b_large_5QFx_2cdb000483962d12.jpg "/>


This article is from the "Sky" blog, please be sure to keep this source http://haikuotiankong.blog.51cto.com/633188/1695310

Hot Standby Routing Protocol (HSRP) configuration

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.