网关冗余
网关冗余

一、网关冗余(一)网关冗余的基本知识:路由器冗余技术可分为:动态冗余和静态冗余两种。
动态冗余不太合适,所以只讲静态冗余1、静态路由冗余:(1)HSRP 热备份路由协议(cisco专有协议)(2) VRRP 虚拟路冗余协议(3)GLBP网关负载均衡(二) HSRP 详解1、HSRP特征:(1)一组路由器组成一个虚拟路由器,虚拟路由器有自已的IP和MAC地址。
组号取值范围0--255。
建议将vlan id作为hsrp组的标识符。
(2)一个HSRP路由组需两台以上路由器,一个为活跃路由器,一个为备用路由器,其他的为成员路由器。
优先级高的为活跃路由器。
默认优先级为100,取值范围0--255。
优先级相同,IP地址值最大的获胜。
(3)HSRP路由器组中,活跃路由器和备用路由器之间互传HELLO消息以示存在。
且活跃路由器和备用路由器把hello消息传给所有的HSRP组中的路由器。
但成员路由器只接收活跃路由器和备用路由器的HELLO消息,但不响应。
(4)成员路由器只接转发发给自已的数据包,但不转发发送给虚拟路由器的数据包(5)所有客户端把数据包发给虚拟路由器。
虚拟路由器收到数据包后由活跃路由器转发数据包。
当活跃路由器出现故障后,备份路由器接替活跃路由器的工作。
备份路由器也出错时,成员路由器争当活跃路由器,以转发数据包。
2、HSRP虚MAC地址00 00 0c 07 ac 2f //这个虚拟MAC地址的组成为:00 00 0c 为厂商编码;07 ac 为hsrp周知标记;2f 为hsrp组标识符,用十六进制表示方法,此处则表示组号为47(十六进制2f转为十进制后的值)show ip arp可显示虚拟ip对应的虚拟mac地址。
show standby也可显示。
3、HSRP负载均衡(1)一个网段或一个VLAN可以有多个HSRP 组, 最多可有255个组(2)一个路由器可以是一个hsrp组中的活跃路由器,同时可为另一个HSRP组中的备用路由器或成员路由器。
冗余

2)HSRP(Hot Standby Routing Protocol)(私有协议)(在三层交换机与路由器上可以做)·HSRP是一种网关冗余协议,它通过在冗余网关之间共享协议和MAC,提供不间断的IP路径冗余。
·HSRP在2个或多个路由器间创建虚拟MAC和虚拟IP,其实就是将多台物理的路由器组合成一台虚拟路由器。
主机的网关设为此虚拟IP就可以了。
·HSRP的hello包包含priority(默认100),hello间隔(默认3S),holdtime(默认10S),虚拟网关IP·HSRP的hello包发向组播地址224.0.0.2(所有路由器)·HSRP路由器的默认优先级是100,优先级相同的情况下比较IP地址,越大越优。
·一个HSRP组可以包含多台路由器,在一个稳定的组里面只有两台路由器发送hello 包,一台是active路由器,一台是备份路由器,其它路由器不发送hello包,但都处于监听状态。
·HSRP可以配置多个组,配多个组的目地是为了做负载分担·虚拟MAC地址:前40位固定(0000.0c),将HSRP的组标识符换成十六进制,接到最后就可以了例如:HSRP组为47,换成十六进制是2fMAC地址前40位为0000.0c07.ac最后得到:0000.0c07.ac2f·HSRP状态:1、Initial All routers begin in the initial state, when HSRP is not running (初始状态,如果手动配置虚拟IP,直接跳到Listen状态)2、learn (没有收到hello包,没有虚拟ip地址,等待收到hello包)3、listen(收到hello包,有了虚拟ip地址,除了active和standby,其它路由器都是这个状态)4、speak (周期发送hello包,开始选active和standby router)5、Standby (没选到active的,除了active外优先级最高的router,会继续发hello包,只有一个)6、active (选到的转发的router,会继续发hello包,只有一个)例:R1、R2、R3运行路由协议,宣告所有接口。
多层交换技术理论篇

