在2019年学习网络的时候是从思科产品开始学的,那个时候接触了思科的6506、4506、3750、3550、2950,因为网络设备多,基本上是在多余的设备上直接操作,掌握后再上现场设备中去操作。当时使用了思科的模拟器CISCO Packet Tracer,就是下面的界面:
现在感觉很土,当时使用了觉得还可以,感觉还是挺神奇的。后面学习H3C和华为的产品就没有使用过模拟器。也安装过,但是可能与思科的使用不一样,觉得别扭就没有用,都是在真机上进行操作,体验更好一些。
看着别人用的挺好的,今天就下载了eNSP,还是要用一下,这么多人在用肯定是不错的。
安装很简单,前提是需要正确安装wireshark和VirtualBox。
今天使用eNSP进行组网实验,就是利用vlan进行网络设备间的通讯,eNSP还是很方便,就是设备型号不多,需要额外去下载其他的设备。
实验图:
PC1:处于Vlan10,IP地址:192.168.1.2,网关地址:192.168.1.1,子网掩码:255.255.255.224
PC4:处于Vlan20,IP地址:192.168.1.34,网关地址:192.168.1.33,子网掩码:255.255.255.224
PC2:处于Vlan30,IP地址:172.16.1.2,网关地址:172.16.1.1,子网掩码:255.255.255.224
PC5:处于Vlan40,IP地址:172.16.1.34,网关地址:172.16.1.33,子网掩码:255.255.255.224
现在要求PC1、PC2、PC4、PC5能互相访问。
首先保证网络设备间的互联,使用Vlan9来让所有的网络设备进行相互通讯,当然也可以分别在不同的vlan下,其次就是指定路由,这里使用静态路由方式。
路由器R5:
<HUAWEI>sys
[HUAWEI]undo info-center enable
[HUAWEI]sysname R5
[R5]vlan 9
[R5-vlan9]quit
[R5]interface Vlanif 9
[R5-Vlanif9]ip address 192.168.10.4 255.255.255.0
[R5-Vlanif9]quit
[R5]interface Ethernet 0/0/0
[R5-Ethernet0/0/0]portswitch
[R5-Ethernet0/0/0]port link-type access
[R5-Ethernet0/0/0]port default vlan 9
[R5-Ethernet0/0/0]quit
[R5]interface Ethernet 0/0/1
[R5-Ethernet0/0/1]portswitch
[R5-Ethernet0/0/1]port link-type access
[R5-Ethernet0/0/1]port default vlan 9
[R5-Ethernet0/0/1]quit
[R5]ip route-static 172.16.1.0 255.255.255.0 192.168.10.5
[R5]ip route-static 192.168.1.0 255.255.255.0 192.168.10.3
路由器R6:
<HUAWEI>sys
[HUAWEI]undo info-center enable
[HUAWEI]sysname R6
[R6]vlan 9
[R6-vlan9]quit
[R6]interface Vlanif 9
[R6-Vlanif9]ip address 192.168.10.5 255.255.255.0
[R6-Vlanif9]quit
[R6]interface Ethernet 0/0/0
[R6-Ethernet0/0/0]portswitch
[R6-Ethernet0/0/0]port link-type access
[R6-Ethernet0/0/0]port default vlan 9
[R6-Ethernet0/0/1]quit
[R6]interface Ethernet 0/0/1
[R6-Ethernet0/0/1]portswitch
[R6-Ethernet0/0/1]port link-type access
[R6-Ethernet0/0/1]port default vlan 9
[R6-Ethernet0/0/1]quit
[R6]ip route-static 172.16.1.0 255.255.255.0 192.168.10.6
[R6]ip route-static 192.168.1.0 255.255.255.0 192.168.10.4
路由器R7:
<HUAWEI>sys
[HUAWEI]undo info-center enable
[HUAWEI]sysname R7
[R7]vlan 9
[R7-vlan9]quit
[R7]interface Vlanif 9
[R7-Vlanif9]ip address 192.168.10.5 255.255.255.0
[R7-Vlanif9]quit
[R7]interface Ethernet 0/0/0
[R7-Ethernet0/0/0]portswitch
[R7-Ethernet0/0/0]port link-type access
[R7-Ethernet0/0/0]port default vlan 9
[R7-Ethernet0/0/0]quit
[R7]interface Ethernet 0/0/1
[R7-Ethernet0/0/1]portswitch
[R7-Ethernet0/0/1]port link-type access
[R7-Ethernet0/0/1]port default vlan 9
[R7-Ethernet0/0/1]quit
[R7]ip route-static 172.16.1.0 255.255.255.0 192.168.10.7
[R7]ip route-static 192.168.1.0 255.255.255.0 192.168.10.5
交换机HUAWEI S7706-A:
<HUAWEI>sys
[HUAWEI]sysname HUAWEI S7706-A
[HUAWEI S7706-A]vlan 9
[HUAWEI S7706-A-vlan9]quit
[HUAWEI S7706-A]interface Vlanif 9
[HUAWEI S7706-Vlanif9]ip address 192.168.10.3 255.255.255.0
[HUAWEI S7706-Vlanif9]quit
[HUAWEI S7706-A]vlan 10
[HUAWEI S7706-A-vlan10]quit
[HUAWEI S7706-A]interface Vlanif 10
[HUAWEI S7706-Vlanif10]ip address 192.168.1.1 255.255.255.224
[HUAWEI S7706-Vlanif10]quit
[HUAWEI S7706-A]interface Vlanif 20
[HUAWEI S7706-Vlanif20]ip address 192.168.1.33 255.255.255.224
[HUAWEI S7706-Vlanif20]quit
[HUAWEI S7706-B]interface GigabitEthernet 0/0/2
[HUAWEI S7706-B-GigabitEthernet0/0/2]port link-type access
[HUAWEI S7706-B-GigabitEthernet0/0/2]port default vlan 10
[HUAWEI S7706-B-GigabitEthernet0/0/2]quit
[HUAWEI S7706-B]interface GigabitEthernet 0/0/3
[HUAWEI S7706-B-GigabitEthernet0/0/3]port link-type access
[HUAWEI S7706-B-GigabitEthernet0/0/3]port default vlan 20
[HUAWEI S7706-B-GigabitEthernet0/0/3]quit
[HUAWEI S7706-A]ip route-static 172.16.1.0 255.255.255.0 192.168.10.4
交换机HUAWEIS7706-B:
<HUAWEI>sys
[HUAWEI]sysname HUAWEI S7706-B
[HUAWEI S7706-B]vlan 9
[HUAWEI S7706-B-vlan9]quit
[HUAWEI S7706-B]interface Vlanif 9
[HUAWEI S7706-B-Vlanif9]ip address 192.168.10.7 255.255.255.0
[HUAWEI S7706-B-Vlanif9]quit
[HUAWEI S7706-B]vlan 30
[HUAWEI S7706-B-vlan30]quit
[HUAWEI S7706-B]interface Vlanif 30
[HUAWEI S7706-B-Vlanif30]ip address 172.16.1.1 255.255.255.224
[HUAWEI S7706-B-Vlanif30]quit
[HUAWEI S7706-B]interface Vlanif 40
[HUAWEI S7706-B-Vlanif40]ip address 172.16.1.33 255.255.255.224
[HUAWEI S7706-B-Vlanif40]quit
[HUAWEI S7706-B]interface GigabitEthernet 0/0/2
[HUAWEI S7706-B-GigabitEthernet0/0/2]port link-type access
[HUAWEI S7706-B-GigabitEthernet0/0/2]port default vlan 30
[HUAWEI S7706-B-GigabitEthernet0/0/2]quit
[HUAWEI S7706-B]interface GigabitEthernet 0/0/3
[HUAWEI S7706-B-GigabitEthernet0/0/3]port link-type access
[HUAWEI S7706-B-GigabitEthernet0/0/3]port default vlan 40
[HUAWEI S7706-B-GigabitEthernet0/0/3]quit
[HUAWEI S7706-B]ip route-static 192.168.1.0 255.255.255.0 192.168.10.6
经过上面的配置,可以实现四台PC机器的相互通讯。
PC1的基础设置:
ping测试: