eNSP(Enterprise Network Simulation Platform)是一款由华为提供的、可扩展的、图形化操作的网络仿真工具平台,主要对企业网络路由器、交换机进行软件仿真,完美呈现真实设备实景,支持大型网络模拟,让广大用户有机会在没有真实设备的情况下能够模拟演练,学习网络技术。
eNSP主要针对华为的设备,思科的设备对应软件是网络入门模拟器:Cisco Packet Tracer 实验教程
eNSP对服务器的操作自由度较少,路由不能自定义配置,至少我没找到。
eNSP全套软件下载地址汇总
华为 eNSP 模拟器安装教程(内含下载地址)
win10、11下安装eNSP(1.3.00)并完美运行
eNSP实验一:IPv4编址及IPv4路由基础
华为ensp 二层交换机使用vlan实现不同网段互通
华为交换机最简单的入门配置,一学就会
CloudEngine 8800, 7800, 6800, 5800系列交换机 产品文档配置设备管理配置指南使用display命令查看设备状态
服务器A <----> 交换机 R <---------> 服务器B
相同网段
192.168.0.1~2 (vlan 10)
在二层交换机模式下操作(portswitch)
system-view
Enter system view, return user view with return command.
[~HUAWEI]sys
[~HUAWEI]sysname R1
[*HUAWEI]commit
[~R1]vlan 10
[*R1-vlan10]commit
[~R1-vlan10]q
[~R1]dis vlan
The total number of vlans is : 2
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
MAC-LRN: MAC-address learning; STAT: Statistic;
BC: Broadcast; MC: Multicast; UC: Unknown-unicast;
FWD: Forward; DSD: Discard;
--------------------------------------------------------------------------------
VID Ports
--------------------------------------------------------------------------------
1 UT:GE1/0/0(D) GE1/0/1(D) GE1/0/2(D) GE1/0/3(D)
GE1/0/4(D) GE1/0/5(D) GE1/0/6(D) GE1/0/7(D)
GE1/0/8(D) GE1/0/9(D) GE1/0/10(D) GE1/0/11(D)
GE1/0/12(D) GE1/0/13(D) GE1/0/14(D) GE1/0/15(D)
GE1/0/16(D) GE1/0/17(D) GE1/0/18(D) GE1/0/19(D)
GE1/0/20(D) GE1/0/21(D) GE1/0/22(D) GE1/0/23(D)
GE1/0/24(D) GE1/0/25(D) GE1/0/26(D) GE1/0/27(D)
GE1/0/28(D) GE1/0/29(D) GE1/0/30(D) GE1/0/31(D)
GE1/0/32(D) GE1/0/33(D) GE1/0/34(D) GE1/0/35(D)
GE1/0/36(D) GE1/0/37(D) GE1/0/38(D) GE1/0/39(D)
GE1/0/40(D) GE1/0/41(D) GE1/0/42(D) GE1/0/43(D)
GE1/0/44(D) GE1/0/45(D) GE1/0/46(D) GE1/0/47(D)
10
VID Type Status Property MAC-LRN STAT BC MC UC Description
--------------------------------------------------------------------------------
1 common enable default enable disable FWD FWD FWD VLAN 0001
10 common enable default enable disable FWD FWD FWD VLAN 0010
可以看出 ,配置了vlan 10,但没有端口加入
[~R1]
[~R1]
[~R1]int g
[~R1]int GE 1/0/0
[~R1-GE1/0/0]port link-type access (配置link type)
[~R1-GE1/0/0]port default vlan 10 (加入 vlan)
[*R1-GE1/0/0]commit
[~R1-GE1/0/0]q
[~R1]int ge 1/0/1
[~R1-GE1/0/1]port link-type access
[~R1-GE1/0/1]port default vlan 10
[*R1-GE1/0/1]commit
[~R1-GE1/0/1]undo shutdown (打开端口)
[*R1-GE1/0/1]commit
[~R1-GE1/0/1]q
[~R1]int ge 1/0/0
[~R1-GE1/0/0]undo shu
[~R1-GE1/0/0]undo shutdown
[*R1-GE1/0/0]commit
[~R1-GE1/0/0]q
[~R1]dis vlan
The total number of vlans is : 2
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
MAC-LRN: MAC-address learning; STAT: Statistic;
BC: Broadcast; MC: Multicast; UC: Unknown-unicast;
FWD: Forward; DSD: Discard;
--------------------------------------------------------------------------------
VID Ports
--------------------------------------------------------------------------------
1 UT:GE1/0/2(D) GE1/0/3(D) GE1/0/4(D) GE1/0/5(D)
GE1/0/6(D) GE1/0/7(D) GE1/0/8(D) GE1/0/9(D)
GE1/0/10(D) GE1/0/11(D) GE1/0/12(D) GE1/0/13(D)
GE1/0/14(D) GE1/0/15(D) GE1/0/16(D) GE1/0/17(D)
GE1/0/18(D) GE1/0/19(D) GE1/0/20(D) GE1/0/21(D)
GE1/0/22(D) GE1/0/23(D) GE1/0/24(D) GE1/0/25(D)
GE1/0/26(D) GE1/0/27(D) GE1/0/28(D) GE1/0/29(D)
GE1/0/30(D) GE1/0/31(D) GE1/0/32(D) GE1/0/33(D)
GE1/0/34(D) GE1/0/35(D) GE1/0/36(D) GE1/0/37(D)
GE1/0/38(D) GE1/0/39(D) GE1/0/40(D) GE1/0/41(D)
GE1/0/42(D) GE1/0/43(D) GE1/0/44(D) GE1/0/45(D)
GE1/0/46(D) GE1/0/47(D)
10 UT:GE1/0/0(U) GE1/0/1(U)
VID Type Status Property MAC-LRN STAT BC MC UC Description
--------------------------------------------------------------------------------
1 common enable default enable disable FWD FWD FWD VLAN 0001
10 common enable default enable disable FWD FWD FWD VLAN 0010
ping 测试
PC>ipconfig
Link local IPv6 address...........: fe80::5689:98ff:fe83:27ca
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.0.1
Subnet mask.......................: 255.255.255.0
Gateway...........................: 0.0.0.0
Physical address..................: 54-89-98-83-27-CA
DNS server........................:
PC>ping 192.168.0.2
Ping 192.168.0.2: 32 data bytes, Press Ctrl_C to break
From 192.168.0.2: bytes=32 seq=1 ttl=128 time=15 ms
From 192.168.0.2: bytes=32 seq=2 ttl=128 time=16 ms
From 192.168.0.2: bytes=32 seq=3 ttl=128 time=15 ms
From 192.168.0.2: bytes=32 seq=4 ttl=128 time=16 ms
--- 192.168.0.2 ping statistics ---
4 packet(s) transmitted
4 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/15/16 ms
可以ping 通
system-view
Enter system view, return user view with return command.
[~HUAWEI]int ge 1/0/0
[~HUAWEI-GE1/0/0]undo sh
[~HUAWEI-GE1/0/0]undo shutdown
[*HUAWEI-GE1/0/0]q
[*HUAWEI]commit
[~HUAWEI]vlan bat
[~HUAWEI]vlan batch 10 20
[*HUAWEI]commit
[~HUAWEI]int ge 1/0/0
[~HUAWEI-GE1/0/0]por
[~HUAWEI-GE1/0/0]port lin
[~HUAWEI-GE1/0/0]port link-type ac
[~HUAWEI-GE1/0/0]port link-type access
[~HUAWEI-GE1/0/0]port de
[~HUAWEI-GE1/0/0]port default vlan 10
[*HUAWEI-GE1/0/0]commit
[~HUAWEI-GE1/0/0]q
[~HUAWEI]int ge 1/0/1
[~HUAWEI-GE1/0/1]undo shutd
[~HUAWEI-GE1/0/1]undo shutdown
[*HUAWEI-GE1/0/1]port link
[*HUAWEI-GE1/0/1]port link-type access
[*HUAWEI-GE1/0/1]port defa
[*HUAWEI-GE1/0/1]port default vlan 10
[*HUAWEI-GE1/0/1]commit
[~HUAWEI-GE1/0/1]q
[~HUAWEI]int ge 1/0/2
[~HUAWEI-GE1/0/2]undo shu
[~HUAWEI-GE1/0/2]undo shutdown
[*HUAWEI-GE1/0/2]port lin
[*HUAWEI-GE1/0/2]port link-type acc
[*HUAWEI-GE1/0/2]port link-type access
[*HUAWEI-GE1/0/2]port def
[*HUAWEI-GE1/0/2]port default vlan 20
[*HUAWEI-GE1/0/2]commit
[~HUAWEI-GE1/0/2]q
[~HUAWEI]int ge 1/0/3
[~HUAWEI-GE1/0/3]undo shu
[~HUAWEI-GE1/0/3]undo shutdown
[*HUAWEI-GE1/0/3]port link
[*HUAWEI-GE1/0/3]port link-type access
[*HUAWEI-GE1/0/3]port defa
[*HUAWEI-GE1/0/3]port default vlan 20
[*HUAWEI-GE1/0/3]commit
[~HUAWEI-GE1/0/3]q
[~HUAWEI]dis vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
MAC-LRN: MAC-address learning; STAT: Statistic;
BC: Broadcast; MC: Multicast; UC: Unknown-unicast;
FWD: Forward; DSD: Discard;
--------------------------------------------------------------------------------
VID Ports
--------------------------------------------------------------------------------
1 UT:GE1/0/4(D) GE1/0/5(D) GE1/0/6(D) GE1/0/7(D)
GE1/0/8(D) GE1/0/9(D) GE1/0/10(D) GE1/0/11(D)
GE1/0/12(D) GE1/0/13(D) GE1/0/14(D) GE1/0/15(D)
GE1/0/16(D) GE1/0/17(D) GE1/0/18(D) GE1/0/19(D)
GE1/0/20(D) GE1/0/21(D) GE1/0/22(D) GE1/0/23(D)
GE1/0/24(D) GE1/0/25(D) GE1/0/26(D) GE1/0/27(D)
GE1/0/28(D) GE1/0/29(D) GE1/0/30(D) GE1/0/31(D)
GE1/0/32(D) GE1/0/33(D) GE1/0/34(D) GE1/0/35(D)
GE1/0/36(D) GE1/0/37(D) GE1/0/38(D) GE1/0/39(D)
GE1/0/40(D) GE1/0/41(D) GE1/0/42(D) GE1/0/43(D)
GE1/0/44(D) GE1/0/45(D) GE1/0/46(D) GE1/0/47(D)
10 UT:GE1/0/0(U) GE1/0/1(U)
20 UT:GE1/0/2(U) GE1/0/3(U)
VID Type Status Property MAC-LRN STAT BC MC UC Description
--------------------------------------------------------------------------------
1 common enable default enable disable FWD FWD FWD VLAN 0001
10 common enable default enable disable FWD FWD FWD VLAN 0010
20 common enable default enable disable FWD FWD FWD VLAN 0020
开启各个端口, 默认vlan 1,
VID Ports
--------------------------------------------------------------------------------
1 UT:GE1/0/0(U) GE1/0/1(U) GE1/0/2(U) GE1/0/3(U)
GE1/0/4(D) GE1/0/5(D) GE1/0/6(D) GE1/0/7(D)
GE1/0/8(D) GE1/0/9(D) GE1/0/10(D) GE1/0/11(D)
GE1/0/12(D) GE1/0/13(D) GE1/0/14(D) GE1/0/15(D)
GE1/0/16(D) GE1/0/17(D) GE1/0/18(D) GE1/0/19(D)
GE1/0/20(D) GE1/0/21(D) GE1/0/22(D) GE1/0/23(D)
GE1/0/24(D) GE1/0/25(D) GE1/0/26(D) GE1/0/27(D)
GE1/0/28(D) GE1/0/29(D) GE1/0/30(D) GE1/0/31(D)
GE1/0/32(D) GE1/0/33(D) GE1/0/34(D) GE1/0/35(D)
GE1/0/36(D) GE1/0/37(D) GE1/0/38(D) GE1/0/39(D)
GE1/0/40(D) GE1/0/41(D) GE1/0/42(D) GE1/0/43(D)
GE1/0/44(D) GE1/0/45(D) GE1/0/46(D) GE1/0/47(D)
VID Type Status Property MAC-LRN STAT BC MC UC Description
--------------------------------------------------------------------------------
1 common enable default enable disable FWD FWD FWD VLAN 0001
同网段可ping 通,不同网段ping 不通
system-view
Enter system view, return user view with return command.
[~HUAWEI]int ge 1/0/0
[~HUAWEI-GE1/0/0]undo shutdo
[~HUAWEI-GE1/0/0]undo shutdown
[*HUAWEI-GE1/0/0]q
[*HUAWEI]commit
[~HUAWEI]int ge 1/0/1
[~HUAWEI-GE1/0/1]undo shu
[~HUAWEI-GE1/0/1]undo shutdown
[*HUAWEI-GE1/0/1]q
[*HUAWEI]commit
[~HUAWEI]dis int brief
PHY: Physical
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(d): Dampening Suppressed
(p): port alarm down
(dl): DLDP down
(c): CFM down
InUti/OutUti: input utility rate/output utility rate
Interface PHY Protocol InUti OutUti inErrors outErrors
GE1/0/0 up up 0% 0% 0 0
GE1/0/1 up up 0% 0% 0 0
GE1/0/2 *down down 0% 0% 0 0
GE1/0/3 *down down 0% 0% 0 0
GE1/0/4 *down down 0% 0% 0 0
GE1/0/5 *down down 0% 0% 0 0
GE1/0/6 *down down 0% 0% 0 0
GE1/0/7 *down down 0% 0% 0 0
GE1/0/8 *down down 0% 0% 0 0
GE1/0/9 *down down 0% 0% 0 0
[~HUAWEI]int ge 1/0/0
[~HUAWEI-GE1/0/0]ip add
[~HUAWEI-GE1/0/0]por
[~HUAWEI-GE1/0/0]portsw
[~HUAWEI-GE1/0/0]undo po
[~HUAWEI-GE1/0/0]undo ports
[~HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip addr
[*HUAWEI-GE1/0/0]ip address 192.168.0.254 24
[*HUAWEI-GE1/0/0]commit
[~HUAWEI-GE1/0/0]q
[~HUAWEI]ping 192.168.0.1
PING 192.168.0.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.0.1: bytes=56 Sequence=1 ttl=128 time=11 ms
Reply from 192.168.0.1: bytes=56 Sequence=2 ttl=128 time=8 ms
Reply from 192.168.0.1: bytes=56 Sequence=3 ttl=128 time=7 ms
Reply from 192.168.0.1: bytes=56 Sequence=4 ttl=128 time=5 ms
--- 192.168.0.1 ping statistics ---
4 packet(s) transmitted
4 packet(s) received
0.00% packet loss
round-trip min/avg/max = 5/7/11 ms
[~HUAWEI]int ge 1/0/1
[~HUAWEI-GE1/0/1]undo por
[~HUAWEI-GE1/0/1]undo portsw
[~HUAWEI-GE1/0/1]undo portswitch
[*HUAWEI-GE1/0/1]ip add
[*HUAWEI-GE1/0/1]ip address 192.168.1.254 24
[*HUAWEI-GE1/0/1]commit
[~HUAWEI-GE1/0/1]q
[~HUAWEI]ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=128 time=5 ms
Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=128 time=8 ms
Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=128 time=8 ms
--- 192.168.1.1 ping statistics ---
3 packet(s) transmitted
3 packet(s) received
0.00% packet loss
round-trip min/avg/max = 5/7/8 ms
PC>ping 192.168.1.1
Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
From 192.168.1.1: bytes=32 seq=1 ttl=127 time<1 ms
From 192.168.1.1: bytes=32 seq=2 ttl=127 time=15 ms
From 192.168.1.1: bytes=32 seq=3 ttl=127 time=16 ms
From 192.168.1.1: bytes=32 seq=4 ttl=127 time=15 ms
From 192.168.1.1: bytes=32 seq=5 ttl=127 time<1 ms
--- 192.168.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 0/9/16 ms
PC>ifconfig
Invalid command!
PC>ipconfig
Link local IPv6 address...........: fe80::5689:98ff:fede:2526
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.0.1
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.0.254
Physical address..................: 54-89-98-DE-25-26
DNS server........................:
PC4 连接的端口不能再配置 192.168.0.254/24 这个网段的ip
所以交换机三层每个端口要配置不同的网段?