示例图:

其实说白了就是做线路冗余,达到热备切换。

组网需求:

楼层1和楼层2分别通过两条线路做冗余接入交换机(本示例只考虑vrrp,暂不考虑其他方面)。当其中一段链路故障时,能通过另外一条链路传输。

配置信息:

<lsw9>dis cu

#

sysname lsw9

#

vlan batch 10 20

#

stp mode stp

#

interface Ethernet0/0/2

 port link-type access

 port default vlan 10

#

interface Ethernet0/0/3

 port link-type access

 port default vlan 20

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 10 20

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 10 20

 stp instance 0 cost 200000000

#

return

<lsw9>

--------------------------

<lsw11>dis cu

#

sysname lsw11

#

vlan batch 30

#

stp mode stp

#

interface Ethernet0/0/2

 port link-type access

 port default vlan 30

#

interface Ethernet0/0/3

 port link-type access

 port default vlan 30

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 30

 stp instance 0 cost 200000000

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 30

#

return

<lsw11>

-------------------------

<lsw7>dis cu

#

sysname lsw7

#

vlan batch 10 20 30 100

#

stp mode stp

#

interface Vlanif1

#

interface Vlanif10

 description to 1 L

 ip address 10.155.10.254 255.255.255.0

 vrrp vrid 1 virtual-ip 10.155.10.252

 vrrp vrid 1 priority 120

 vrrp vrid 1 preempt-mode timer delay 20

#

interface Vlanif20

 ip address 10.155.20.254 255.255.255.0

 vrrp vrid 1 virtual-ip 10.155.20.252

 vrrp vrid 1 priority 120

 vrrp vrid 1 preempt-mode timer delay 20

#

interface Vlanif30

 description to 5 L

 ip address 10.156.40.254 255.255.255.0

 ip address 10.156.30.254 255.255.255.0 sub

 vrrp vrid 1 virtual-ip 10.156.30.252

 vrrp vrid 2 virtual-ip 10.156.40.252

 vrrp vrid 2 priority 120

 vrrp vrid 2 preempt-mode timer delay 20

#

interface Vlanif100

 ip address 10.10.10.1 255.255.255.0

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 port link-type access

 port default vlan 100

#

interface GigabitEthernet0/0/11

 port link-type trunk

 port trunk pvid vlan 100

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/21

 port link-type trunk

 port trunk allow-pass vlan 30

#

ospf 1

 area 0.0.0.0

  network 10.10.10.0 0.0.0.255

  network 10.155.0.0 0.0.255.255

  network 10.156.0.0 0.0.255.255

#

return

--------------------------------------

<lsw8>dis cu

#

sysname lsw8

#

vlan batch 10 20 30 200

#

stp mode stp

#

interface Vlanif1

#

interface Vlanif10

 description to 1 L

 ip address 10.155.10.253 255.255.255.0

 vrrp vrid 1 virtual-ip 10.155.10.252

#

interface Vlanif20

 description to 1 L

 ip address 10.155.20.253 255.255.255.0

 vrrp vrid 1 virtual-ip 10.155.20.252

#

interface Vlanif30

 description to 5 L

 ip address 10.156.30.253 255.255.255.0

 ip address 10.156.40.253 255.255.255.0 sub

 vrrp vrid 1 virtual-ip 10.156.30.252

 vrrp vrid 1 priority 120

 vrrp vrid 1 preempt-mode timer delay 20

 vrrp vrid 2 virtual-ip 10.156.40.252

#

interface Vlanif200

 ip address 10.10.20.1 255.255.255.0

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 10 20

#

interface GigabitEthernet0/0/12

 port hybrid pvid vlan 200

 port hybrid tagged vlan 1 to 4094

#

interface GigabitEthernet0/0/22

 port link-type trunk

 port trunk allow-pass vlan 30

#

ospf 1

 area 0.0.0.0

  network 10.155.0.0 0.0.255.255

  network 10.156.0.0 0.0.255.255

  network 10.10.20.0 0.0.0.255

#

return

<lsw8>

-----------------

<R4>dis cu

#

sysname R4

#

stp instance 0 root primary

stp enable

#

interface GigabitEthernet0/0/1

 ip address 10.10.10.254 255.255.255.0

 stp enable

#

interface GigabitEthernet0/0/2

 ip address 10.10.20.254 255.255.255.0

 stp enable

#

interface GigabitEthernet0/0/3

 ip address 61.128.128.6 255.255.255.0

#

return

<R4>

