华为ensp基础实验系列-小型网络综合实验

最近考试、测试的特别多,今天跟大家分享个以最少的设备数量,搭建一个多协议的网络 需求如下: 1、路由器、交换机基本配置方法 2、静态路由技术 3、虚拟局域网技术 4、链路聚合技术 5、三层交换技术 6、DHCP技术 7、动态路由技术RIP或OSPF 8、ACL访问控制列表技术 一般来说看到这些需求第一反应就是小型企业网络,这里还缺了个nat的需求,但是没有给出 拓扑图如下: 在这里插入图片描述 配置思路 二层 二层中需要的技术就是stp、vlan,那么stp可以扩展到mstp,vlan无非就是接口状态,acc和trunk,还可以开启边缘端口,汇聚/核心交换机之间配置链路聚合 三层 三层网关利用vrrp主备优先级和mstp的多实例进行呼应,动态路由选择ospf 出口设备配置静态路由,acl,ospf下发缺省路由 这么一来协议加起来差不多7-8种,所以基本可以满足老师的任何需求,以上所说的都是常见需求和技术,如果老师稍微专业,可能会提出一些偏特性的知识,或是中高级的知识,那么关注我,我会持续更新内容哦 配置如下 接入交换机配置(sw3、sw4) sw3交换机配置 sysname LSW3

vlan batch 10 20

stp region-configuration region-name huawei instance 1 vlan 10 20 instance 2 vlan 30 40 active region-configuration

interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 20

interface Ethernet0/0/3 port link-type trunk port trunk allow-pass vlan 30 40

interface Ethernet0/0/11 port link-type access port default vlan 10 stp edged-port enable

interface Ethernet0/0/12 port link-type access port default vlan 20 stp edged-port enable

sw4交换机配置 sysname LSW4

vlan batch 30 40

stp region-configuration region-name huawei instance 1 vlan 10 20 instance 2 vlan 30 40 active region-configuration

interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 30 40

interface Ethernet0/0/3 port link-type trunk port trunk allow-pass vlan 30 40

interface Ethernet0/0/11 port link-type access port default vlan 30 stp edged-port enable

interface Ethernet0/0/12 port link-type access port default vlan 40 stp edged-port enable

sw1交换机配置 sysname LSW1

二层配置 vlan batch 10 20 30 40 100

stp instance 1 root primary stp instance 2 root secondary

stp region-configuration region-name huawei instance 1 vlan 10 20 instance 2 vlan 30 40 active region-configuration

interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/1 port link-type access port default vlan 100

interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 30 40

interface GigabitEthernet0/0/11 eth-trunk 1

interface GigabitEthernet0/0/12 eth-trunk 1

dhcp配置 dhcp enable

ip pool vlan10 gateway-list 192.168.1.254 network 192.168.1.0 mask 255.255.255.0

ip pool vlan20 gateway-list 192.168.2.254 network 192.168.2.0 mask 255.255.255.0

ip pool vlan30 gateway-list 192.168.3.254 network 192.168.3.0 mask 255.255.255.0

ip pool vlan40 gateway-list 192.168.4.254 network 192.168.4.0 mask 255.255.255.0

三层网关及vrrp配置 interface Vlanif10 ip address 192.168.1.252 255.255.255.0 vrrp vrid 10 virtual-ip 192.168.1.254 vrrp vrid 10 priority 120 dhcp select global

interface Vlanif20 ip address 192.168.2.252 255.255.255.0 vrrp vrid 20 virtual-ip 192.168.2.254 vrrp vrid 20 priority 120 dhcp select global

interface Vlanif30 ip address 192.168.3.252 255.255.255.0 vrrp vrid 30 virtual-ip 192.168.3.254 dhcp select global

interface Vlanif40 ip address 192.168.4.252 255.255.255.0 vrrp vrid 40 virtual-ip 192.168.4.254 dhcp select global

interface Vlanif100 ip address 192.168.100.2 255.255.255.252

三层路由配置 ospf 1 router-id 1.1.1.1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 network 192.168.4.0 0.0.0.255 network 192.168.100.0 0.0.0.255

sw2交换机配置 sysname LSW2

二层vlan配置 vlan batch 10 20 30 40 100

stp instance 1 root secondary stp instance 2 root primary

stp region-configuration region-name huawei instance 1 vlan 10 20 instance 2 vlan 30 40 active region-configuration

interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/1 port link-type access port default vlan 100

interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 30 40

interface GigabitEthernet0/0/11 eth-trunk 1

interface GigabitEthernet0/0/12 eth-trunk 1

地址池配置 dhcp enable

ip pool vlan10 gateway-list 192.168.1.254 network 192.168.1.0 mask 255.255.255.0

ip pool vlan20 gateway-list 192.168.2.254 network 192.168.2.0 mask 255.255.255.0

ip pool vlan30 gateway-list 192.168.3.254 network 192.168.3.0 mask 255.255.255.0

ip pool vlan40 gateway-list 192.168.4.254 network 192.168.4.0 mask 255.255.255.0

三层网关及vrrp配置 interface Vlanif10 ip address 192.168.1.253 255.255.255.0 vrrp vrid 10 virtual-ip 192.168.1.254 dhcp select global

interface Vlanif20 ip address 192.168.2.253 255.255.255.0 vrrp vrid 20 virtual-ip 192.168.2.254 dhcp select global

interface Vlanif30 ip address 192.168.3.253 255.255.255.0 vrrp vrid 30 virtual-ip 192.168.3.254 vrrp vrid 30 priority 120 dhcp select global

interface Vlanif40 ip address 192.168.4.253 255.255.255.0 vrrp vrid 40 virtual-ip 192.168.4.254 vrrp vrid 40 priority 120 dhcp select global

interface Vlanif100 ip address 192.168.101.2 255.255.255.252

路由配置 ospf 1 router-id 1.1.1.2 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 network 192.168.4.0 0.0.0.255 network 192.168.101.0 0.0.0.255

sysname AR1

acl number 2000 rule 5 permit source 192.168.1.0 0.0.0.255 rule 10 permit source 192.168.2.0 0.0.0.255 rule 15 permit source 192.168.3.0 0.0.0.255 rule 20 permit source 192.168.4.0 0.0.0.255

interface GigabitEthernet0/0/0 ip address 100.1.1.1 255.255.255.252 nat outbound 2000

interface GigabitEthernet0/0/1 ip address 192.168.100.1 255.255.255.252

interface GigabitEthernet0/0/2 ip address 192.168.101.1 255.255.255.252

ospf 1 router-id 1.1.1.3 default-route-advertise area 0.0.0.0 network 192.168.100.0 0.0.0.255 network 192.168.101.0 0.0.0.255

ip route-static 0.0.0.0 0.0.0.0 100.1.1.2

以上配置可直接复制到设备中,最后测试结果即可 MSTP验证 在这里插入图片描述 在这里插入图片描述 链路聚合验证 在这里插入图片描述 在这里插入图片描述

vrrp验证 在这里插入图片描述 在这里插入图片描述

dhcp验证 在这里插入图片描述

ospf验证 在这里插入图片描述

nat验证 在这里插入图片描述 在这里插入图片描述

文章版权声明:除非注明,否则均为 谢士广博客 原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
AddoilApplauseBadlaughBombCoffeeFabulousFacepalmFecesFrownHeyhaInsidiousKeepFightingNoProbPigHeadShockedSinistersmileSlapSocialSweatTolaughWatermelonWittyWowYeahYellowdog
评论列表 (暂无评论,8234人围观)

还没有评论,来说两句吧...

目录[+]