汇报人:2023-12-01•多层交换技术概述•多层交换技术基本原理•多层交换技术理论篇•VRRP实现网关冗余技术目•部署多层交换VRRP实现网关冗余实验•多层交换技术发展与趋势录01多层交换技术概述多层交换技术是一种基于网络通信协议的交换技术,它可以在不同的网络层上实现数据包的交换和路由。
多层交换技术可以同时处理多个网络层的通信协议,能够根据数据流的不同层次进行分类和转发,具有较高的灵活性和可扩展性。
定义与特点特点定义多层交换技术起源于20世纪90年代,当时随着互联网的快速发展,传统的路由器和交换机已经无法满足网络通信的需求,因此多层交换技术应运而生。
发展随着网络通信技术的不断进步,多层交换技术也在不断发展和完善,目前已经广泛应用于大型网络、数据中心和云计算等领域。
多层交换技术可以同时处理多个网络层的通信协议,能够根据数据流的不同层次进行分类和转发,具有较高的灵活性和可扩展性,同时还可以减少网络传输延迟和数据包丢失等问题。
优势多层交换技术的实现较为复杂,需要较高的技术水平和配置管理,同时也存在一些安全风险和漏洞,需要加强安全管理和维护。
不足02多层交换技术基本原理硬件交换也称为矩阵交换,是一种使用硬件设备实现数据交换的技术。
硬件交换具有高速、高效的特点,适用于大规模、高流量的网络环境。
软件交换也称为协议交换,是一种通过软件实现数据交换的技术。
软件交换具有灵活性和可扩展性,适用于多协议、多业务的需求。
硬件交换和软件交换基于路由器的多层交换通过路由器实现不同网络层之间的数据交换。
路由器可以识别IP地址和其他协议,并根据路由表将数据包转发到目标地址。
基于交换机的多层交换通过交换机实现不同网络层之间的数据交换。
交换机可以识别MAC地址和其他协议,并根据转发表将数据包转发到目标地址。
基于路由器的多层交换与基于交换机的多层交换的…路由器和交换机在多层交换中各有优缺点。
路由器具有更强的路由和协议支持能力,但性能相对较低;交换机具有更高的性能和更灵活的配置能力,但支持的协议和功能相对较少。
网关冗余

HSRP的基本配置
配置一个接口参加HSRP备份组
配置HSRP优先级
配置HSRP占先权 配置Hello消息计时器 配置HSRP端口跟踪 显示HSRP的状态
HSRP的基本配置
1.配置一个接口以参与HSRP备份组,成为HSRP的成员 Router (config –if)#standby group-number ip virtual-ip-address 2.配置路由器接口在组内的优先级(缺省为100) Rou(config –if) Standby group-number priority priority-number 3.配置同一个HSRP组中所有设备的抢占 Router (config –if) standby group-number preempt 4.配置HELLO消息计时器:前面讲过活跃路由器和备份路由器通过发送 HELLO消息来说明它现在的身份。 Router (config)#standby group-number timers hellotime holdtime ①. Hellotime:是以秒来计算的,来定义HELLO消息之间的间隔;默认是3秒 ②. Holdtime:是以秒来计算的,来定义活跃或是备份路由器在宣布失效之前 的时间,从1~255,缺省为10秒。也就是是说:路由器在 3个HELLO消息的 间隔内如果还是没有收到 HELLO 包,宣告现在这台路由器已经失效了。 要 恢复到缺省的备份计时器值:no standby group timers命令。
跟踪对象
• Standby命令可以跟踪接口或对象。 • 跟踪对象使用track命令定义。 – Track 编号 interface检查线路协议。 – Track 编号 ip route检查网络可达性(即是否存在该路由)。 – Track 编号 list定义更复杂的条件。 – Track 编号 rtr检查诸如IP SLA的参数等。
基于CAN总线的RS485冗余网关设计与实现