参考:

http://www.023wg.com/kkxpz/85.html(以上内容转自此篇文章)

华为交换机VRRP配置实例收集(转)的更多相关文章

  1. 华为交换机MSTP+VRRP配置实例说明文档

    华为交换机MSTP+VRRP配置实例说明文档 拓扑图 IP地址规划表 设备名称 设备接口 对端设备 对端接口 VLAN VLAN /接口地址 备注 SW0 GE0/0/23 SW2 GE0/0/23 ...

  2. 华为交换机sflow配置

    华为交换机sflow功能配置 1.配置交换机的sflow流发送 [系统视图]sflow agen ip  x.x.x.x                 设置sflow输出源 [系统视图]sflow ...

  3. 华为交换机-SNMP配置

    1.1     SNMP基础配置 <switch>system-view 进入交换机的配置模式 [switch]snmp-agent 使能snmp服务 [switch]snmp-agent ...

  4. 华为交换机VRRP 综合配置示例

    组网需求: 楼层1和楼层2分别通过两条线路做冗余接入交换机(本示例只考虑vrrp,暂不考虑其他方面).当其中一段链路故障时,能通过另外一条链路传输. 配置信息: <lsw9>dis cu ...

  5. 华为交换机netstream配置

    1.配置交换机的流发送 [系统视图]ip netstream timeout active 100         流活跃时间 [系统视图]ip netstream timeout inactive ...

  6. 华为交换机telnet配置

    1.在路由器上和交换机相连的借口上配置一个IP地址:比如192.168.1.1 24 2.在交换机上配置如下:<switch>system-view[switch]vlan 10[swit ...

  7. 华为交换机如何配置SSH远程登录,一分钟秒学会

    从事网络运维工作的小伙伴们都知道,在交换机正式上线时,必须完成配置SSH远程登录,这样做目的是为了日后,维护方便,不需要每次登录设备都要跑到机房,这样既不现实,又费事. 远程登录方式 目前网络设备中主 ...

  8. 华为交换机SSH配置

    设备:S5700 一.在本地设备服务端生成秘钥对 [Huawei]rsa local-key-pair create 二.配置VTY [Huawei]user-interface vty 0 4进入虚 ...

  9. MSTP+ VRRP 交换机的 配置过程

    配置思路采用以下思路配置: 1.在处于环形网络中的交换设备上配置MSTP基本功能,包括:a.配置MST域并创建多实例,配置VLAN2映射到MSTI1,VLAN3映射到MSTI2,实现流量的负载分担. ...

随机推荐

  1. [python]python错误集锦

    ValueError: invalid literal : ''不能将非数字字符串转换为整型 object has no attribute 对象调用一个没有的方法(内建或自定义) TypeError ...

  2. 总结---Python中的面向对象!

    面向对象这种编程的范式每个语言都是通用的,这里总结一下python的面向对象语法,主要包含以下几个方面! 1 基本语法 # 定义类 class Person(object): n = 10 # 类变量 ...

  3. 字符串格式化(百分号&format)

    字符串格式化 Python的字符串格式化有两种方式: 百分号方式.format方式 百分号方式: %[(name)][flags][width].[precision]typecode [  ]:表示 ...

  4. oracle行转列

    wm_concat()函数 --创建表 create table test(id number,name varchar2(20)); --插入数据 insert into test values(1 ...

  5. springcloud服务安全连接

    Spring Cloud可以增加HTTP Basic认证来增加服务连接的安全性. 1.加入security启动器 在maven配置文件中加入Spring Boot的security启动器. <d ...

  6. centos6.5环境DNS-本地DNS主从服务器bind的搭建

    centos6.5环境DNS-本地DNS主从服务器bind的搭建 在上一篇博客中我已经搭建好了一个本地DNS服务器,能够实现正向反向解析,那么我们只需要加入一台从DNS服务器即可完成,我们来开始配置主 ...

  7. org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL

    [报错] org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XM ...

  8. Python常用time处理

    #coding=utf-8 # python2.7工具语句 from sys import version_info import time import datetime if version_in ...

  9. express-partials使用方法

    1.安装express-partials 方法一:运行cmd用npm install express-partials 方法二:在package.json里面的dependencies添加" ...

  10. 对象克隆及属性转换-JavaScript

    在某些项目中,需要将一些返回信息进行其他语言的翻译,可以为不同语言用户提供不同的语言版本.下面是一个实现: /** * @class Translate * @description 查询字典,翻译成 ...