zoukankan      html  css  js  c++  java
  • 无线技术——VRRP配置


    实验拓扑

    在这里插入图片描述

    基础配置

    • 配置SW1
    # 创建vlan,配置链路聚合
    [SW1]vlan batch 10 20 
    [SW1]int Eth-Trunk 1
    [SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/10 0/0/11
    [SW1-Eth-Trunk1]port link-type trunk 
    [SW1-Eth-Trunk1]port trunk allow-pass vlan all 
    [SW1-Eth-Trunk1]q
    # 配置接口类型
    [SW1]int g0/0/1 
    [SW1-GigabitEthernet0/0/1]port link-type trunk 
    [SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
    [SW1-GigabitEthernet0/0/1]int g0/0/2
    [SW1-GigabitEthernet0/0/2] port link-type trunk
    [SW1-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094
    [SW1-GigabitEthernet0/0/2]q
    
    • 配置SW2
    # SW2创建vlan,配置链路聚合
    [SW2]vlan batch 10 20 
    [SW2]int Eth-Trunk 1
    [SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/10 0/0/11
    [SW2-Eth-Trunk1]port link-type trunk 
    [SW2-Eth-Trunk1]port trunk allow-pass vlan all 
    [SW2-Eth-Trunk1]q
    # SW2配置接口类型
    [SW2]int g0/0/1 
    [SW2-GigabitEthernet0/0/1]port link-type trunk 
    [SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
    [SW2-GigabitEthernet0/0/1]int g0/0/2
    [SW2-GigabitEthernet0/0/2] port link-type trunk
    [SW2-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094
    [SW2-GigabitEthernet0/0/2]q
    
    • 配置SW3、SW4
    # SW3配置
    [SW3]vlan ba 10 20
    [SW3]int g0/0/2
    [SW3-GigabitEthernet0/0/2]port link-type trunk
    [SW3-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094
    [SW3-GigabitEthernet0/0/2]int g0/0/
    [SW3-GigabitEthernet0/0/3]port link-type trunk
    [SW3-GigabitEthernet0/0/3] port trunk allow-pass vlan 2 to 4094
    [SW3-GigabitEthernet0/0/3]q
    [SW3]int g0/0/1
    [SW3-GigabitEthernet0/0/1]port link-type access 
    [SW3-GigabitEthernet0/0/1]port default vlan 10
    
    # SW4配置
    [SW4]vlan ba 10 20
    [SW4]int g0/0/2
    [SW4-GigabitEthernet0/0/2]port link-type trunk
    [SW4-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094
    [SW4-GigabitEthernet0/0/2]int g0/0/3
    [SW4-GigabitEthernet0/0/3]port link-type trunk
    [SW4-GigabitEthernet0/0/3] port trunk allow-pass vlan 2 to 409
    [SW4]int g0/0/1
    [SW4-GigabitEthernet0/0/1]port link-type access 
    [SW4-GigabitEthernet0/0/1]port default vlan 20
    
    • AR1配置
    [AR1]int g0/0/0
    [AR1-GigabitEthernet0/0/0]ip ad 10.1.1.1 24
    [AR1-GigabitEthernet0/0/0]q
    [AR1]ip route-static 0.0.0.0 0 10.1.1.254  //配置静态路由,否则无法互通
    

    配置VRRP

    • SW1配置
    # 配置vlanif的IP地址,配置VRRP
    [SW1]int Vlanif 10
    [SW1-Vlanif10]ip ad 10.1.1.2 24
    [SW1-Vlanif10]vrrp vrid 1 virtual-ip 10.1.1.254  //配置VRID 1的虚拟网关为10.1.1.254
    [SW1-Vlanif10]vrrp vrid 1 priority 120  //配置VRID 1的优先级
    [SW1-Vlanif10]q
    [SW1]int Vlanif 20
    [SW1-Vlanif20]ip ad 20.1.1.2 24
    [SW1-Vlanif20]vrrp vrid 2 virtual-ip 20.1.1.254  //配置VRID 2的虚拟网关为20.1.1.254
    
    • SW2配置
    [SW2]int Vlanif 10
    [SW2-Vlanif10]ip ad 10.1.1.3 24
    [SW2-Vlanif10]vrrp vrid 1 virtual-ip 10.1.1.254
    [SW2-Vlanif10]q
    [SW2]int Vlanif 20
    [SW2-Vlanif20]ip ad 20.1.1.3 24
    [SW2-Vlanif20]vrrp vrid 2 virtual-ip 20.1.1.254
    [SW2-Vlanif20]vrrp vrid  2 priority 120  //配置VRID 2的优先级为120
    

    实验结果

    • 当SW2down掉之后(down之前记得save),VRRP可以迅速切换备用网关,进行数据转发,当SW2恢复时,可以迅速切换会主交换机

    在这里插入图片描述
    拓展

    • vrrp vrid 1 preempt-mode timer delay 20修改抢占时延
    • vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 20配置上行接口down后,自身优先级降20

     

    以上内容均属原创,如有不详或错误,敬请指出。
    
    本文作者: 坏坏
  • 相关阅读:
    Time Zone 【模拟时区转换】(HDU暑假2018多校第一场)
    HDU 1281 棋盘游戏 【二分图最大匹配】
    Codeforces Round #527 (Div. 3) F. Tree with Maximum Cost 【DFS换根 || 树形dp】
    Codeforces Round #527 (Div. 3) D2. Great Vova Wall (Version 2) 【思维】
    Codeforces Round #527 (Div. 3) D1. Great Vova Wall (Version 1) 【思维】
    Codeforces Round #528 (Div. 2, based on Technocup 2019 Elimination Round 4) C. Connect Three 【模拟】
    Avito Cool Challenge 2018 E. Missing Numbers 【枚举】
    Avito Cool Challenge 2018 C. Colorful Bricks 【排列组合】
    005 如何分析问题框架
    004 如何定义和澄清问题
  • 原文地址:https://www.cnblogs.com/bad5/p/13022661.html
Copyright © 2011-2022 走看看