HSRP热备份路由相关

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HSRP热备份路由相关相关的知识,希望对你有一定的参考价值。

HSRP热备份路由


如图 做不同vlan的热备份路由

PC1 vlan1 ; PC2 vlan2

SW1:

enable 

configure terminal

hostname SW1

no ip domain lookup

vlan 2

vlan 3

exit

interface fastethernet 0/1

switchport mode access 

switchport access vlan 2

interface fastethernet 0/2

switchport mode access 

switchport access vlan 3

interface fastethernet 0/3

switchport mode trunk

interface fastethernet 0/4

switchport mode trunk

exit


spanning-tree vlan 1 root primary

spanning-tree vlan 2 root primary

spanning-tree vlan 3 root primary #指定冗余线路


以下省略了一些常规操作

SW2:

ip routing

interface vlan 2

ip address 192.168.1.2 255.255.255.0

standby 1 ip 192.168.1.100

standby 1 preempt

standby 1 priority 200 #默认100 越大优先级高 成为vlan 2主路由设备

interface vlan 3

ip address 192.168.2.2 255.255.255.0

standby 2 ip 192.168.2.100

standby 2 preempt 

interface fastethernet 0/1

switchport trunk encapsulation dot1q

switchport mode trunk 


SW3:

ip routing

interface vlan 2

ip address 192.168.1.3 255.255.255.0

standby 1 ip 192.168.1.100

standby 1 preempt

interface vlan 3

ip address 192.168.2.3 255.255.255.0

standby 2 ip 192.168.2.100

standby 2 preempt 

standby 2 priority 200   #默认100 越大优先级高 成为vlan 3主路由设备

interface fastethernet 0/2

switchport trunk encapsulation dot1q

switchport mode trunk 


扩展测试

SW2:

interface vlan 10

ip address 192.168.10.1 255.255.255.0

exit

ip route 192.168.100.0 255.255.255.0 192.168.100.2


R1

interface gig0/0

ip address 192.168.10.2 255.255.255.0

exit

interface loopback 0 

ip address 192.168.100.1 255.255.255.0

exit

ip route 192.168.0.0 255.255.0.0 192.168.10.1


ping 测试


本文出自 “13393189” 博客,谢绝转载!

以上是关于HSRP热备份路由相关的主要内容,如果未能解决你的问题,请参考以下文章

热备份路由选择协议(HSRP)

HSRP热备份路由选择协议

热备份路由选择协议(HSRP)配置命令及原理

HSRP(热备份路由选择协议)---学习笔记

配置热备份路由协议(HSRP)

热备份路由选择协议(HSRP)的原理与配置