2

华为vrrp的配置方法,华为路由器配置VRRP

关于【华为vrrp的配置方法】,今天小编给您分享一下,如果对您有所帮助别忘了关注本站哦。

  • 内容导航:
  • 1、华为vrrp的配置方法:华为路由器配置VRRP
  • 2、华为vrrp的配置方法,华为H3C和锐捷一起学习如何配置VRRP

1、华为vrrp的配置方法:华为路由器配置VRRP

VRRP全称是虚拟路由亢余协议,它是一种容错协议。该协议通过把几台路由器设备组成

一台虚拟路由设备,该虚拟路由器在本地局域网拥有唯一的一个虚拟ID和虚拟IP地址。

实际上,该虚拟路由器是由一个Master设备和若干Backup设备组成。正常情况下,业务

由Master承担,所有用户端仅需设置此虚拟IP为网关地址。当Master出现故障时,Backup

接替工作,及时将业务切换到备份路由器,从而保持通信的连续性和可靠性。而用户端无需做

任何配置更改,对故障无感知。

多组VRRP原理概述:

当VRRP配置为单备份组时,业务全部由master设备承担,而backup设备完全

处于空闲状态,没有得到充分利用。

VRRP可通过配置多备份组来实现负载分担,有效的解决了这一问题。

VRRP允许同一设备的同一个接口加入多个VRRP备份组,在不同备份组中由不

同的优先级,使得各备份组中的master设备不同。

也就是建立多个虚拟网关路由器。各主机可以使用不同的虚拟组路由器作为网关出口,这

样可以达到分担数据流而又相互备份的目的,充分利用了每一台设备的资源。


实验拓扑图

华为vrrp的配置方法,华为路由器配置VRRP

多组VRRP

1.配置IP地址:

华为vrrp的配置方法,华为路由器配置VRRP

R1端口IP

<Huawei>system-view //进入视图模式

[Huawei]undo info-center enable //关闭消息控制中心

[Huawei]sysname R1 //重命名R1

[R1]interface g0/0/0 //进入端口

[R1-GigabitEthernet0/0/0]ip address 172.16.3.254 24 //设置IP地址

[R1-GigabitEthernet0/0/0]undo shutdown //启用端口

[R1-GigabitEthernet0/0/0]quit //退出

[R1]interface g0/0/1 //进入端口

[R1-GigabitEthernet0/0/1]ip address 172.16.2.254 24 //设置IP地址

[R1-GigabitEthernet0/0/1]undo shutdown //启用端口

[R1-GigabitEthernet0/0/1]quit //退出


华为vrrp的配置方法,华为路由器配置VRRP

R2路由器配置IP

<Huawei>system-view //进入视图模式

[Huawei]undo info-center enable //关闭消息控制中心

[Huawei]sysname R2 //重命名

[R2]interface g0/0/0 //进入端口

[R2-GigabitEthernet0/0/0]ip address 172.16.1.100 24 //设置IP地址

[R2-GigabitEthernet0/0/0]undo shutdown //启用端口

[R2-GigabitEthernet0/0/0]quit //退出

[R2]interface g0/0/1 //进入端口

[R2-GigabitEthernet0/0/1]ip address 172.16.2.100 24 //设置IP地址

[R2-GigabitEthernet0/0/1]undo shutdown //启用端口

[R2-GigabitEthernet0/0/1]quit //退出


华为vrrp的配置方法,华为路由器配置VRRP

R3配置端口IP

<Huawei>system-view //进入视图模式

[Huawei]undo info-center enable //关闭消息控制中心

[Huawei]sysname R3 //重命名

[R3]interface g0/0/0 //进入端口

[R3-GigabitEthernet0/0/0]ip address 172.16.3.200 24 //设置IP地址

[R3-GigabitEthernet0/0/0]undo shutdown //开启端口

[R3-GigabitEthernet0/0/0]quit //退出

[R3]interface g0/0/1 //进入端口

[R3-GigabitEthernet0/0/1]ip address 172.16.1.200 24 //设置IP地址

[R3-GigabitEthernet0/0/1]undo shutdown //开启端口

[R3-GigabitEthernet0/0/1]quit //退出


华为vrrp的配置方法,华为路由器配置VRRP

pc1配置IP地址

