华为交换机VRRP配置_第1页
华为交换机VRRP配置_第2页
华为交换机VRRP配置_第3页
华为交换机VRRP配置_第4页
华为交换机VRRP配置_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、GEUO/1GE1/0/21Q.1.1.1/24Master1 £81 1:21SwitchSwitchCGE1Z0/1J92J6fi.1.2/24Ml GE 1/0/3Ho 6tA GE 1/0/2 10.1.1.100/24GE 1/0/2 1 10.1.1.2/247*ri72.16J,1/Z+GE 1/0/2 192.1682224r*G£1W1192 J 83.2.1/24 SwrtchB图3-128配置VRRP主备备份组网图VRRP VRID 1Virtual IP Address:SwitChASwitchA-GigabitEthernet1/0/2port

2、hybrid pvid vlan 100SwitchA-GigabitEthernet1/0/1SwitchA-GigabitEthernet1/0/1SwitchA-GigabitEthernet1/0/1SwitchA-GigabitEthernet1/0/1SwitchAport link-type hybridport hybrid pvid vlan 300port hybrid untagged vlan 300quitinterface gigabitethernet 1/0/2Backup配置思路采用VRRP主备备份实现网关冗余备份,配置思路如下:1. 配置各设备接口 IP地址

3、及路由协议,使各设备间网络层连通。2. 在SwitchA和SwitchB上配置VRRP备份组。其中,SwitchA上配置较高优先级和 20 秒抢占延时,作为Master设备承担流量转发;SwitchB上配置较低优先级, 作为备用交 换机,实现网关冗余备份。操作步骤1. 配置设备间的网络互连#配置设备各接口的IP地址,以 SwitchA为例。SwitchB和SwitchC的配置与 SwitchA类似,详见配置文件。<HUAWEI> system-viewHUAWEI sysname SwitchASwitchA vlan batch 100 300SwitchA interface

4、gigabitethernet 1/0/1SwitchA-GigabitEthernet1/0/2port link-type hybridSwitchA-GigabitEthernet1/0/2 port hybrid untagged vlan 100 SwitchA-GigabitEthernet1/0/2 quit SwitchA interface vlanif 100 SwitchA-Vlanif100 ip address 10.1.1,1 24 SwitchA-Vlanif100 quit SwitchA interface vlanif 300 SwitchA-Vlanif3

5、00 ip address 192.168.1.1 24 SwitchA-Vlanif300 quit#配置Switch的二层转发功能。<HUAWEI> system-view HUAWEI sysname Switch Switch vlan 100 Switch-vlan100 quitport link-type hybridport hybrid pvid vlan 100Switch interface gigabitethernet 1/0/1 Switch-GigabitEthernet1/0/1Switch-GigabitEthernet1/0/1Switch-Gi

6、gabitEthernet1/0/1port hybrid untagged vlan 100Switch-GigabitEthernet1/0/1quitSwitch interface gigabitethernet 1/0/2Switch-GigabitEthernet1/0/2port link-type hybridSwitch-GigabitEthernet1/0/2port hybrid pvid vlan 100Switch-GigabitEthernet1/0/2port hybrid untagged vlan 100Switch-GigabitEthernet1/0/2q

7、uit# 配置 SwitchA、SwitchB 和SwitchC间采用OSPF协议进行互连。以 SwitchA为例,SwitchB和SwitchC的配置与SwitchA类似,详见配置文件。SwitchA ospf 1SwitchA-ospf-1 area 0SwitchA-ospf-1-area-0.0.0,0network 10.1.1.0 0.0.0,255SwitchA-ospf-1-area-0.0.0,0network 192.168.1.0 0.0.0.255SwitchA-ospf-1-area-0.0.0,0quitSwitchA-ospf-1 quit2.配置VRRP备份组#

8、在SwitchA上创建VRRP备份组1,配置SwitchA在该备份组中白勺优先级为120,并配置抢占时间为20秒。SwitchA interface vlanif 100SwitchA-Vlanif100 vrrp vrid 1 virtual-ip 10.1.1,111SwitchA-Vlanif100 vrrp vrid 1 priority 120/ 设备在 VRRP 备份组中的优先级缺省为100 ,修改Master设备的优先级大于Backup设备SwitchA-Vlanif100 vrrp vrid 1 preempt-mode timer delay 20/设备在 VRRP 备份组中

9、缺省采用立即抢占方式。修改Master设备的延迟抢占时间,以避免在网络环境不稳定时,由于双方频繁抢占而导致流量中断的问题SwitchA-Vlanif100 quit#在SwitchB上创建VRRP备份组1,其在该备份组中的优先级采用缺省值100 (不需要配置)。SwitchB interface vlanif 100SwitchB-Vlanif100 vrrp vrid 1 virtual-ip 10.1.1.111SwitchB-Vlanif100 quit3.验证配置结果#完成上述配置以后,在 SwitchA和SwitchB上分别执行display vrrp 命令,可以看到 SwitchA

10、在备份组中的状态为Master , SwitchB在备份组中的状态为Backup。SwitchA display vrrpVlanif100 | Virtual Router 1State : MasterVirtual IP : 10.1.1.111Master IP : 10.1.1.1PriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YES Delay Time : 20 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-

