精华内容
下载资源
问答
  • ensp vrrp双链路备份

    2020-12-11 14:14:43
    ensp vrrp单链路 ensp vrrp双链路备份一、实验topo二、实验目的三、PC及设备端口基本配置四、OSPF路由配置五、配置VRRP六、验证实验结果 一、实验topo 二、实验目的 SW2为192.168.10.0网段的主路由,192.168.20.0的...

    ensp vrrp单链路

    一、实验topo

    在这里插入图片描述

    二、实验目的

    SW2为192.168.10.0网段的主路由,192.168.20.0的备用路由
    SW3为192.168.20.0网段的主路由,192.168.10.0的备用路由
    在主路由链路故障的时候,VRRP备用路由自动启动

    三、PC及设备端口基本配置

    PC1
    在这里插入图片描述

    PC2
    在这里插入图片描述

    SW1

    [SW1]vlan batch 10 20
    [SW1]int g 0/0/1
    [SW1-GigabitEthernet0/0/1]port link-type trunk 
    [SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
    
    [SW1]int g 0/0/2
    [SW1-GigabitEthernet0/0/2]port link-type trunk 
    [SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
    
    [SW1]int g 0/0/24
    [SW1-GigabitEthernet0/0/24]port link-type access 
    [SW1-GigabitEthernet0/0/24]port default vlan 10
    
    [SW1]int g 0/0/23
    [SW1-GigabitEthernet0/0/23]port link-type access 
    [SW1-GigabitEthernet0/0/23]port default vlan 20
    

    SW2

    [SW2]vlan batch 10 20 100
    [SW2]int vlan 100
    [SW2-Vlanif100]ip add 192.168.100.1 24
    
    [SW2]int vlan 10
    [SW2-Vlanif10]ip add 192.168.10.10 24
    
    [SW2]int vlan 20
    [SW2-Vlanif20]ip add 192.168.20.10 24
    
    [SW2]int g 0/0/1
    [SW2-GigabitEthernet0/0/1]port link-type access 
    [SW2-GigabitEthernet0/0/1]port default vlan 100
    
    [SW2]int g 0/0/2
    [SW2-GigabitEthernet0/0/2]port link-type trunk 
    [SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
    

    SW3

    [SW3]vlan batch 10 20 100
    [SW3-Vlanif10]ip add 192.168.10.20 24
    
    [SW3]int vlan 20
    [SW3-Vlanif20]ip add 192.168.20.20 24
    
    [SW3]int vlan 100
    [SW3-Vlanif100]ip add 192.168.200.1 24
    
    [SW3]int g 0/0/1
    [SW3-GigabitEthernet0/0/1]port link-type access 
    [SW3-GigabitEthernet0/0/1]port default vlan 100
    
    [SW3]int g 0/0/2
    [SW3-GigabitEthernet0/0/2]port link-type trunk
    [SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
    

    R1

    [R1]int loop 0
    [R1-LoopBack0]ip add 10.0.0.1 24
    
    [R1]int g 0/0/0
    [R1-GigabitEthernet0/0/0]ip add 192.168.100.2 24
    
    [R1]int g 0/0/1
    [R1-GigabitEthernet0/0/1]ip add 192.168.200.2 24
    

    四、OSPF路由配置

    SW2

    [SW2]ospf 1
    [SW2-ospf-1]area 0
    [SW2-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
    [SW2-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
    [SW2-ospf-1-area-0.0.0.0]network 192.168.100.0 0.0.0.255
    

    SW3

    [SW3]ospf 1
    [SW3-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
    [SW3-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
    [SW3-ospf-1-area-0.0.0.0]network 192.168.200.0 0.0.0.255
    

    R1

    [R1]ospf 1
    [R1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.0.0.255
    [R1-ospf-1-area-0.0.0.0]network 192.168.100.0 0.0.0.255
    [R1-ospf-1-area-0.0.0.0]network 192.168.200.0 0.0.0.255
    

    五、配置VRRP

    SW2

    [SW2]int vlan 10
    [SW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1 
    [SW2-Vlanif10]vrrp vrid 1 priority 100
    [SW2-Vlanif10]vrrp vrid 1 track interface g 0/0/1 reduced 50
    
    [SW2]int vlan 20
    [SW2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1 
    [SW2-Vlanif20]vrrp vrid 2 priority 90
    [SW2-Vlanif20]vrrp vrid 2 track interface G 0/0/1 reduced 50
    

    SW3

    [SW3]int vlan 10
    [SW3-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1 
    [SW3-Vlanif10]vrrp vrid 1 priority 90
    [SW3-Vlanif10]vrrp vrid 1 track interface g 0/0/1 reduced 50
    
    [SW3]int vlan 20
    [SW3-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1 
    [SW3-Vlanif20]vrrp vrid 2 priority 100
    [SW3-Vlanif20]vrrp vrid 2 track interface G 0/0/1 reduced 50
    

    六、验证实验结果

    可以看出SW2现在为192.168.10.0网段的主路由,192.168.20.0网段的备份路由
    SW3和SW2正好相反
    在这里插入图片描述
    在这里插入图片描述
    PC1查看追踪路由
    在这里插入图片描述
    PC2查看追踪路由
    在这里插入图片描述
    在SW2和SW3的g 0/0/2端口抓包检测在这里插入图片描述
    此时将SW3>R1的链路切断来检测是否会切换路由
    在这里插入图片描述
    查看路由追踪
    在这里插入图片描述

    可以看到在链路出现故障的时候备份路由会自动升级为主路由,由此可见实验成功

    展开全文
  • eNSP VRRP技术

    2020-08-04 17:21:27
    VRRP 虚拟网关冗余协议:主要用于OSI模型中三层的网络冗余,是对用户的一种网关 VRRP:知道 VRRP 选择主/备网关的原则 默认优先级:100 ①比较优先级,越大越好; ②优先级相同,比较IP地址,越大越好; 工作原理 ...

    VRRP

    虚拟网关冗余协议:主要用于OSI模型中三层的网络冗余,是对用户的一种网关
    VRRP:知道 VRRP 选择主/备网关的原则
    默认优先级:100
    ①比较优先级,越大越好;
    ②优先级相同,比较IP地址,越大越好;

    工作原理

    VRRP工作原理:
    核心路由器每隔2s发送一个特定VRRP报文,如果一段时间没有收到对方发来的VRRP报文,我们就认为master(主路由)设备出现故障,此时我们的backup(备份路由)就会自动切换为master(主路由)。

    相关配置

    路由器

    路由器上配置命令:
    
    
    #进入接口
    [Huawei]interface GigabitEthernet 0/0/0
    #配置物理接口IP地址(选择PC同一网段地址,一般不用网关)
    [Huawei-GigabitEthernet0/0/0]ip address 10.1.1.10 24
    
    #配置虚拟
    #创建虚拟组1,并指定虚拟的IP地址,该虚拟IP地址是虚拟网关
    [Huawei-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 10.1.1.1
    
    #修改优先级(默认100,范围1~254,数字越大越优先)
    [Huawei-GigabitEthernet0/0/0]vrrp vrid 1 priority 105
    
    #查看VRRP配置信息
    [Huawei]dis vrrp brief
    
    
    

    交换机

    交换机上配置命令:
    
    #创建VLAN(vlan 1是默认)
    [Huawei]vlan 10
    #进入VLAN接口
    [Huawei]interface Vlanif 10
    #配置接口物理地址
    [Huawei-Vlanif10]ip address 192.168.10.2
    #创建虚拟组1,并指定虚拟的IP地址,该虚拟IP地址是虚拟网关
    [Huawei-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
    #修改优先级(默认100,范围1~254)
    [Huawei-Vlanif10]vrrp vrid 1 priority 100
    #查看VRRP配置信息
    [Huawei]dis vrrp brief
    
    

    上联接口故障:

    #跟踪接口,如果出现故障自动减十
    [Huawei-GigabitEthernet0/0/0]vrrp vrid 1 track interface GigabitEthernet 0/0/0
    
    

    路由下联接口配置密码

    #进入下联接口
    [Huawei]interface GigabitEthernet 0/0/0
    #配置密码
    [Huawei-GigabitEthernet0/0/0]vrrp vrid 1 authentication-mode simple 123456
    
    
    展开全文
  • 华为ensp vrrp/stp/vlan/trunk 的练习实验 实验要求 1、内网IP地址172.16.0.0/16合理分配 2、sW1/2之间互为备份 3、vrrp/stp/vlan/trunk均使用 4、所有PC通过DHCP获取ip 实验拓扑 实验配置 LSW5 [Huawei]display ...


    华为ensp vrrp/stp/vlan/trunk 的练习实验

    实验要求

    1、内网IP地址172.16.0.0/16合理分配
    2、sW1/2之间互为备份
    3、vrrp/stp/vlan/trunk均使用
    4、所有PC通过DHCP获取ip

    实验拓扑

    在这里插入图片描述

    实验配置

    LSW5

    [Huawei]display current-configuration 
    #
    sysname Huawei
    #
    vlan batch 2 10
    #
    stp instance 1 root primary
    stp instance 2 root secondary
    #
    cluster enable
    ntdp enable
    ndp enable
    #
    drop illegal-mac alarm
    #
    dhcp enable
    #
    diffserv domain default
    #
    stp region-configuration
     region-name a
     instance 1 vlan 1
     instance 2 vlan 2
     active region-configuration
    #
    drop-profile default
    #
    ip pool v1
     gateway-list 172.16.2.250
     network 172.16.2.0 mask 255.255.255.0
     dns-list 114.114.114.114
    #
    ip pool v2
     gateway-list 172.16.3.250
     network 172.16.3.0 mask 255.255.255.0
     dns-list 114.114.114.114
    #
    aaa
     authentication-scheme default
     authorization-scheme default
     accounting-scheme default
     domain default
     domain default_admin
     local-user admin password simple admin
     local-user admin service-type http
    #
    interface Vlanif1
     ip address 172.16.2.253 255.255.255.0
     vrrp vrid 1 virtual-ip 172.16.2.250
     vrrp vrid 1 priority 101
     vrrp vrid 1 track interface GigabitEthernet0/0/1
     dhcp select global
    #
    interface Vlanif2
     ip address 172.16.3.253 255.255.255.0
     vrrp vrid 2 virtual-ip 172.16.3.250
     dhcp select global
    #
    interface Vlanif10
     ip address 172.16.0.2 255.255.255.0
    #
    interface MEth0/0/1
    #
    interface Eth-Trunk0
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface GigabitEthernet0/0/1
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface GigabitEthernet0/0/3
     eth-trunk 0
    #
    interface GigabitEthernet0/0/4
     eth-trunk 0
    #
    interface GigabitEthernet0/0/5
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface GigabitEthernet0/0/6
    #
    interface GigabitEthernet0/0/7
    #
    interface GigabitEthernet0/0/8
    #
    interface GigabitEthernet0/0/9
    #
    interface GigabitEthernet0/0/10
    #
    interface GigabitEthernet0/0/11
    #
    interface GigabitEthernet0/0/12
    #
    interface GigabitEthernet0/0/13
    #
    interface GigabitEthernet0/0/14
    #
    interface GigabitEthernet0/0/15
    #
    interface GigabitEthernet0/0/16
    #
    interface GigabitEthernet0/0/17
    #
    interface GigabitEthernet0/0/18
    #
    interface GigabitEthernet0/0/19
    #
    interface GigabitEthernet0/0/20
    #
    interface GigabitEthernet0/0/21
    #
    interface GigabitEthernet0/0/22
    #
    interface GigabitEthernet0/0/23
    #
    interface GigabitEthernet0/0/24
    #
    interface NULL0
    #
    ospf 1 router-id 2.2.2.2
     silent-interface GigabitEthernet0/0/2
     silent-interface GigabitEthernet0/0/5
     silent-interface Vlanif2
     area 0.0.0.0
      network 172.16.0.0 0.0.255.255
    #
    ip route-static 0.0.0.0 0.0.0.0 172.16.0.1
    #
    user-interface con 0
    user-interface vty 0 4
    #
    return
    

    LSW6

    [Huawei]display current-configuration 
    #
    sysname Huawei
    #
    vlan batch 2 20
    #
    stp instance 1 root secondary
    stp instance 2 root primary
    #
    cluster enable
    ntdp enable
    ndp enable
    #
    drop illegal-mac alarm
    #
    dhcp enable
    #
    diffserv domain default
    #
    stp region-configuration
     region-name a
     instance 1 vlan 1
     instance 2 vlan 2
     active region-configuration
    #
    drop-profile default
    #
    ip pool v1
     gateway-list 172.16.2.250
     network 172.16.2.0 mask 255.255.255.0
     dns-list 114.114.114.114
    #
    ip pool v2
     gateway-list 172.16.3.250
     network 172.16.3.0 mask 255.255.255.0
     dns-list 114.114.114.114
    #
    aaa
     authentication-scheme default
     authorization-scheme default
     accounting-scheme default
     domain default
     domain default_admin
     local-user admin password simple admin
     local-user admin service-type http
    #
    interface Vlanif1
     ip address 172.16.2.254 255.255.255.0
     vrrp vrid 1 virtual-ip 172.16.2.250
     dhcp select global
    #
    interface Vlanif2
     ip address 172.16.3.254 255.255.255.0
     vrrp vrid 2 virtual-ip 172.16.3.250
     vrrp vrid 2 priority 101
     vrrp vrid 2 track interface GigabitEthernet0/0/5
     dhcp select global
    #
    interface Vlanif20
     ip address 172.16.1.2 255.255.255.0
    #
    interface MEth0/0/1
    #
    interface Eth-Trunk0
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface GigabitEthernet0/0/1
     eth-trunk 0
    #
    interface GigabitEthernet0/0/2
     eth-trunk 0
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface GigabitEthernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface GigabitEthernet0/0/5
     port link-type access
     port default vlan 20
    #
    interface GigabitEthernet0/0/6
    #
    interface GigabitEthernet0/0/7
    #
    interface GigabitEthernet0/0/8
    #
    interface GigabitEthernet0/0/9
    #
    interface GigabitEthernet0/0/10
    #
    interface GigabitEthernet0/0/11
    #
    interface GigabitEthernet0/0/12
    #
    interface GigabitEthernet0/0/13
    #
    interface GigabitEthernet0/0/14
    #
    interface GigabitEthernet0/0/15
    #
    interface GigabitEthernet0/0/16
    #
    interface GigabitEthernet0/0/17
    #
    interface GigabitEthernet0/0/18
    #
    interface GigabitEthernet0/0/19
    #
    interface GigabitEthernet0/0/20
    #
    interface GigabitEthernet0/0/21
    #
    interface GigabitEthernet0/0/22
    #
    interface GigabitEthernet0/0/23
    #
    interface GigabitEthernet0/0/24
    #
    interface NULL0
    #
    ospf 1 router-id 3.3.3.3
     silent-interface GigabitEthernet0/0/4
     silent-interface GigabitEthernet0/0/3
     silent-interface Vlanif2
     area 0.0.0.0
      network 172.16.0.0 0.0.255.255
      network 172.16.1.0 0.0.0.255
    #
    ip route-static 0.0.0.0 0.0.0.0 172.16.1.1
    #
    user-interface con 0
    user-interface vty 0 4
    #
    return
    

    LSW1

    [Huawei]display current-configuration 
    #
    sysname Huawei
    #
    vlan batch 2
    #
    cluster enable
    ntdp enable
    ndp enable
    #
    drop illegal-mac alarm
    #
    diffserv domain default
    #
    stp region-configuration
     region-name a
     instance 1 vlan 1
     instance 2 vlan 2
     active region-configuration
    #
    drop-profile default
    #
    aaa
     authentication-scheme default
     authorization-scheme default
     accounting-scheme default
     domain default
     domain default_admin
     local-user admin password simple admin
     local-user admin service-type http
    #
    interface Vlanif1
    #
    interface MEth0/0/1
    #
    interface GigabitEthernet0/0/1
    #
    interface GigabitEthernet0/0/2
     port link-type access
     port default vlan 2
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 2
     stp edged-port enable
    #
    interface GigabitEthernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 2
     stp edged-port enable
    #
    interface GigabitEthernet0/0/5
    #
    interface GigabitEthernet0/0/6
    #
    interface GigabitEthernet0/0/7
    #
    interface GigabitEthernet0/0/8
    #
    interface GigabitEthernet0/0/9
    #
    interface GigabitEthernet0/0/10
    #
    interface GigabitEthernet0/0/11
    #
    interface GigabitEthernet0/0/12
    #
    interface GigabitEthernet0/0/13
    #
    interface GigabitEthernet0/0/14
    #
    interface GigabitEthernet0/0/15
    #
    interface GigabitEthernet0/0/16
    #
    interface GigabitEthernet0/0/17
    #
    interface GigabitEthernet0/0/18
    #
    interface GigabitEthernet0/0/19
    #
    interface GigabitEthernet0/0/20
    #
    interface GigabitEthernet0/0/21
    #
    interface GigabitEthernet0/0/22
    #
    interface GigabitEthernet0/0/23
    #
    interface GigabitEthernet0/0/24
    #
    interface NULL0
    #
    user-interface con 0
    user-interface vty 0 4
    #
    return
    
    

    LSW2

    [Huawei]display current-configuration 
    #
    sysname Huawei
    #
    vlan batch 2
    #
    cluster enable
    ntdp enable
    ndp enable
    #
    drop illegal-mac alarm
    #
    diffserv domain default
    #
    stp region-configuration
     region-name a
     instance 1 vlan 1
     instance 2 vlan 2
     active region-configuration
    #
    drop-profile default
    #
    aaa
     authentication-scheme default
     authorization-scheme default
     accounting-scheme default
     domain default
     domain default_admin
     local-user admin password simple admin
     local-user admin service-type http
    #
    interface Vlanif1
    #
    interface MEth0/0/1
    #
    interface GigabitEthernet0/0/1
    #
    interface GigabitEthernet0/0/2
     port link-type access
     port default vlan 2
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 2
     stp edged-port enable
    #
    interface GigabitEthernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 2
     stp edged-port enable
    #
    interface GigabitEthernet0/0/5
    #
    interface GigabitEthernet0/0/6
    #
    interface GigabitEthernet0/0/7
    #
    interface GigabitEthernet0/0/8
    #
    interface GigabitEthernet0/0/9
    #
    interface GigabitEthernet0/0/10
    #
    interface GigabitEthernet0/0/11
    #
    interface GigabitEthernet0/0/12
    #
    interface GigabitEthernet0/0/13
    #
    interface GigabitEthernet0/0/14
    #
    interface GigabitEthernet0/0/15
    #
    interface GigabitEthernet0/0/16
    #
    interface GigabitEthernet0/0/17
    #
    interface GigabitEthernet0/0/18
    #
    interface GigabitEthernet0/0/19
    #
    interface GigabitEthernet0/0/20
    #
    interface GigabitEthernet0/0/21
    #
    interface GigabitEthernet0/0/22
    #
    interface GigabitEthernet0/0/23
    #
    interface GigabitEthernet0/0/24
    #
    interface NULL0
    #
    user-interface con 0
    user-interface vty 0 4
    #
    return
    

    AR1

    [Huawei]display current-configuration 
    [V200R003C00]
    #
     snmp-agent local-engineid 800007DB03000000000000
     snmp-agent 
    #
     clock timezone China-Standard-Time minus 08:00:00
    #
    portal local-server load portalpage.zip
    #
     drop illegal-mac alarm
    #
     set cpu-usage threshold 80 restore 75
    #
    acl number 2000  
     rule 5 permit source 172.16.0.0 0.0.255.255 
    #
    aaa 
     authentication-scheme default
     authorization-scheme default
     accounting-scheme default
     domain default 
     domain default_admin 
     local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
     local-user admin service-type http
    #
    firewall zone Local
     priority 15
    #
    interface GigabitEthernet0/0/0
     ip address 172.16.0.1 255.255.255.0 
    #
    interface GigabitEthernet0/0/1
     ip address 172.16.1.1 255.255.255.0 
    #
    interface GigabitEthernet0/0/2
     ip address 12.1.1.1 255.255.255.0 
     nat outbound 2000
    #
    interface NULL0
    #
    ospf 1 router-id 1.1.1.1 
     area 0.0.0.0 
      network 172.16.0.0 0.0.255.255 
    #
    ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
    #
    user-interface con 0
     authentication-mode password
    user-interface vty 0 4
    user-interface vty 16 20
    #
    wlan ac
    #
    return
    
    

    AR2

    [Huawei]display current-configuration 
    [V200R003C00]
    #
     snmp-agent local-engineid 800007DB03000000000000
     snmp-agent 
    #
     clock timezone China-Standard-Time minus 08:00:00
    #
    portal local-server load portalpage.zip
    #
     drop illegal-mac alarm
    #
     set cpu-usage threshold 80 restore 75
    #
    aaa 
     authentication-scheme default
     authorization-scheme default
     accounting-scheme default
     domain default 
     domain default_admin 
     local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
     local-user admin service-type http
    #
    firewall zone Local
     priority 15
    #
    interface GigabitEthernet0/0/0
     ip address 12.1.1.2 255.255.255.0 
    #
    interface GigabitEthernet0/0/1
    #
    interface GigabitEthernet0/0/2
    #
    interface NULL0
    #
    interface LoopBack1
     ip address 1.1.1.1 255.255.255.0 
    #
    user-interface con 0
     authentication-mode password
    user-interface vty 0 4
    user-interface vty 16 20
    #
    wlan ac
    #
    return
    
    展开全文
  • ensp VRRP实验搭建

    千次阅读 2020-11-21 20:47:55
    VRRP的概述 VRRP(虚拟网关冗余协议)主要解决网络中因为网关出现故障,而导致主机不能够访问外网出现的问题,VRRP主要是通过在网络中多添加几台路由器虚拟出来一台虚拟路由器,以此达到备份的效果,然后把主机的...

    VRRP的概述

    VRRP(虚拟网关冗余协议)主要解决网络中因为网关出现故障,而导致主机不能够访问外网出现的问题,VRRP主要是通过在网络中多添加几台路由器虚拟出来一台虚拟路由器,以此达到备份的效果,然后把主机的网关配置在虚拟路由器上,即是单个路由器出现了故障,虚拟路由器也能够正常的工作。
    通常在网络中也会存在一个master 主路由器以及多个slave 备份路由器,master 和 slave 的选举:优先级(默认100)和端口的编号(谁大谁优先级最大)

    VRRP负载分担
    这个和MSTP类似,VRRP可以将同一个网段或者不同网段的放在一个组,这样就分出来了多个组,每一个组都是一个单独的虚拟路由器,每一个组都设置得有对应网段的网关,每一个组都可以指定对应的主路由器,以及备份路由器,如一个组的主路由器为A,可能对于其他组来说,这个A就有可能为备份路由器以及主路由器。这个根据网络的结构来定。
    每一个组之间都是没有关联的,这样不仅实现了负载分担,也确保了每一条链路上都有流量通过

    VRRP抢占模式
    当master 路由器出现了故障,备份路由器会接替master的工作,如果master路由恢复了,就会启用抢占模式,抢占的时间为0秒,只要一恢复,就立即进入原来的状态 (华为设备抢占模式 默认是开启的)

    VRRP监视端口的功能
    防止路由器上的其他端口出现故障,而导致数据不能够及时转发
    所以一般在master路由器上开启对应端口的监视功能,如果当检测到端口出现故障,就会自动将本路由器的优先级下调30,然后重新选择主备路由器

    VRRP端口状态

    1. master (主)
    2. backup (备)
    3. initialize (初始状态 只要在端口执行shutdown都是这个状态)

    VRRP实验搭建

    实验要求
    最短访问路径为优,配置单臂路由让 PC1 和 PC2 互通,192.168.1.0/24 对应VRID 10,192.168.2.0/24 对应 VRID 20 ,AR2 为VRID 10 的 master 路由器,AR3 为 VRID 20 的 master 路由器,配置端口检测功能,防止 端口出现故障而导致网络访问不了。全网互通

    网络拓扑图
    在这里插入图片描述

    IP地址、单臂路由、vlan划分、静态路由的配置

    LSW1交换机的配置

    [LSW1]vlan batch 10 20    //创建vlan 10 20 
    [LSW1]int g0/0/1
    [LSW1-GigabitEthernet0/0/1]port link-type access 
    [LSW1-GigabitEthernet0/0/1]port default vlan 10
    [LSW1-GigabitEthernet0/0/1]int g0/0/2
    [LSW1-GigabitEthernet0/0/2]port link-type access 
    [LSW1-GigabitEthernet0/0/2]port default vlan 20
    [LSW1-GigabitEthernet0/0/2]int g0/0/3
    [LSW1-GigabitEthernet0/0/3]port link-type trunk 	
    [LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all 
    [LSW1-GigabitEthernet0/0/3]int g0/0/4
    [LSW1-GigabitEthernet0/0/4]port link-type trunk 	
    [LSW1-GigabitEthernet0/0/4]port trunk allow-pass vlan all 
    

    AR1路由器的配置

    [AR1]int g0/0/0
    [AR1-GigabitEthernet0/0/0]ip address 11.1.1.1 24 
    [AR1-GigabitEthernet0/0/0]int g0/0/1
    [AR1-GigabitEthernet0/0/1]ip address 12.1.1.1 24 
    [AR1-GigabitEthernet0/0/1]q
    [AR1]int LoopBack 0    //创建一个回环接口用于测试
    [AR1-LoopBack0]ip address 9.9.9.9 24
    配置静态路由,发往内网网段的
    [AR1]ip route-static 192.168.1.0 24 11.1.1.2 
    [AR1]ip route-static 192.168.1.0 24 12.1.1.2
    [AR1]ip route-static 192.168.2.0 24 12.1.1.2
    [AR1]ip route-static 192.168.2.0 24 11.1.1.2
    

    AR2路由器的配置

    [AR2]int g0/0/0
    [AR2-GigabitEthernet0/0/0]ip address 11.1.1.2 24 
    [AR2-GigabitEthernet0/0/0]int g0/0/2.10
    单臂路由的配置
    [AR2-GigabitEthernet0/0/2.10]ip address 192.168.1.100 24
    [AR2-GigabitEthernet0/0/2.10]dot1q termination vid 10    //使用dot1q来封装vlan10
    [AR2-GigabitEthernet0/0/2.10]arp broadcast enable   //开启arp 广播 
    [AR2-GigabitEthernet0/0/2.10]int g0/0/2.20
    [AR2-GigabitEthernet0/0/2.20]ip address 192.168.2.100 24 	
    [AR2-GigabitEthernet0/0/2.20]dot1q termination vid 20
    [AR2-GigabitEthernet0/0/2.20]arp broadcast enable 
    [AR2-GigabitEthernet0/0/2.20]q
    [AR2]ip route-static 0.0.0.0 0.0.0.0 11.1.1.1   //配置默认路由,发往外网,因为内网存在多个网段,所有配置默认比较方便一点
    

    AR3路由器 配置

    [AR3]int g0/0/1
    [AR3-GigabitEthernet0/0/1]ip address 12.1.1.2 24 
    单臂路由的配置
    [AR3-GigabitEthernet0/0/1]int g0/0/2.10
    [AR3-GigabitEthernet0/0/2.10]ip address 192.168.1.200 24 
    [AR3-GigabitEthernet0/0/2.10]dot1q termination vid 10
    [AR3-GigabitEthernet0/0/2.10]arp broadcast enable 
    [AR3-GigabitEthernet0/0/2.10]int g0/0/2.20
    [AR3-GigabitEthernet0/0/2.20]ip address 192.168.2.200 24
    [AR3-GigabitEthernet0/0/2.20]dot1q termination vid 20
    [AR3-GigabitEthernet0/0/2.20]arp broadcast enable 
    [AR3-GigabitEthernet0/0/2.20]q
    [AR3]ip route-static 0.0.0.0 0.0.0.0 12.1.1.1 
    

    VRRP的配置

    AR2路由器的配置

    [AR2]int g0/0/2.10	//进入子接口
    [AR2-GigabitEthernet0/0/2.10]vrrp vrid 10 virtual-ip 192.168.1.2  //设置虚拟网关 网关IP地址为1.0网段的主机的网关
    [AR2-GigabitEthernet0/0/2.10]vrrp vrid 10 priority 120   //设置组10 的优先级为120 这样VRID 10 的主路由器就是AR2了
    [AR2-GigabitEthernet0/0/2.10]vrrp vrid 10 track interface g0/0/0 reduced 30  //开启端口监测模式,如果出现故障,自动下调30
    [AR2-GigabitEthernet0/0/2.10]int g0/0/2.20   //进入另外一个网段的子接口
    [AR2-GigabitEthernet0/0/2.20]vrrp vrid 20 virtual-ip 192.168.2.2   //只需配置虚拟网关IP地址即可
    

    AR3路由器的配置

    [AR3]int g0/0/2.10  //进入子接口
    [AR3-GigabitEthernet0/0/2.10]vrrp vrid 10 virtual-ip 192.168.1.2    //配置虚拟网关
    [AR3-GigabitEthernet0/0/2.10]int g0/0/2.20
    [AR3-GigabitEthernet0/0/2.20]vrrp vrid 20 virtual-ip 192.168.2.2  
    [AR3-GigabitEthernet0/0/2.20]vrrp vrid 20 priority 120 
    [AR3-GigabitEthernet0/0/2.20]vrrp vrid 20 track interface g0/0/1 reduced 30
    

    查看配置的状态分别在(AR2 和 AR3上进行查看)
    AR2路由器查看
    从下图可以看出AR2路由器为192.168.1.0/24网段的主路由器,虚拟网关为192.168.1.2,。AR2路由器为192.168.2.0/24网段的备份路由器,虚拟网关的IP地址为192.168.2.2
    在这里插入图片描述
    AR3路由器查看
    从下图我们可以看出和 AR2截然相反
    在这里插入图片描述
    连通测试
    PC1 ping PC2
    在这里插入图片描述
    PC1 ping AR1上的 lookback口
    在这里插入图片描述

    故障测试

    默认状态下,如果PC1主机要访问9.9.9.9,那么走的路线为 LS1—AR2—AR1 ,现在我们将AR2的g0/0/0端口down 掉,看看PC1还能否访问9.9.9.9

    AR2路由器的配置

    [AR2]int G0/0/0    //进入端口
    [AR2-GigabitEthernet0/0/0]shutdown   //执行关闭命令
    [AR2-GigabitEthernet0/0/0]dis vrrp br 
    我们查看状态,当前路由器里面变为了备份状态了,因为我们开启了端口监视功能,出现故障,优先级自动下降30
    Total:2     Master:0     Backup:2     Non-active:0      
    VRID  State        Interface                Type     Virtual IP     
    ----------------------------------------------------------------
    10    Backup       GE0/0/2.10               Normal   192.168.1.2    
    20    Backup       GE0/0/2.20               Normal   192.168.2.2   
    

    再次连通测试
    在这里插入图片描述
    我们在把端口的状态调回来,然后vrrp就启用抢占功能,马上又变为了master状态了

    [AR2]int g0/0/0
    [AR2-GigabitEthernet0/0/0]undo shutdown 
    [AR2-GigabitEthernet0/0/0]dis vrrp br 
    Total:2     Master:1     Backup:1     Non-active:0      
    VRID  State        Interface                Type     Virtual IP     
    ----------------------------------------------------------------
    10    Master       GE0/0/2.10               Normal   192.168.1.2    
    20    Backup       GE0/0/2.20               Normal   192.168.2.2    
    

    整个实验搭建完成,效果实现!!!!!

    展开全文
  • ensp VRRP+MSTP综合性实验

    千次阅读 多人点赞 2020-11-21 23:40:08
    Vlanif10]q [Huawei]int Vlanif 20 [Huawei-Vlanif20]vrrp vrid 20 virtual-ip 192.168.2.2 [Huawei-Vlanif20]vrrp vrid 20 priority 120 [Huawei-Vlanif20]vrrp vrid 20 track interface g0/0/1 查看VRRP的状态 LSW...
  • ensp 配置vrrp

    2020-12-10 23:07:24
    ensp 配置vrrp一、网络topo二、配置接口ip三、配置vrrp四、配置ospf五、测试六、模拟链路状态故障 一、网络topo 虚拟路由冗余协议VRRP通过几台路由器设备组成一台虚拟的路由设备,将虚拟路由设备的IP地址作为用户...
  • 利用eNSP模拟VRRP协议

    2020-06-30 19:36:01
    利用eNSP模拟VRRP协议 实验目的:利用eNSP软件进行VRRP协议模拟,了解VRRP协议的原理。 实验环境:eNSP软件环境 实验材料:eNSP软件以及实验拓扑图一张 实验结果:通过抓包软件,抓取报文。用以验证VRRP协议...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 574
精华内容 229
关键字:

enspvrrp