热备份技术

点击量:6700 来源:解译网 发表时间:2023-02-21 09:12作者:周怡梅

今天给各位分享热备份路由器协议有哪些的知识,其中也会对热备份技术进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

1、热备份路由协议(HSRP)的作用工作原理

2、热备份路由器协议详解 vmac地址由哪些部分组成

3、什么是Cisco热备份路由协议

热备份路由协议(HSRP)的作用和工作原理

[编辑本段]HSRP

概念

HSRP

Hot

Standby

Routing

Protocol(热备份路由协议)的缩写。它的作用是能够把一台或多台路由

器用来做备份,所谓热备份是指当使用的路由器不能正常工作时,候补的路由器能够实现平滑的替换,尽

量不被察觉。

通常,我们的网络上主机设置一条缺省路由,指向主机所在网段内的一个路由器

R,这样

,主机发出的目的地址不在本网段的报文将被通过缺省路由发往路由器

R,从而实现了主机与外部网络的

通信。在这种情况下,当路由器

R

坏掉时,本网段内所有以路由器

R

为缺省路由下一跳的主机将断掉与

外部的通信。HSRP

实现容错备份功能,可以有效解决上述可靠性问题。

HSRP

解决的问题

主机

Pat

设置缺省网关

Router

A,这样访问主机

Marceau

需要通过

Router

A

来进行。一旦

Router

A

出现故障,主机

Pat

将失去与主机

Marceau

的联系,除非主机

Pat

重新指定其它的缺省网关,如

Router

B。

热备份技术

热备份路由器协议详解 vmac地址由哪些部分组成

Part I: Fundamental

HSRP(Hot Standby Router Protocol):Cisco私有的第3层协议。

HSRP为IP网络提供网络冗余,确保用户流量能立即并透明地恢复网络边界设备或接入电路中的第一跳故障。

在LAN中,多个router组成一个HSRP组,其中一个router代表这个HSRP转发这个LAN中的数据流,其它所有router只发送HSRP hello来维持这种HSRP组关系

一个HSRP组共享一个IP和一个MAC地址。每个router可以加入多个组。

一个HSRP组由一台active router,一台standby router及other routers。

1active router转发指向VIP的数据流,并发送HSRP hello包给所有其它HSRP组成员。(最终处于active state)

2standby router不转发指向VIP的数据流,发送HSRP hello包给所有其它HSRP组成员,并监控active router的状态。(最终处于standby state)

3other routers不转发指向VIP的数据流,只监控HSRP hello包,不发送。它们执行普通router的工作,只转发目标为他们自己的分组,不转发目标为VIP的地址。(最终处于listen state)

Part II: HSRP Operation

当standby router在一定时间内没有收到active router的hello包时,它就认为active router出现故障了,并取代它的active router的角色。因为host设备使用VIP及VMAC来标识它们的网关设备,所有它们不会发现这种变更,也不会感觉到服务的中断。

active router的选择:

1优选priority大的HSRP router,默认的priority值为100

2优选lowest mac地址

为了方便进行负载均衡,一个router可以属于多个HSRP组的成员,每个HSRP组有一个VIP及VMAC。

一个LAN最多支持255个HSRP组。

如果host设备发送数据分组给VIP的VMAC地址,由active router来进行相应的数据流转发。

如果host设备发送一个对VIP的ARP请求,由active router用相应的VMAC来应答。

Part III: VMAC Format

VMAC地址由3部分组成:

1Vendor ID:MAC地址的前3个字

2HSRP code:2个字节,一般为07.ac,指示此地址为HSRP router。

3Group ID:MAC地址的最后一个字节,为HSRP的组号。

热备份路由器协议详解 vmac地址由哪些部分组成?

热备份路由器协议详解 vmac地址由哪些部分组成?

Part Ⅶ:HSRP Command Reference

1 standby {group-number} ip {virtual-ip-address}

group-number:缺省为0,可配置范围0-255

注:使用HSRP时,host设备不能发现HSRP router的真实MAC地址,所以在配置了HSRP时,cisco设备自动禁用了ICMP重定向:no ip redirects

2 standby {group-number} priority {priority-value}

priority:缺省为100,可配置范围0-255

priority最高的router成为active router,priority相同,则最高ip地址的router为active router

3 standby {group-number} preempt

允许一台router只要有高的priority就可以立即强占成为active router

4 standby {group-number} {hellotime} {holdtime}

group-number:缺省为0,可配置范围0-255

hellotime:缺省为3,可配置范围1-255

holdtime:缺省为10,可配置范围1-255

5 standby {group-number} track {type number} {interface-priority}

type number:使HSRP监控此接口,如果此接口down掉,则接口的HSRP priority值减去interface-priority

interface-priority:接口down掉的惩罚值。

6 show standby {type number} {group} {brief}

Switch#show standby Vlan11 11

Vlan11 - Group 11

Local state is Active, priority 110

Hellotime 3 holdtime 10

Next hello sent in 00:00:02.944

Hot standby IP address is 172.16.11.115 configured

Active router is local

Standby router is 172.16.11.114 expires in 00:00:08

Standby virtual mac address is 0000.0c07.ac01

7 debug standby [errors] [events] [packets]

监控HSRP所有的状态改变及hello包的发送。

8 debug standby terse

监控HSRP所有的errors,events和packets信息(不包括hello及advertisement packets)

Part Ⅷ: HSRP Configuration

RouterA:

!

interface Vlan10

ip address 172.16.10.32 255.255.255.0

no ip redirects

standby 1 priority 150

standby 1 ip 172.16.10.110

standby 2 priority 50

standby 2 ip 172.16.10.120

RouterB:

!

interface Vlan10

ip address 172.16.10.33 255.255.255.0

no ip redirects

standby 1 priority 50

standby 1 ip 172.16.10.110

standby 2 priority 150

standby 2 ip 172.16.10.120

RouterA#show standby brief

P indicates configured to preempt.

Interface Grp Prio P State Active Standby Virtual IP

Vl10 1 150 Active local 172.16.10.33 172.16.10.110

Vl10 2 50 Standby 172.16.10.33 local 172.16.10.120

Part Ⅸ: Tuning HSRP Operations

Subsecond Failover:

HSRP hellotime及holdtime可以配置为millisecond级别,进而将HSRP故障检测时间减少到1秒内。

switch(config-if)#standby 1 timers msec 200 msec 750

Preempt Time Aligned with Router Boot Time:

preempt是HSRP很重要的一个特性,它允许主router在经历failover后再次成为active router。

当主router重启后,HSRP应该等待此router与其它相连的设备建立好相应的通信连接后再preempt HSRP。否则有可能会导致packets不可达

这时就需要在preempt之前有一个延迟,以等待router完成它的通信连接或路由信息收集。这个延迟要根据不同设备不同的启动时间来设定,一般这个延迟应该比启动时间大一倍,以确保主router有能力成为active router。

switch(config-if)#standby 1 preempt

switch(config-if)#standby 1 preempt delay minimum 180

什么是Cisco热备份路由协议

HSRP:热备份路由器协议(HSRP:Hot Standby Router Protocol),是cisco平台一种特有的技术,是cisco的私有协议。只能在Cisco设备上面使用。

与其对应的公有化的热备份路由协议是VRRP ,各大厂商都支持,当然也包括Cisco

热备份路由器协议有哪些的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于热备份技术、热备份路由器协议有哪些的信息别忘了在本站进行查找喔。

    声明

    删帖请联系zhiyihome@qq.com;