系统城装机大师 - 固镇县祥瑞电脑科技销售部宣传站!

当前位置:首页 > 网络知识 > 路由器 > 详细页面

华为VRRP和浮动路由配置与应用

时间:2020-02-10来源:电脑系统城作者:电脑系统城

VRRP:
虚拟 路由器 冗余 协议
virtual router redundancy protocol

VRRP :(公有协议)
在多个路由器之间运行,
可以虚拟出一个或者多个网关IP地址(虚拟路由器);
从而实现内网不同网段之间的互通;

VRRP的工作过程:
1、运行VRRP的“多个”路由器之间通过 VRRP 报文的交互,从而选择
出一个最牛的路由器,作为 Master 路由器 ,以后就用来这个设备
来转发数据包;
2、Master 路由器,仅仅只有一个;其他的路由器称之为 backup 路由器;
3、同时,Master 和 Backup 路由器,会产生一个虚拟的路由器,也就是一个
虚拟的IP地址;

 拓扑图:

华为VRRP和浮动路由配置与应用

     配置步骤:
 SW2:
 vlan batch 10 20 30 40 50
interface Vlanif10
ip address 192.168.10.253 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.250
vrrp vrid 10 priority 120 vrrp vrid 10 track interface GigabitEthernet0/0/2 reduced 40
 interface Vlanif20
ip address 192.168.20.253 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.250
vrrp vrid 20 priority 120
vrrp vrid 20 track interface GigabitEthernet0/0/2 reduced 40
interface Vlanif30
ip address 192.168.30.253 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.30.250
interface Vlanif40
ip address 192.168.40.253 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.40.250
interface Vlanif50
ip address 192.168.50.1 255.255.255.0
 interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/2
port link-type access
port default vlan 50
 LSW3:
vlan batch 10 20 30 40 50
 interface Vlanif10
ip address 192.168.10.254 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.250
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.20.250
interface Vlanif30
ip address 192.168.30.254 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.30.250
vrrp vrid 30 priority 120
vrrp vrid 30 track interface GigabitEthernet0/0/2 reduced 30
interface Vlanif40
ip address 192.168.40.254 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.40.250
vrrp vrid 40 priority 120
vrrp vrid 40 track interface GigabitEthernet0/0/2 reduced 30
interface Vlanif50
ip address 192.168.60.1 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/2
port link-type access
port default vlan 50
LSW4:
vlan batch 10 20 30 40
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
interface GigabitEthernet0/0/3
port link-type access
port default vlan 30
interface GigabitEthernet0/0/4
port link-type access
port default vlan 40
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
 AR1:
interface GigabitEthernet0/0/0
ip address 192.168.50.2 255.255.255.0 
interface GigabitEthernet0/0/1
ip address 192.168.60.2 255.255.255.0 
浮动路由:
ip route-static 192.168.10.0 255.255.255.0 192.168.50.1
ip route-static 192.168.10.0 255.255.255.0 192.168.60.1 preference 100
ip route-static 192.168.20.0 255.255.255.0 192.168.50.1
ip route-static 192.168.20.0 255.255.255.0 192.168.60.1 preference 100
ip route-static 192.168.30.0 255.255.255.0 192.168.50.1 preference 100
ip route-static 192.168.30.0 255.255.255.0 192.168.60.1
ip route-static 192.168.40.0 255.255.255.0 192.168.50.1 preference 100
ip route-static 192.168.40.0 255.255.255.0 192.168.60.1
测试:
  display vrrp
  查看mster路由和backup路由

LSW2: 
华为VRRP和浮动路由配置与应用

LSW3:
华为VRRP和浮动路由配置与应用

分享到:

相关信息

  • 路由器重新设置wifi密码手机操作方法

    安装了新的网络之后首先要做的就是设置路由器的wifi密码了,但是有很多的用户并不知道该怎么使用手机来进行操作,毕竟手机使用很方便,下面就带来了路由器重新设置wifi密码手机操作方法,一起看看吧。...

    2023-10-26

  • 路由器重新设置wifi密码网址详情

    路由器的密码进行设置是使用电脑用户家常便饭的问题,不过很多的用户遇到的第一个问题就是不知道网址去进行重置,下面就带来了路由器重新设置wifi密码网址详情,一起来看看怎么进入吧。...

    2023-10-26

系统教程栏目

栏目热门教程

人气教程排行

站长推荐

热门系统下载