首页 > 其他分享 >Huawei VRRP+MSTP组网实验-ensp

Huawei VRRP+MSTP组网实验-ensp

时间:2023-04-15 20:55:24浏览次数:41  
标签:ensp GigabitEthernet0 vlan MSTP access Huawei Leaf1 Leaf2 port

一、基本环境

IP地址规划:

  • 互联网公网IP地址:
    Router:121.1.1.0/30
  • 内网互联地址:
    Leaf1:10.0.0.0/30
    Leaf2:10.0.1.0/30
  • 内网vlan网关:
    vlan 100 :192.168.100.1 24
    vlan 200 :192.168.200.1 24

二、拓扑结构

image

三、实验配置

出口网关

ISP网络配置

[ISP]interface GigabitEthernet 0/0/0
[ISP-GigabitEthernet0/0/0]ip add 121.1.1.1 30
[ISP-GigabitEthernet0/0/0]quit

Router网络配置

[Router]acl 2000
[Router-acl-basic-2000]rule 5 permit source any
[Router-GigabitEthernet0/0/0]nat outbound 2000
[Router]interface GigabitEthernet 0/0/0
[Router-GigabitEthernet0/0/0]ip add 121.1.1.2 30
[Router-GigabitEthernet0/0/0]quit
[Router]interface GigabitEthernet 0/0/1
[Router-GigabitEthernet0/0/1]interface GigabitEthernet 2/0/1
[Router-GigabitEthernet2/0/1]ip add 10.0.1.1 30
[Router-GigabitEthernet2/0/1]quit
[Router]interface GigabitEthernet 2/0/0
[Router-GigabitEthernet2/0/0]ip add 10.0.0.1 30
[Router-GigabitEthernet2/0/0]quit
[Router]ip route-static 0.0.0.0 0 121.1.1.1
[Router]ip route-static 192.168.100.0 24 10.0.0.2
[Router]ip route-static 192.168.100.0 24 10.0.1.2
[Router]ip route-static 192.168.200.0 24 10.0.1.2
[Router]ip route-static 192.168.200.0 24 10.0.0.2

内网上联

Leaf1配置

[Leaf2]vlan 1000
[Leaf2-vlan1000]quit
[Leaf1-vlan1000]int vlan 1000
[Leaf1-Vlanif1000]ip address 10.0.0.2 30
[Leaf1]interface GigabitEthernet 0/0/1
[Leaf1-GigabitEthernet0/0/1]port link-type access
[Leaf1-GigabitEthernet0/0/1]port default vlan 1000
[Leaf1]ip route-static 0.0.0.0 0 10.0.0.1

Leaf2配置

[Leaf2]vlan 1000
[Leaf2-vlan1000]quit
[Leaf2]interface vlan 1000
[Leaf2-Vlanif1000]ip address 10.0.1.2 30
[Leaf2-Vlanif1000]quit
[Leaf2]interface GigabitEthernet 0/0/1
[Leaf2-GigabitEthernet0/0/1]port link-type access
[Leaf2-GigabitEthernet0/0/1]port default vlan 1000
[Leaf2]ip route-static 0.0.0.0 0 10.0.1.1

VRRP配置

Leaf1配置

[Leaf1]vlan batch 100 200
[Leaf1-Vlanif100]ip add 192.168.100.254 24
[Leaf1-Vlanif100]vrrp vrid 1 virtual-ip 192.168.100.1
[Leaf1-Vlanif100]vrrp vrid 1 track interface GigabitEthernet 0/0/1 reduced 30
[Leaf1-Vlanif100]vrrp vrid 1 priority 120
[Leaf1]interface vlan 200
[Leaf1-Vlanif200]ip address 192.168.200.253 255.255.255.0
[Leaf1-Vlanif200]vrrp vrid 2 virtual-ip 192.168.200.1
[Leaf1-Vlanif200]vrrp vrid 2 priority 100
# 配置主备vrrp设备聚合链路
[Leaf1]interface Eth-Trunk 1
[Leaf2-Eth-Trunk1]port link-type trunk
[Leaf2-Eth-Trunk1]port trunk allow-pass vlan all
[Leaf1-Eth-Trunk1]trunkport GigabitEthernet 0/0/3
[Leaf1-Eth-Trunk1]trunkport GigabitEthernet 0/0/4

Leaf2配置

