华为ENSP模拟器简易路由交换机分段划分Vlan

编程知识 更新时间:2023-05-02 04:38:18

简易网络组网01

1. 配置一台路由器,

1.1 配置默认VLan一个ip地址当做总网关

system-view
interface vlanif 1
ip address 10.10.10.1 255.255.255.0
quit

1.2 路由器配置静态路由,使PC可以跨网段互通,下一跳

ip route-static 192.168.1.0 255.255.255.0 10.10.10.2
ip route-static 192.168.2.0 255.255.255.0 10.10.10.2
ip route-static 192.168.3.0 255.255.255.0 10.10.10.3
ip route-static 192.168.4.0 255.255.255.0 10.10.10.3
display current-configuration
quit

2. 配置2台交换机

2.1 第一台交换机

2.1.1 新增Vlan10
system-view
vlan 10
quit
2.1.2 给Vlan10划分地址 10.10.10.2 作为交换机链接路由器的出入口地址
interface vlanif 10
ip address 10.10.10.2 24
quit
2.1.3 划分交换机1 GE10口到Vlan10作为交换机的出入口
interface GigabitEthernet 0/0/10
port link-type access
port default vlan 10
quit
quit

192.168.1.1 交换机1 GE2 口对应Vlan1地址、电脑1地址的网关。

2.1.4 新增Vlan2
system-view
vlan 2
quit
2.1.5 给Vlan2分配地址 192.168.1.1
interface vlanif 2
ip address 192.168.1.1 24
quit
2.1.6 配置交换机GE2口端口模式,并且划分到Vlan2段
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 2
quit

192.168.2.1 交换机1 GE3 口对应Vla3地址、电脑2地址的网关。

2.1.7 新增Vlan3
system-view
vlan 3
quit
2.1.8 给Vlan3分配地址 192.168.2.1
interface vlanif 3
ip address 192.168.2.1 24
quit
2.1.9 配置交换机GE2口端口模式,并且划分到Vlan2段
interface GigabitEthernet 0/0/3
port link-type access
port default vlan 3
quit
2.1.10 配置静态地址,配置路由下一跳到 交换机2所在的子网
ip route-static 192.168.3.0 255.255.255.0 10.10.10.1
ip route-static 192.168.4.0 255.255.255.0 10.10.10.1
quit

2.2 第二台交换机

10.10.10.2 交换机1出入口地址 Vlan10

2.2.1 新增Vlan10
system-view
vlan 10
quit
2.2.2 给Vlan10划分地址 10.10.10.3 作为交换机链接路由器的出入口地址
interface vlanif 10
ip address 10.10.10.3 24
quit
2.2.3 划分交换机2 GE10口到Vlan10作为交换机的出入口
interface GigabitEthernet 0/0/10
port link-type access
port default vlan 10
quit
quit

192.168.3.1 交换机2 GE2 口对应Vlan3地址、电脑1地址的网关。

2.2.4 新增Vlan3
system-view
vlan 3
quit
2.2.5 给Vlan2分配地址 192.168.1.1
interface vlanif 3
ip address 192.168.3.1 24
quit
2.2.6 配置交换机GE2口端口模式,并且划分到Vlan2段
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 3
quit

192.168.4.1 交换机2 GE3 口对应Vlan4地址、电脑4地址的网关。

2.2.7 新增Vlan4
system-view
vlan 4
quit
2.2.8 给Vlan2分配地址 192.168.1.1
interface vlanif 4
ip address 192.168.4.1 24
quit
2.2.9 配置交换机GE3口端口模式,并且划分到Vlan2段
interface GigabitEthernet 0/0/3
port link-type access
port default vlan 4
quit
2.2.10 配置静态地址,配置路由下一跳到 交换机1所在的子网
ip route-static 192.168.1.0 255.255.255.0 10.10.10.1
ip route-static 192.168.2.0 255.255.255.0 10.10.10.1
quit

3 配置4台PC客户端,给各PC客户端分配一个IP地址、子网掩码、网关地址(即上层交换机的Vlan)

192.168.1.2/24 第1台交换机下的PC

192.168.2.2/24 第1台交换机下的PC

192.168.3.2/24 第2台交换机下的PC

192.168.4.2/24 第2台交换机下的PC

最终拓扑图


更多推荐

华为ENSP模拟器简易路由交换机分段划分Vlan

本文发布于:2023-04-25 23:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/5b7002e74e6ca644fdf11497c09ada2b.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:华为   模拟器   路由   交换机   简易

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 103904文章数
  • 26193阅读数
  • 0评论数