De i n a d i p e e t f 4 5 r d n a t a e y b s d o sg n m lm n o RS 8 e u d n t wa a e n CAN u g b s
的一 个重要 发展方 向 。同时 , S 8 R 4 5总线经过 多年 的发
片机 的选择上要求运行可靠性 高 、 功耗低 , 要具有较强 的
实时处理能力 。考虑 到本 系统具体使用环境及对 实时性 的要 求 ,设 计 中选 用 了 SL B IA S公 司 的 8位微 控 制器
C 0 10 0和 M X U 85 F 4 A I M公 司生产 的 M X18 A 4 0型光 电隔
g t wa . ae y
Ke r s AN— S 8 ;r d n a c ;g tw y c mmu iain y wo d :C R 4 5 e u d n y ae a ; o nc t o
O 引言
近年来 , 地铁列车 网络技 术得到 了迅速 的发展 , 中 其 基于 C N总线 的列车 网络 凭借 自身开放性 好 ,可 靠性 A 高 、 活性强 、 时性高 的特 点 , 灵 实 成为地 铁列车 网络 技术
sb a , n e S 8 u sdwd l T i ppr e id ec bs ed s np nil adteraztn oes f e u w y adt nR 4 5bsiue ie . hs ae t l l d sr e t ei r cp n l ao cs h s y d ae y i h g i e h ei i y ot h
船用嵌入式冗余智能网关的设计

