HSRP:
1.启用HSRP功能,并设置虚拟地址IP, 1为standby的组号。2.相同组号的路由器属于同一个HSRP组,所有属于同一个HSRP组的路由器的虚拟地址必须一致。3.HSRP的优先级默认为100,该值越大抢占为活动路由器的优先权越高4.可以设置路由器是否抢占为活动路由器5.由于局域网内大多使用三层交换机,此时HSRP是在交换机的SVI接口上配置的。1.网关冗余热备份协议HSRP(CISCO私有)2.VRRP3.GLBPenableconf tno ip do loenable pass ciscoline con 0logg syncexec-t 0 0line vty 0 4pass ciscologg syncexithost 1.网关冗余热备份协议HSRP(CISCO私有)------------------------------------------------------------------------- R1:int e0/0ip add 10.1.1.1 255.255.255.0no shutexitint e0/1ip add 13.1.1.1 255.255.255.0no shut exitrouter ripversion 2no auto-summarynetwork 10.0.0.0network 13.0.0.0passive-int e0/0exitR2:int e0/0ip add 10.1.1.2 255.255.255.0no shutexitint e0/1ip add 23.1.1.2 255.255.255.0no shutexitrouter ripversion 2no auto-summarynetwork 10.0.0.0network 23.0.0.0passive-interface e0/0exitR3:int l0ip add 33.1.1.1 255.255.255.0exitint e0/1ip add 13.1.1.3 255.255.255.0no shutexitint e0/2ip add 23.1.1.3 255.255.255.0no shutexitrouter ripversion 2no auto-summarynetwork 33.0.0.0network 13.0.0.0network 23.0.0.0exitR1:int e0/0standby 1 ip 10.1.1.254standby 1 priority 120standby 1 preemptstandby 1 authentication mode md5 key-string ciscostandby 2 ip 10.1.1.253standby 2 preemptstandby 2 authentication mode md5 key-string ciscoexitR2:int e0/0standby 1 ip 10.1.1.254standby 1 preemptstandby 1 authentication mode md5 key-string ciscostandby 2 ip 10.1.1.253standby 2 priority 120standby 2 preemptstandby 2 authentication mode md5 key-string ciscoexitR1/R2:show standby briefPC1:no ip routingint e0/0ip add 10.1.1.100 255.255.255.0no shutexitip default-gateway 10.1.1.254ping 33.1.1.1 repeat 10000R3:show standby briefR1:int e0/0shutdownexitR3:show standby briefR1:int e0/0standby 1 track e0/1 30exitint e0/1shutdownexitshow standby briefshow standby2.VRRP--------------------------------------------------------------------------R1:default int e0/0int e0/0ip add 10.1.1.1 255.255.255.0no shutexitrouter ripnetwork 10.0.0.0passive-int e0/0exitR2:default int e0/0int e0/0ip add 10.1.1.2 255.255.255.0no shutexitrouter ripnetwork 10.0.0.0passive-interface e0/0exitR1:
track 1 int e0/1 line-protocolexitint e0/0
vrrp 1 ip 10.1.1.254vrrp 1 priority 120vrrp 1 preemptvrrp 1 authentication mode md5 key-string ciscovrrp 2 ip 10.1.1.253vrrp 2 preemptvrrp 2 authentication mode md5 key-string ciscovrrp 2 track 1 decrement 30exitR2:
track 1 int e0/1 line-protocolexitint e0/0
vrrp 1 ip 10.1.1.254vrrp 1 priority 120vrrp 1 preemptvrrp 1 authentication mode md5 key-string ciscovrrp 2 ip 10.1.1.253vrrp 2 priority 120vrrp 2 preemptvrrp 2 authentication mode md5 key-string ciscovrrp 2 track 1 decrement 30exit
R1/R2:
show vrrp brief3. GLBP
--------------------------------------------------------------------R1:
int e0/0ip add 10.1.1.1 255.255.255.0no shutexitint e0/1ip add 20.1.1.1 255.255.255.0no shutexitrouter rip
version 2no auto-summarynetwork 10.0.0.0network 20.0.0.0passive-interface e0/0exitR2:
int e0/0ip add 10.1.1.2 255.255.255.0no shutexitint e0/1ip add 20.1.1.2 255.255.255.0no shutexitrouter rip
version 2no auto-summarynetwork 10.0.0.0network 20.0.0.0passive-interface e0/0exitR3:
int e0/0ip add 10.1.1.3 255.255.255.0no shutexitint e0/1ip add 20.1.1.3 255.255.255.0no shutexitrouter rip
version 2no auto-summarynetwork 10.0.0.0network 20.0.0.0passive-interface e0/0exitR4:
int l0ip add 44.1.1.1 255.255.255.0exitint e0/0ip add 20.1.1.4 255.255.255.0no shutexitrouter rip
version 2no auto-summarynetwork 20.0.0.0network 44.0.0.0exit-----------------------------------------------------
R1:int e0/0glbp 1 ip 10.1.1.254glbp 1 priority 200glbp 1 preempt glbp 1 authentication text ciscoexitR2:
int e0/0glbp 1 ip 10.1.1.254glbp 1 priority 180glbp 1 preempt glbp 1 authentication text ciscoexitR3:
int e0/0glbp 1 ip 10.1.1.254glbp 1 priority 160glbp 1 preempt glbp 1 authentication text ciscoexitR1:
show glbpR7-PC1:
no ip routingint e0/0
ip add 10.1.1.100 255.255.255.0no shutexitip default-gateway 10.1.1.254ping 44.1.1.1
show arpclear arp cacheping 44.1.1.1show arp跟踪上行链路
------------------------------------------------------R1:track 2 int e0/1 line-protocolint e0/0
glbp 1 wighting 110 lower 85 upper 105glb1 1 weighting track 2 decrement 50