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

下载本文档

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

文档简介

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

2、>system-viewHUAWEI sysname SwitchASwitchAvlan batch 100 300SwitchAinterface gigabitethernet 1/0/1SwitchA-GigabitEthernet1/0/1port link-type hybridSwitchA-GigabitEthernet1/0/1port hybrid pvid vlan 300SwitchA-GigabitEthernet1/0/1port hybrid untagged vlan 300SwitchA-GigabitEthernet1/0/1quitSwitchAin

3、terface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2port link-type hybridSwitchA-GigabitEthernet1/0/2port hybrid pvid vlan 100SwitchA-GigabitEthernet1/0/2port hybrid untagged vlan 100SwitchA-GigabitEthernet1/0/2quitSwitchAinterface vlanif 100SwitchA-Vlanif100ip address 10.1.1.1 24SwitchA-Vlanif

4、100quitSwitchAinterface vlanif 300SwitchA-Vlanif300ip address 192.168.1.1 24SwitchA-Vlanif300quit# 配置 Switch 的二层转发功能。<HUAWEI>system-viewHUAWEIsysname SwitchSwitchvlan 100Switch-vlan100quitSwitchinterface gigabitethernet 1/0/1Switch-GigabitEthernet1/0/1port link-type hybridSwitch-GigabitEtherne

5、t1/0/1port hybrid pvid vlan 100Switch-GigabitEthernet1/0/1port hybrid untagged vlan 100Switch-GigabitEthernet1/0/1quitSwitchinterface gigabitethernet 1/0/2Switch-GigabitEthernet1/0/2port link-type hybridSwitch-GigabitEthernet1/0/2port hybrid pvid vlan 100Switch-GigabitEthernet1/0/2port hybrid untagg

6、ed vlan 100Switch-GigabitEthernet1/0/2quit# 配置 SwitchA 、SwitchB和 SwitchC 间采用 OSPF 协议进行互连。以SwitchA 为例,SwitchB 和 SwitchC 的配置与 SwitchA 类似,详见配置文件。SwitchAospf 1SwitchA-ospf-1area 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-a

7、rea-0.0.0.0quitSwitchA-ospf-1quit2. 配置 VRRP 备份组# 在 SwitchA 上创建 VRRP 备份组 1,配置 SwitchA 在该备份组中的优先级为120,并配置抢占时间为20 秒。SwitchA interface vlanif 100SwitchA-Vlanif100vrrp vrid 1 virtual-ip 10.1.1.111SwitchA-Vlanif100vrrp vrid 1 priority 120/设备在VRRP备份组中的优先级缺省为100,修改Master设备的优先级大于Backup设备SwitchA-Vlanif100vrrp

8、 vrid 1 preempt-mode timer delay 20/设备在VRRP备份组中缺省采用立即抢占方式。修改Master 设备的延迟抢占时间,以避免在网络环境不稳定时,由于双方频繁抢占而导致流量中断的问题SwitchA-Vlanif100quit# 在 SwitchB 上创建 VRRP 备份组 1,其在该备份组中的优先级采用缺省值100(不需要配置)。SwitchBinterface vlanif 100SwitchB-Vlanif100SwitchB-Vlanif100quit3. 验证配置结果# 完成上述配置以后,在SwitchA 和 SwitchB 上分别执行display

9、vrrp命令,可以看到 SwitchA 在备份组中的状态为 Master,SwitchB 在备份组中的状态为 Backup 。SwitchAdisplay vrrpVlanif100 | Virtual Router 1State : MasterPriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YESDelay Time : 20 sTimerRun : 1 sTimerConfig : 1 sAuth type : NONEVirtual MAC : 0000-5e00-0101Check TTL : YE

10、SConfig type : normal-vrrpBackup-forward : disabledCreate time : 2012-01-12 20:15:46Last change time : 2012-01-12 20:15:46SwitchBdisplay vrrpVlanif100 | Virtual Router 1State : BackupPriorityRun : 100PriorityConfig : 100MasterPriority : 120Preempt : YESDelay Time : 0 sTimerRun : 1 sTimerConfig : 1 s