De i n o h mb d e e u d n y s a tg t wa n b a d sg ft ee e d d r d n a c m r a e y o o r
Y N Y n W A n yn Ct N L i A G a g N Ma ・ i g IE e Isi t O o e l t dA tmai S a g a Ja tn i ri S r n t u e f w r a uo t n h n h i i o gUnv s y h 培 t P P n a n o o e t a 2 o 3 Oo0
现场设备一级 ; 同时为了提高通信系统的可靠性 ,
冗余的设计也是不可缺少的。
片, 它是A m l 司推 出的一款用 于工业 控制 的 te 公 A M9 理 器 , 基 于 A M9 0 R 处 它 R 2 T内 核, 作 在 工
10MHz 8 频率 下 , 运算 速 度高达 20MtS 独 立 0 P , 的l 指令 和 l 6K 6K数据 c h , 缓存 , a e写 c 全功 能的 MMU虚拟内存管理单元 , 内部 的1 B S A 6K R M和 1 8K O 外 部总线接 口( B )最重 要的是 2 BR M, E I, 其内含E C 以太 网控制器 ) 这就提高了集成 MA ( , 度, 减少 了系统所需要的芯片数量 。
A  ̄ r c Th ein 0 h eu d c matg twa nb adb t e h N u dEt en t r t t ta t ed sg f erd n a ys r ae yo o r ewe nt eCA b sa h r e ei m— t n n a n d cd u e 、A e lainpa fh r waeitra eb t e I RM 9 0 n h rai t l o d r efc ewen A' z o n a n gl 2 0a dt eCAN o tol C 2 1 ie . c nr lrM P 5 0i gy n e s Th ot r sgv nas esf waei ie l o.
Moxa MB3660系列1至16端口冗余Modbus网关产品说明书

MGate MB3660Series8and16-port redundant Modbus gatewaysFeatures and Benefits•Supports Auto Device Routing for easy configuration•Supports route by TCP port or IP address for flexible deployment•Innovative Command Learning for improving system performance•Supports agent mode for high performance through active and parallelpolling of serial devices•Supports Modbus serial master to Modbus serial slave communications•2Ethernet ports with the same IP or dual IP addresses for networkredundancy•SD card for configuration backup/duplication and event logs•Accessed by up to256Modbus TCP clients•Connects up to Modbus128TCP servers•RJ45serial interface(for“-J”models)•Serial port with2kV isolation protection(for“-I”models)•Dual VDC or VAC power inputs with wide power input range•Embedded traffic monitoring/diagnostic information for easy troubleshooting•Status monitoring and fault protection for easy maintenanceCertificationsIntroductionThe MGate MB3660(MB3660-8and MB3660-16)gateways are redundant Modbus gateways that convert between the Modbus TCP and Modbus RTU/ASCII protocols.They can be accessed by up to256TCP master/client devices,or connect to128TCP slave/server devices.Routing through the serial ports can be controlled by IP address,TCP port number,or ID mapping.Serial-port routing by designated TCP port and IP address allows access for up to4TCP clients/masters,while routing by ID mapping(slave ID table)allows access for up to256TCP clients/masters.The MGate MB3660isolation model provides2-kV isolation protection suitable for power substation applications.The MGate MB3660gateways are designed to easily integrate Modbus TCP and RTU/ASCII networks.The MGate MB3660gateways offer features that make network integration easy,customizable,and compatible with almost any Modbus network.For large-scale Modbus deployments,MGate MB3660gateways can effectively connect a large number of Modbus nodes to the same network. The MB3660Series can physically manage up to248serial slave nodes for8-port models or496serial slave nodes for16-port models(the Modbus standard only defines Modbus IDs from1to247).Each RS-232/422/485serial port can be configured individually for Modbus RTU or Modbus ASCII operation and for different baudrates,allowing both types of networks to be integrated with Modbus TCP through one Modbus gateway. High Performance with Innovative Command LearningThe MGate MB3660gateways support two communication modes:transparent mode and agent mode.For transparent mode,the gateway converts Modbus commands from Modbus TCP to Modbus RTU/ASCII,and vice versa,or from serial(master)to serial(slave).However,since only one Modbus protocol request-response action can be executed at any given time,each Modbus device has to wait its turn,resulting in poorer performance.In order to provide better performance,the MGate MB3660gateways are designed with an innovative Command Learning function,which can be activated with a single mouse click.Once activated,the gateway will learn and remember the Modbus commands it receives,and once a command has been learned,the gateway will act as though it were in agent mode,and actively send Modbus requests to the relevant Modbus devices.Since the data is saved in a different memory space that can be accessed by the SCADA system,the SCADA system can retrieve Modbus response data directly from the gateway’s memory,instead of waiting for the data to pass through the Modbus devices,dramatically increasing communication performance.Auto-Device Routing for Easy ConfigurationMoxa’s Auto-Device Routing function helps eliminate many of the problems and inconveniences encountered by engineers who need to configure large numbers of Modbus devices.A single mouse click is all that’s required to set up a slave ID routing table and configure Modbus gateways to automatically detect Modbus requests from a supervisory control and data acquisition(SCADA)system.By removing the need to manually create the slave ID routing table,the Auto-Device Routing function saves engineers significant time and reduces cost.Modbus Gateway with Power and Ethernet RedundancyFor a complicated Modbus system,redundancy is extremely important.The MGate MB3660Modbus gateways support redundancy for both the power input and Ethernet connection.The MGate MB3660gateways come with dual AC or DC power inputs built in for power redundancy,and have dual Ethernet ports(with different IPs)for network redundancy.To accommodate different types of applications,the dual Ethernet ports can be configured in one of two ways:•Use the same IP for both Ethernet ports.In this case,the MGate MB3660gateway will automatically switch to the backup LAN when the main LAN fails.•Use different IP addresses for each of the two Ethernet ports.In this case,Modbus clients/masters can use both Ethernet ports to communicate with Modbus RTU/ASCII slave devices at the same time.SpecificationsEthernet Interface10/100BaseT(X)Ports(RJ45connector)2IP addressesAuto MDI/MDI-X connectionEthernet Software FeaturesIndustrial Protocols Modbus TCP Client(Master)Modbus TCP Server(Slave)Configuration Options Web Console(HTTP/HTTPS)Device Search Utility(DSU)MCC ToolTelnet ConsoleManagement ARPDHCP ClientDNSHTTPHTTPSSMTPSNMP TrapSNMPv1/v2c/v3TCP/IPTelnetUDPNTP ClientRADIUSMIB RFC1213,RFC1317Time Management NTP ClientSecurity FunctionsAuthentication Local databaseRADIUSEncryption HTTPSAES-128AES-256SHA-256Security Protocols SNMPv3HTTPS(TLS1.2)Serial InterfaceNo.of Ports MGate MB3660-8Series:8MGate MB3660-16Series:16Connector MGate MB3660-8/16:DB9maleMGate MB3660-8/16-J:RJ45Serial Standards RS-232/422/485(software selectable)Baudrate50bps to921.6kbpsData Bits7,8Stop Bits1,2Parity NoneEvenOddSpaceMarkFlow Control RTS/CTSDTR/DSRRTS Toggle(RS-232only)Console Port RS-232(TxD,RxD,GND),8-pin RJ45(115200,n,8,1) Isolation2kV(I models)RS-485Data Direction Control ADDC(automatic data direction control)Pull High/Low Resistor for RS-4851kilo-ohm,150kilo-ohmsTerminator for RS-485120ohmsSerial SignalsRS-232TxD,RxD,RTS,CTS,DTR,DSR,DCD,GNDRS-422Tx+,Tx-,Rx+,Rx-,GNDRS-485-2w Data+,Data-,GNDRS-485-4w Tx+,Tx-,Rx+,Rx-,GNDSerial Software FeaturesIndustrial Protocols Modbus RTU/ASCII MasterModbus RTU/ASCII SlaveConfiguration Options Serial ConsoleModbus RTU/ASCIIMode Master,SlaveFunctions Supported1,2,3,4,5,6,15,16,23Max.No.of Commands256per serial portMemory Size65535bytesModbus TCPMode Client(Master),Server(Slave)Max.No.of Client Connections256Max.No.of Server Connections128Functions Supported1,2,3,4,5,6,15,16,23Max.No.of Commands256Memory Size65535bytesModbus(Transparent)Max.No.of Client Connections256Max.No.of Server Connections128Power ParametersInput Voltage All models:Redundant dual inputsAC models:100to240VAC(50/60Hz)DC models:20to60VDC(1.5kV isolation)No.of Power Inputs2Power Connector Terminal block(for DC models)Power Consumption MGate MB3660-8-2AC:109mA@110VACMGate MB3660I-8-2AC:310mA@110VACMGate MB3660-8-J-2AC:235mA@110VACMGate MB3660-8-2DC:312mA@24VDCMGate MB3660-16-2AC:141mA@110VACMGate MB3660I-16-2AC:310mA@110VACMGate MB3660-16-J-2AC:235mA@110VACMGate MB3660-16-2DC:494mA@24VDCRelaysContact Current Rating Resistive load:2A@30VDCPhysical CharacteristicsHousing MetalIP Rating IP30Dimensions(with ears)480x45x198mm(18.90x1.77x7.80in)Dimensions(without ears)440x45x198mm(17.32x1.77x7.80in)Weight MGate MB3660-8-2AC:2731g(6.02lb)MGate MB3660-8-2DC:2684g(5.92lb)MGate MB3660-8-J-2AC:2600g(5.73lb)MGate MB3660-16-2AC:2830g(6.24lb)MGate MB3660-16-2DC:2780g(6.13lb)MGate MB3660-16-J-2AC:2670g(5.89lb)MGate MB3660I-8-2AC:2753g(6.07lb)MGate MB3660I-16-2AC:2820g(6.22lb)Environmental LimitsOperating Temperature0to60°C(32to140°F)Storage Temperature(package included)-40to85°C(-40to185°F)Ambient Relative Humidity5to95%(non-condensing)Standards and CertificationsEMC EN55032/35EMI CISPR32,FCC Part15B Class AEMS IEC61000-4-2ESD:Contact:6kV;Air:8kVIEC61000-4-3RS:80MHz to1GHz:10V/mIEC61000-4-4EFT:Power:1kV;Signal:1kVIEC61000-4-5Surge:Power:2kV;Signal:1kVIEC61000-4-6CS:10VIEC61000-4-8PFMFSafety MGate MB3660-8-2AC/16-2AC/8-2DC/16-2DC:IEC62368-1,UL62368-1MGate MB3660I-8-2AC/16-2AC:IEC62368-1,UL62368-1MGate MB3660-8-J-2AC/16-J-2AC:UL60950-1Freefall IEC60068-2-31Shock IEC60068-2-27Vibration IEC60068-2-6IEC60068-2-64MTBFTime MGate MB3660-8-2AC:721,988hrsMGate MB3660-8-2DC:711,978hrsMGate MB3660-8-J-2AC:616,505hrsMGate MB3660-16-2AC:495,416hrsMGate MB3660-16-2DC:490,684hrsMGate MB3660-16-J-2AC:437,337hrsMGate MB3660I-8-2AC:429,807hrsMGate MB3660I-16-2AC:256,208hrs Standards Telcordia SR332WarrantyWarranty Period5yearsDetails See /warranty Package ContentsDevice1x MGate MB3660Series gateway Power Supply1x power cord,suitable for your region Cable1x RJ45-to-DB9console cable Installation Kit1x wall-mounting kitDocumentation1x quick installation guide1x warranty cardDimensionsOrdering InformationModel Name No.of Serial Ports Serial Connector Serial Isolation Input Voltage MGate MB3660-8-2DC8DB9male–20-60VDC(1.5kV isolation) MGate MB3660-16-2DC16DB9male–20-60VDC(1.5kV isolation) MGate MB3660-8-2AC8DB9male–100-240VAC(47-63Hz) MGate MB3660-16-2AC16DB9male–100-240VAC(47-63Hz) MGate MB3660I-8-2AC8DB9male2kV100-240VAC(47-63Hz)MGate MB3660I-16-2AC16DB9male2kV100-240VAC(47-63Hz) MGate MB3660-8-J-2AC8RJ45–100-240VAC(47-63Hz) MGate MB3660-16-J-2AC16RJ45–100-240VAC(47-63Hz) Accessories(sold separately)CablesCBL-F9M9-150DB9female to DB9male serial cable,1.5mCBL-F9M9-20DB9female to DB9male serial cable,20cmCBL-RJ45F9-1508-pin RJ45to DB9female serial cable,1.5mCBL-RJ45SF9-1508-pin RJ45to DB9female serial cable with shielding,1.5mConnectorsMini DB9F-to-TB DB9female to terminal block connectorPower CordsPWC-C13AU-3B-183Power cord with Australian(AU)plug,1.83mPWC-C13CN-3B-183Power cord with three-prong China(CN)plug,1.83mPWC-C13EU-3B-183Power cord with Continental Europe(EU)plug,1.83mPWC-C13JP-3B-183Power cord with Japan(JP)plug,7A/125V,1.83mPWC-C13UK-3B-183Power cord with United Kingdom(UK)plug,1.83mPWC-C13US-3B-183Power cord with United States(US)plug,1.83mCBL-PJTB-10Non-locking barrel plug to bare-wire cableMounting KitsWK-45-01Wall-mounting kit,2L-shaped plates,6screws,45x57x2.5mm©Moxa Inc.All rights reserved.Updated Aug07,2023.This document and any portion thereof may not be reproduced or used in any manner whatsoever without the express written permission of Moxa Inc.Product specifications subject to change without notice.Visit our website for the most up-to-date product information.。
第二十九章工业无线WIA网络冗余网关设计与实现

第二十九章工业无线WIA网络冗余网关设计与实现
张琼;肖金超
【期刊名称】《仪器仪表标准化与计量》
【年(卷),期】2011(000)005
【摘要】随着可靠性的不断提高,WIA-PA网络逐渐被用户所接受,并且越来越多的应用在不同的行业之中.从本质上讲,工业无线网络WIA-PA是一种有中心的无线网络.作为有中心网络,一旦网络中心出现故障或异常,整个网络都将瘫痪,因此,网关是
网络可靠性的瓶颈.为了提高整个网络的可靠性,本文提出了一种WIA-PA冗余网关的设计方案,即在物理上,将两个网关通过以太网接口相连,并在逻辑上,将它们分成主、副两个网关,其中副网关作为主网关的备份,在主网关发生故障的时候,取代主网关.从实际的执行效果上看,主网关出现故障后,副网关能够迅速取代主网关,大大增强了网络可靠性.
【总页数】5页(P24-28)
【作者】张琼;肖金超
【作者单位】中国科学院沈阳自动化研究所,沈阳市110016;中国科学院研究生院,
北京市100049;广州中国科学院沈阳自动化研究所分所,广州市511458
【正文语种】中文
【相关文献】
1.第三十五讲基于工业无线WIA网络的在线测试平台的设计与实现
2.第二十六章
工业无线WIA网络在化工领域的应用实例3.基于WIA-PA的工业无线网关开发及
实现4.基于WIA-PA的工业无线网络节能设计与实现5.基于WIA-PA的工业无线网络网关设备
因版权原因,仅展示原文概要,查看原文内容请购买。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
查看备份组状态
switch#show standby brief显示HSRP路由器的状态 Interface Grp Pri P State Active Standby Virtual IP Vl10 10 235 P Active local 192.168.1.2 192.168.1.254 ----------------------------------------------------------------------------------------switch#show standby Vlan10 - Group 10 (version 2) State is Active 7 state changes, last state change 00:04:52 Virtual IP address is 192.168.1.254 Active virtual MAC address is 0000.0c9f.f00a Local virtual MAC address is 0000.0c9f.f00a (v2 default) Hello time 3 sec, hold time 10 sec Next hello sent in 1.768 secs Preemption enabled Active router is local Standby router is 192.168.1.2, priority 100 (expires in 9.520 sec) Priority 235 (configured 255) Track interface FastEthernet0/1 state Down decrement 10 Track object 10 state Down decrement 10 IP redundancy name is "hsrp-Vl10-10" (default)
HSRP
路由问题:使用默认网关
缺省网关:当设置默 认的网关失效后, 数据就不能到别的网 段; 即使存在作为网关使 用的冗余路由器, 也不能动态的方法将 这些设备切换到新的 网关地址。
HSRP概述
HSRP (Hot Standby Router Protocol) :热备份路由协议 思科公司专有,支持LAN网段上的一组路由器一起工作,并作为一 个虚拟路由器或缺省网关,呈现给该LAN 上的所有主机 实现HSRP的条件:系统中有多台路由器,它们组成一个“热备份 组”,这个组形成一个虚拟路由器。在任一时刻,一个组内只有一 个路由器是活动的,并由它来转发数据包,如果活动路由器发生了 故障,将选择一个备份路由器来替代活动路由器,但是在本网络内 的主机看来,虚拟路由器没有改变。所以主机仍然保持连接,没有 受到故障的影响,这样就较好地解决了路由器切换的问题。
文件服务器
HSRP的工作原理
我需要到达 172.16.3.127
使用MAC地址 0000.0c07.ac2f 虚拟路由器 172.16.10.110
路由器A 优先级200 (活跃路由器) 172.16.10.82 0010.f6b3.d000
0000.0c07.ac2f
路由器B 优先级150 (备份路由器) 172.16.10.169 0010.0b79.5800
A router in the standby state:
• Is a candidate for active router • Sends hello messages • Knows the virtual router IP address
HSRP Active state
A router in the active state:
HSRP消息
1字节 版本
1字节 Op编码
1字节 状态
1字节 HELLO时间
保留时间
优先级
认证数据 认证数据
组
保留
虚拟IP地址
HSRP消息的详细格式
Active路由器转发数据
Active和Standby路由器
• Active路由器 – 响应对虚拟路由器IP地址的ARP 请求,使用虚拟路由器的MAC地 址进行响应 – 负责虚拟路由器的报文转发 – 发送Hello消息 – 知道虚拟路由器的IP地址 • Standby路由器 – 监听周期性的Hello消息 – 发送Hello消息
• Assumes the active forwarding of packets for the virtual router • Sends hello messages • Knows the virtual router IP address
HSRP优先级和抢占模式
• 一个HSRP组中具有最高优先级的设备 成为Active路由器 • 缺省优先级为100 • 若优先级相同,具有最高接口IP地址的 路由器成为Active路由器 • 抢占(Preempt)使得具有更高优先级的 设备成为Active。
路由器发送周期性的Hello消息,参与active或standby路由器的选举
路由器作为下一个active路由器的候选,路由器发送周期性的Hello消 息 路由器当前负责转发发送到该HSRP组虚拟MAC地址的报文,路由器发 送周期性的Hello消息
HSRP状态迁移
HSRP Standby Group 1
Speak
Standby Active Listen
Speak
Router B hears that router A has a higher priority, so router B returns to the listen state.
Speak Standby
HSRP Standby state
路由器冗余
路由器冗余的故障切换
HSRP概述
到ISP HSRP虚拟路由器 虚拟IP:1.1.1.1/24 虚拟MAC: 0000.0c07.ac00
主机IP:1.1.1.10 缺省网关:1.1.1.1/24
到ISP
HSRP概述
• 实现路由器的冗余备份和负载均衡
虚拟路由器 备份路由器
活跃路由器
核心网络
Router A Priority 100 Initial Listen Initial Listen Router B Priority 50
Router A does not hear any higher priority than itself, so promotes itself to standby. Router A does not hear an active router, so promotes itself to active.
HSRP的基本配置
5.端口跟踪使HSRP组内路由器的优先级,可以基于路由器接口的可 用性而自动进行调整,如果路由器上一个被跟踪接口变为不可用,路 由器的HSRP优先级将被降低。 一般是用在双路由器双线路出口的情况
配置HSRP端口跟踪
路由器A A 路由器 备份路由器 活跃路由器
T1 Link
S1
E0
• 配置Hello和Hold计时器(可设置为毫秒级别)。 • Hold计时器应该至少3倍于Hello计时器。
hello时间缺省是3秒,可配置1-255 保持时间缺省是10秒 • 配置抢占延迟,使得抢占在交换机完全启动并且网络连通性收敛后
进行抢占。
HSRP版本
• HSRPv1(默认) – 组号从0到255
HSRP的基本配置
配置一个接口参加HSRP备份组
配置HSRP优先级
配置HSRP占先权 配置Hello消息计时器 配置HSRP端口跟踪 显示HSRP的状态
HSRP的基本配置
1.配置一个接口以参与HSRP备份组,成为HSRP的成员 Router (config –if)#standby group-number ip virtual-ip-address 2.配置路由器接口在组内的优先级(缺省为100) Rou(config –if) Standby group-number priority priority-number 3.配置同一个HSRP组中所有设备的抢占 Router (config –if) standby group-number preempt 4.配置HELLO消息计时器:前面讲过活跃路由器和备份路由器通过发送 HELLO消息来说明它现在的身份。 Router (config)#standby group-number timers hellotime holdtime ①. Hellotime:是以秒来计算的,来定义HELLO消息之间的间隔;默认是3秒 ②. Holdtime:是以秒来计算的,来定义活跃或是备份路由器在宣布失效之前 的时间,从1~255,缺省为10秒。也就是是说:路由器在3个HELLO消息的 间隔内如果还是没有收到 HELLO 包,宣告现在这台路由器已经失效了。 要 恢复到缺省的备份计时器值:no standby group timers命令。
第10章 网关冗余技术
主要内容
10.1 HSRP 10.2 VRRP
10.3 GLBP
10.1 HSRP
路由问题:使用代理ARP
代理 ARP :如果要获得切 换路由器的 MAC 地址,源
端工作站必须要么发起另
一个 ARP 请求,要么重新 启动,那么就可能在一段 时间通信无法实现。导致 PC 机的 ARP 缓存可能有几 个小时不能刷新。
跟踪对象
• Standby命令可以跟踪接口或对象。 • 跟踪对象使用track命令定义。 – Track 编号 interface检查线路协议。 – Track 编号 ip route检查网络可达性(即是否存在该路由)。 – Track 编号 list定义更复杂的条件。 – Track 编号 rtr检查诸如IP SLA的参数等。