11、5e00-0101Check TTL : YESConfig type : normal-vrrpBackup-forward : disabledCreate time : 2012-01-12 20:15:46Last change time : 2012-01-12 20:15:46SwitchB display vrrpVlanif100 | Virtual Router 1State : BackupVirtual IP : 10.1.1.111Master IP : 10.1.1.1PriorityRun : 100PriorityConfig : 100MasterPriorit

12、y : 120Preempt : YES Delay Time : 0 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-0101Check TTL : YESConfig type : normal-vrrpBackup-forward : disabledCreate time : 2012-01-12 20:15:46Last change time : 2012-01-12 20:15:46# 在 SwitchA 和 SwitchB 上执行 display ip routing-table 命

13、令,SwitchA 上可以看到路 由表中有一条目的地址为虚拟IP地址的直连路由,而 SwitchB上该路由为OSPF路由。SwitchA和SwitchB上的显示信息如下。SwitchA display ip routing-tableRoute Flags: R - relay, D - download to fibRouting Tables: PublicDestinations : 9Routes : 10Destination/MaskProtoPreCostFlags NextHopInterface10.1.1.0/24Direct00D10.1.1.1Vlanif10010.1

14、.1.1/32Direct00D127.0.0.1Vlanif10010.1.1.111/32Direct 00D127.0.0.1Vlanif100127.0.0.0/8Direct00D127.0.0.1InLoopBack0127.0.0.1/32Direct00D127.0.0.1InLoopBack0172.16.1.0/24OSPF102D192.168.1.2Vlanif300192.168.1.0/24Direct00D192.168.1.1Vlanif300192.168.1.1/32Direct00D127.0.0.1Vlanif300192.168.2.0/24OSPF1

15、02D10.1.1.2Vlanif100OSPF102D192.168.1.2Vlanif300Route Flags: R - relay, D - download to fibRouting Tables: PublicDestinations : 9Routes : 10Destination/MaskProtoPre (CostFlags NextHopInterface10.1.1.0/24Direct00D10.1.1.2Vlanif10010.1.1.2/32Direct00D127.0.0.1Vlanif10010.1.1.111/32OSPF102D10.1.1.1Vlan

16、if100127.0.0.0/8Direct00D127.0.0.1InLoopBack0127.0.0.1/32Direct00D127.0.0.1InLoopBack0172.16.1.0/24OSPF102D192.168.2.2Vlanif200192.168.1.0/24OSPF102D10.1.1.1Vlanif100OSPF102D192.168.2.2Vlanif200192.168.2.0/24Direct00D192.168.2.1Vlanif200192.168.2.1/32Direct00D127.0.0.1Vlanif200#在SwitchA的接口GE1/0/2上执行

17、shutdown 命令,模拟 SwitchA出现故障。SwitchA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2shutdownSwitchA-GigabitEthernet1/0/2quit#在SwitchB上执行display vrrp命令查看VRRP状态信息,可以看到SwitchB的状态是 Master。SwitchB display vrrpVlanif100 | Virtual Router 1State : MasterVirtual IP : 10.1.1.111Master IP : 10.1.1.2P

18、riorityRun : 100PriorityConfig : 100MasterPriority : 100Preempt : YES Delay Time : 0 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-0101Check TTL : YESConfig type : normal-vrrpBackup-forward : disabledCreate time : 2012-01-12 20:15:46Last change time : 2012-01-12 20:18:40# 在

19、 SwitchA 的接口 GE1/0/2 上执行 undo shutdown 命令。SwitchA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2undo shutdownSwitchA-GigabitEthernet1/0/2quit#等待20秒后,在SwitchA上执行display vrrp 命令查看 VRRP状态信息,可以看到 SwitchA的状态恢复成Master。SwitchA display vrrpVlanif100 | Virtual Router 1State : MasterVirtual IP :

20、10.1.1.111Master IP : 10.1.1.1PriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YES Delay Time : 20 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-0101Check TTL : YESConfig type : normal-vrrpBackup-forward : disabledCreate time : 2012-01-12 20:15:46Last chan

21、ge time : 2012-01-12 20:20:56配置文件? SwitchA的配置文件?#? sysname SwitchA?#? vlan batch 100 300interface Vlanif100ip address 10.1.1.1 255.255.255.0vrrp vrid 1 virtual-ip 10.1.1.111vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 20#interface Vlanif300ip address 192.168.1.1 255.255.255.0interfac

22、e GigabitEthernet1/0/1port link-type hybridport hybrid pvid vlan 300port hybrid untagged vlan 300? interface GigabitEthernet1/0/2?port link-type hybrid?port hybrid pvid vlan 100?port hybrid untagged vlan100?#? ospf 1? area 0.0.0.0?network 10.1.1.0 0.0.0.255?network 192.168.1.0 0.0.0.255?#return? Swi

23、tchB的配置文件?#? sysname SwitchB?#? vlan batch 100 200?#? interface Vlanif100?ip address 10.1.1.2 255.255.255.0?vrrp vrid 1 virtual-ip 10.1.1.111?#? interface Vlanif200? ip address 192.168.2.1 255.255.255.0?#? interface GigabitEthernet1/0/1? port link-type hybridport hybrid pvid vlan 200port hybrid unta

24、gged vlan 200interface GigabitEthernet1/0/2port link-type hybridport hybrid pvid vlan 100port hybrid untagged vlan 100# ospf 1area 0.0.0.0network 10.1.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255return? SwitchC的配置文件sysname SwitchC vlan batch 200 300 400 interface Vlanif200ip address 192.168.2.2 255.255.255.0inte

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论