华为vrrp的配置方法,华为路由器配置VRRP

pc2配置IP地址


2.配置ospf协议进程,实现路由通信

华为vrrp的配置方法,华为路由器配置VRRP

R1创建ospf进程

华为vrrp的配置方法,华为路由器配置VRRP

R2创建ospf进程

华为vrrp的配置方法,华为路由器配置VRRP

R3创建ospf进程

3.在R2 R3创建vrrp备份组

华为vrrp的配置方法,华为路由器配置VRRP

VRRP 1 master

华为vrrp的配置方法,华为路由器配置VRRP

VRRP1 backup

华为vrrp的配置方法,华为路由器配置VRRP

VRRP 2 master

华为vrrp的配置方法,华为路由器配置VRRP

VRRP2 backup

配置VRRP 1

[R2]interface g0/0/0 //进入G0/0/0接口

[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 172.16.1.254 //创建vrrp备份组,vrrp备份组号为1,配置虚拟IP为172.16.1.254,注意虚拟ip地址必须和当前接口在同一网段。

[R2-GigabitEthernet0/0/0]vrrp vrid 1 priority 120 //设置组号为1的vrrp的优先级为120,默认优先级为120

[R2-GigabitEthernet0/0/0]quit //退出

[R3]interface g0/0/1 //在R3上进入G0/0/1接口

[R3-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 172.16.1.254 //创建vrrp备份组,vrrp备份组号为1,配置虚拟IP为172.16.1.254,注意虚拟ip地址必须和当前接口在同一网段。

[R3-GigabitEthernet0/0/1]quit //退出 R3的vrrp没有设置优先级,那么它的优先级是默认100,低于R2,所以状态是备份backup。

配置VRRP 2

[R3]interface g0/0/1 //进入G0/0/0接口

[R3-GigabitEthernet0/0/1]vrrp vrid 2 virtual-ip 172.16.1.253 //创建vrrp备份组,vrrp备份组号为1,配置虚拟IP为172.16.1.253,注意虚拟ip地址必须和当前接口在同一网段。

[R3-GigabitEthernet0/0/1]vrrp vrid 2 priority 120 //设置组号为2的vrrp的优先级为120,默认优先级为100

[R3-GigabitEthernet0/0/1]quit

[R2]interface g0/0/0 //进入R2的G0/0/0接口

[R2-GigabitEthernet0/0/0]vrrp vrid 2 virtual-ip 172.16.1.253 //创建vrrp备份组,vrrp备份组号为1,配置虚拟IP为172.16.1.253

[R2-GigabitEthernet0/0/0]quit //退出 R2的vrrp没有设置优先级,那么它的优先级是默认100,低于R3,所以状态是备份backup。


4.查看VRRP配置

华为vrrp的配置方法,华为路由器配置VRRP

命令:display vrrp brief

5.测试线路

华为vrrp的配置方法,华为路由器配置VRRP

2、华为vrrp的配置方法,华为H3C和锐捷一起学习如何配置VRRP

华为

华为vrrp的配置方法,华为路由器配置VRRP

1、配置设备间的网络互联。

#配置设备各接口的IP地址,配置SwitchA。

system-view

sysname switchA

vlan batch 100 300

interface gigabitethernet 1/0/1

port link-type hybrid

port hybrid pvid vlan 300

port hybrid untagged vlan 300

quit

interface gigabitethernet 1/0/2

port link-type hybrid

port hybrid pvid vlan 100

port hybrid untagged vlan 100

quit

interface vlanif 100

ip address 10.1.1.1 24

quit

interface vlanif 300

ip address 192.168.1.1 24

quit

#SwitchB和SwitchC配置与SwitchA类似,不在赘述。

#配置Switch的二层转发功能。

system-view

sysname switch

vlan batch 100

interface gigabitethernet 1/0/1

port link-type hybrid

port hybrid pvid vlan 100

port hybrid untagged vlan 100

quit

interface gigabitethernet 1/0/2

port link-type hybrid

port hybrid pvid vlan 100

port hybrid untagged vlan 100

quit

#配置SwitchA/B/C间采用OSPF协议进行路由学习。

ospf 1

area 0

network 10.1.1.0 0.0.0.255

network 192.168.1.0 0.0.0.255

quit

#SwitchB和SwitchC配置与SwitchA类似,不在赘述。

2.配置VRRP备份组。

#在switchA上创建VRRP备份组1,配置SwitchA在该备份组中的优先级为120,并配置抢占时间为20秒。

interface vlanif 100

vrrp vrid 1 virtual-ip 10.1.1.111

vrrp vrid 1 priority 120

vrrp vrid 1 preempt-mode timer delay 20

quit

#在switchB上创建VRRP备份组1,其在该备份组中的优先级为缺省值100。

interface vlanif 100

vrrp vrid 1 virtual-ip 10.1.1.111

quit

3.验证配置结果。

#在switchA/B上使用display vrrp命令,查看备份中的状态。switchA为master,switchB为backup。

display vrrp

#在switchA/B上使用display ip routing-table命令,查看SwitchA的路由表有一条目的地址为虚拟IP的直连路由,而switchB上该路由为OSPF路由。

display ip routing-table

#在SwitchA的接口ge1/0/2上执行shutdown,模拟swtichA故障,在switchB上使用display vrrp命令查看VRRP状态信息,switchB的状态为master。

#在SwitchA的接口ge1/0/2上执行undo shutdown,等待20秒后,在switchA上使用display vrrp命令查看VRRP状态信息,switchA的状态恢复为master。

H3C

华为vrrp的配置方法,华为路由器配置VRRP

1.配置SwitchA。

#配置vlan2。

system-view

vlan 2

port fortygige 1/0/5

quit

interface vlan-interface 2

ip address 10.1.1.1 255.255.255.0

#创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.111。

vrrp vrid 1 virtual-ip 10.1.1.111

#配置switchA在备份组1中的优先级为110,以保证switchA成为master负责转发流量。

vrrp vrid 1 priority 110

#配置switchA抢占,保证switchA故障恢复后,能再次抢占成为master,避免频繁地进行状态切换,配置抢占延迟时间为5000厘秒。

vrrp vrid 1 preempt-mode delay 5000

2.配置switchB。

#配置vlan2。

system-view

vlan 2

port fortygige 1/0/5

quit

interface vlan-interface 2

ip address 10.1.1.2 255.255.255.0

#创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.111。

vrrp vrid 1 virtual-ip 10.1.1.111

#配置switchA在备份组1中的优先级为100。

vrrp vrid 1 priority 100

#配置switchB抢占,抢占延迟时间为5000厘秒。

vrrp vrid 1 preemtp-mode delay 5000

3.验证配置。

#使用命令display vrrp verbose在switchA和switchB上查看vrrp详细信息。

display vrrp verbose

#switchA故障时,流量从switchB走,故障恢复后,流量依然从switchA走。

锐捷

华为vrrp的配置方法,华为路由器配置VRRP

1.配置连通性。

#核心交换机A和核心交换机B的配置。

vlan 10

exit

interface fastethernet 0/1

switch mode trunk

#接入交换机的配置。

vlan 10

exit

interface fastethernet 0/1

switch mode trunk

exit

interface fastethernet 0/2

switch mode trunk

exit

interface fastethernet 0/10

switch access vlan 10

exit

interface fastethernet 0/20

switch access vlan 20

exit

#vrrp配置。

核心交换机A的配置。

int vlan 10

ip address 192.168.10.254 255.255.255.0

vrrp 1 ip 192.168.10.1

vrrp 1 priority 120

exit

核心交换机B的配置。

int vlan 10

ip address 192.168.10.254 255.255.255.0

vrrp 1 ip 192.168.10.1

exit

2.验证配置。

show vrrp brief #查看vrrp状态。

show vrrp 1 #查看vrrp组1的详细信息。

本文关键词:华为vrrp配置实例,华为vrp基本操作,华为vrrp与bfd配置实例,华为 vrrp,华为vrp的四种基础模式。这就是关于《华为vrrp的配置方法,华为路由器配置VRRP》的所有内容,希望对您能有所帮助!

本文来自网络,不代表本站立场。转载请注明出处: https://tj.jiuquan.cc/a-2087087/
1
上一篇 养鸡的六大方法,养鸡十五种新方法
下一篇 武则天有多宠皇子,武则天有多少个男宠

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: alzn66@foxmail.com

关注微信

微信扫一扫关注我们

返回顶部