zoukankan      html  css  js  c++  java
  • 华为交换机VRRP配置实例收集(转)

    示例图:

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

    组网需求:

    楼层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(以上内容转自此篇文章) 

  • 相关阅读:
    个人永久性免费-Excel催化剂功能第103波-批量打开多文件或多链接
    个人永久性免费-Excel催化剂插件功能修复与更新汇总篇之八
    个人永久性免费-Excel催化剂功能第101波-批量替换功能(增加正则及高性能替换能力)
    个人永久性免费-Excel催化剂功能第99波-手机号码归属地批量查询
    个人永久性免费-Excel催化剂功能第100波-透视多行数据为多列数据结构
    个人永久性免费-Excel催化剂功能第98波-零代码零距离轻松接触并拥有金融大数据
    个人永久性免费-Excel催化剂功能第97波-快递单号批量查询物流信息
    个人永久性免费-Excel催化剂功能第95波-地图数据挖宝之IP地址转地理地址及不同经纬度版本转换
    个人永久性免费-Excel催化剂功能第96波-地图数据挖宝之全国天气查询(区域最细可到区县,最长预报4天)
    实现兼容document.querySelector的方法
  • 原文地址:https://www.cnblogs.com/EasonJim/p/9591094.html
Copyright © 2011-2022 走看看