[Leaf2]vlan batch 100 200
[Leaf2-Vlanif100]ip add 192.168.100.253 24
[Leaf2-Vlanif100]vrrp vrid 1 virtual-ip 192.168.100.1
[Leaf2-Vlanif100]vrrp vrid 1 priority 120
[Leaf2]interface vlan 200
[Leaf2-Vlanif200]ip address 192.168.200.254 255.255.255.0
[Leaf2-Vlanif200]vrrp vrid 2 virtual-ip 192.168.200.1
[Leaf2-Vlanif200]vrrp vrid 2 priority 120
[Leaf2-Vlanif200]vrrp vrid 2 track interface GigabitEthernet 0/0/1 reduced 30
# 配置主备vrrp设备聚合链路
[Leaf2]interface Eth-Trunk 1
[Leaf2-Eth-Trunk1]port link-type trunk
[Leaf2-Eth-Trunk1]port trunk allow-pass vlan all
[Leaf2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3
[Leaf2-Eth-Trunk1]trunkport GigabitEthernet 0/0/4

MSTP配置

Leaf1配置

[leaf1]stp enable
[Leaf1]stp mode mstp
[Leaf1]stp region-configuration
[Leaf1-mst-region]instance 1 vlan 100
[Leaf1-mst-region]instance 2 vlan 200
[Leaf1-mst-region]active region-configuration
[Leaf1]stp instance 1 root primary
[Leaf1]stp instance 2 root secondary

Leaf2配置

[leaf2]stp enable
[Leaf2]stp mode mstp
[Leaf2]stp region-configuration
[Leaf2-mst-region]instance 1 vlan 100
[Leaf2-mst-region]instance 2 vlan 200
[Leaf2-mst-region]active region-configuration
[Leaf2]stp instance 1 root secondary
[Leaf2]stp instance 2 root primary

access配置

[access]stp enable
[access]stp mode mstp
[access]stp region-configuration
[access-mst-region]instance 1 vlan 100
[access-mst-region]instance 2 vlan 200
[access-mst-region]active region-configuration

内网下联

Leaf1配置

[Leaf1]interface GigabitEthernet 0/0/2
[Leaf1-GigabitEthernet0/0/2]port trunk allow-pass vlan 100 200
[Leaf1-GigabitEthernet0/0/2]undo port trunk allow-pass vlan 1

Leaf2配置

[Leaf2]interface GigabitEthernet 0/0/2
[Leaf2-GigabitEthernet0/0/2]port trunk allow-pass vlan 100 200
[Leaf2-GigabitEthernet0/0/2]undo port trunk allow-pass vlan 1

access配置

[access]interface GigabitEthernet 0/0/3
[access-GigabitEthernet0/0/3]port link-type access
[access-GigabitEthernet0/0/3]port default vlan 100
[access-GigabitEthernet0/0/3]stp edged-port enable
[access-GigabitEthernet0/0/3]quit
[access]interface GigabitEthernet 0/0/4
[access-GigabitEthernet0/0/4]port link-type access
[access-GigabitEthernet0/0/4]port default vlan 200
[access-GigabitEthernet0/0/4]stp edged-port enable
[access-GigabitEthernet0/0/4]quit
[access]interface GigabitEthernet 0/0/1
[access-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 200
[access-GigabitEthernet0/0/1]undo port trunk allow-pass vlan 1
[access]interface GigabitEthernet 0/0/2
[access-GigabitEthernet0/0/2]port trunk allow-pass vlan 100 200
[access-GigabitEthernet0/0/2]undo port trunk allow-pass vlan 1

终端测试

配置PC1.10的地址为100.10
配置PC2.10的地址为200.10

链路完整下测试

两台PC都可以访问互联网
image
image

断开Leaf上联口

image
PC1在掉4个包后恢复
image
PC2在掉4个包后恢复
image

断开Leaf下联口

image
PC丢包后恢复
image
PC2丢包后恢复
image

标签:ensp,GigabitEthernet0,vlan,MSTP,access,Huawei,Leaf1,Leaf2,port
From: https://www.cnblogs.com/mo-x/p/17321680.html

相关文章

  • 热点网络统计 huawei od
    本期题目:热点网络统计题目企业路由器的统计页面,有一个功能,需要动态统计公司访问最多的网页URLtopN请设计一个算法,可以高效动态统计TopN的页面输入每一行都是一个URL或一个数字如果是URL代表一段时间内的网页访问如果是一个数字N 代表本次需要输出的TopN个URL 输入约束:......
  • 好朋友 huawei od 机试
    本期题目:好朋友题目在学校中 N个小朋友站成一队第i个小朋友的身高为height[i] 第i个小朋友可以看到第一个比自己身高更高的小朋友j 那么j是i的好朋友(要求:j>i)请重新生成一个列表对应位置的输出是每个小朋友的好朋友的位置如果没有看到好朋友请在该位置用0代替小朋......
  • ENSP的安装详细过程
    第一章:eNSP的安装和使用华为eNSP模拟器(EnterpriseNetworkSimulationPlatform)是华为官方推出的一款强大的图形化网络仿真工具平台,eNSP模拟器主要对企业网路由器、交换机、WLAN等设备进行软件仿真,从而得以完美地呈现真实设备部署实景,并且支持大型网络模拟让你有机会在没有真实设......
  • 能力组队 huawei od 机试
    本期题目:能力组队题目用数组代表每个人的能力,一个比赛活动要求,参赛团队的最低能力值为N 每个团队可以由一人或者两人组成,且一个人只能参加一个团队,计算出最多可以派出多少只符合要求的队伍。输入第一行代表总人数,范围1~500000 第二行数组代表每个人的能力数组大小范围......
  • 使用eNSP模拟器完成SSH
    写在前:在前面的Telnet实训中,如果你使用了Wireshark抓包软件,你会看见这样的画面,详见图1。图1出现上述图片情况,说明Telnet在数据传输过程中是明文传输。数据包发送过程中......
  • Huawei_Netconf_Ncclient
    目录Huawei_Netconf_Ncclient官网介绍根据官网介绍攒一攒代码明智地映射内容层前言典型配置分类查看规律配置思路基本信息代码编写思路通用代码解释预先配置配置解释快速配......
  • Huawei_VRP_用户管理与AAA
    目录引子AAA华为设备登录管理小案例新同事CE12800引子和同学一块做项目,让同事配置一个AAA认证,结果好长时间没搞好,后来一看配置的命令如上图所示,同学在那里用console线在......
  • 使用eNSP模拟器完成Telnet(以AAA为例)
    本次实训需使用到AR1220型号路由器两台,其中R1路由器IP地址设为222.222.222.1/24,R2路由器IP地址设为222.222.222.2/24。并在R2路由器上使用Telnet技术(AAA模式),实现R1能够远程......
  • ensp登录方式
    登录方式为 console   telnet  ssh  stelnet  telnet和ssh  ......
  • eNSP的使用5  VRRP负载均衡
    sw1主(vlan1)  备(vlan2)sw2主(vlan2)  备(vlan1)sw1:配置in valn 1vrrp vrid 1 virtual-ip 192.168.1.254vrrp vrid 1 priority 105in vlan 2vrrp vrid 2......