11、Auth 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命令,SwitchA上可以看到路由表中有一条目的地址为虚拟IP 地址的直连路由,而SwitchB上该路由为OSPF 路由。 SwitchA 和 Swi

12、tchB 上的显示信息如下。SwitchAdisplay ip routing-tableRoute Flags: R - relay, D - download to fib-Routing Tables: PublicDestinations : 9Routes : 10Destination/MaskProtoPre CostFlags NextHopInterface10.1.1.0/24Direct00D10.1.1.1Vlanif10010.1.1.1/32Direct00D127.0.0.1Vlanif10010.1.1.111/32Direct00D127.0.0.1Vlani

13、f100127.0.0.0/8 Direct 0 0D127.0.0.1InLoopBack0127.0.0.1/32 Direct 0 0D127.0.0.1InLoopBack0172.16.1.0/24OSPF102D192.168.1.2Vlanif300192.168.1.0/24 Direct 0 0D192.168.1.1Vlanif300192.168.1.1/32 Direct 0 0D127.0.0.1Vlanif300192.168.2.0/24OSPF102D10.1.1.2Vlanif100OSPF102DVlanif300SwitchBdisplay ip rout

14、ing-tableRoute Flags: R - relay, D - download to fib-Routing 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.1Vlanif100127.0.0.0/8Direct00D127.0.0.1InLoo

15、pBack0127.0.0.1/32Direct 00D 127.0.0.1InLoopBack0172.16.1.0/24OSPF102D192.168.2.2 Vlanif200192.168.1.0/24OSPF102D10.1.1.1Vlanif100OSPF 102D192.168.2.2 Vlanif200192.168.2.0/24Direct00D192.168.2.1Vlanif200192.168.2.1/32Direct00D127.0.0.1Vlanif200# 在 SwitchA 的接口 GE1/0/2 上执行 shutdown命令,模拟 SwitchA出现故障。Sw

16、itchA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2shutdownSwitchA-GigabitEthernet1/0/2quit# 在SwitchB上执行display vrrp命令查看VRRP状态信息,可以看到SwitchB的状态是Master。SwitchBdisplay vrrpVlanif100 | Virtual Router 1State : MasterPriorityRun : 100PriorityConfig : 100MasterPriority : 100Preempt : YESDela

17、y 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# 在 SwitchA 的接口 GE1/0/2 上执行 undo shutdown命令。SwitchAinterface gigabitethernet

18、1/0/2SwitchA-GigabitEthernet1/0/2undo shutdownSwitchA-GigabitEthernet1/0/2quit# 等待20 秒后,在SwitchA上执行display vrrp命令查看VRRP状态信息,可以看到SwitchA的状态恢复成Master。SwitchAdisplay vrrpVlanif100 | Virtual Router 1State : MasterPriorityRun : 120PriorityConfig : 120MasterPriority : 120Preempt : YESDelay Time : 20 sTime

19、rRun : 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:20:56配置文件? SwitchA 的配置文件? #? sysname SwitchA? #? vlan batch 100 300? #? interface Vlanif100? vrrp

20、vrid 1 priority 120? vrrp vrid 1 preempt-mode timer delay 20? #? interface Vlanif300? #? interface GigabitEthernet1/0/1? port link-type hybrid? port hybrid pvid vlan 300? port hybrid untagged vlan 300? #? interface GigabitEthernet1/0/2? port link-type hybrid? port hybrid pvid vlan 100? port hybrid u

21、ntagged vlan 100? #? ospf 1? #return? SwitchB 的配置文件? #? sysname SwitchB? #? vlan batch 100 200? #? interface Vlanif100? #? interface Vlanif200? #? interface GigabitEthernet1/0/1? port link-type hybrid? port hybrid pvid vlan 200? port hybrid untagged vlan 200? #? interface GigabitEthernet1/0/2? port link-type hybrid? port hybrid pvid vlan 100? port hybrid untagged vlan 100? #? ospf 1? #return? SwitchC 的配置文件? #? sysname SwitchC? #? vlan batch 200 300 400? #? interface V

温馨提示

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

评论

0/150

提交评论