综合实验
实验案例:在华为ensp软件上模拟实验,对本阶段的知识进行汇总实验 实验环境 如图所示,在win10下使用华为ensp软件上进行模拟实验
需求描述 将上述过程通过实验再现出来。 在华为ensp虚拟环境进行试验,各层是如何工作的 推荐步骤 新建一个拓扑图如下所示, 手动配置六台pc的IP地址子网掩码以及网关 对交换机各个接口进行配置, 对路由器各个接口进行设置,三层交换机的vlanif网关,使得不同vlan间的pc可以正常通信 配置静态路由
[Huawei]sysname sw2 [sw2]vlan batch 10 20 [sw2]int e0/0/1 [sw2-Ethernet0/0/1]p l a [sw2-Ethernet0/0/1]p d v 10 [sw2-Ethernet0/0/1]un sh [sw2]int e0/0/2 [sw2-Ethernet0/0/2]p l a [sw2-Ethernet0/0/2]p d v 20 [sw2-Ethernet0/0/2]un sh [sw2]int g0/0/1 [sw2-GigabitEthernet0/0/1]p l t [sw2-GigabitEthernet0/0/1]p t a v 10 20 [sw2-GigabitEthernet0/0/1]un sh [sw2]int g0/0/2 [sw2-GigabitEthernet0/0/2]p l t [sw2-GigabitEthernet0/0/2]p t a 10 20 [sw2-GigabitEthernet0/0/1]un sh 3、对sw3各接口进行配置、g/0/1配置trunk口,e/0/1和e/0/2配置access口
[Huawei]sysname sw3 [sw3]vlan batch 10 20 [sw3-Ethernet0/0/1]p l a [sw3-Ethernet0/0/1] p d v 10 [sw3-Ethernet0/0/1]un sh [sw3]int e0/0/2 [sw3-Ethernet0/0/2]p l a [sw3-Ethernet0/0/2]p d v 20 [sw3]int g0/0/1 [sw3-GigabitEthernet0/0/1]p l t [sw3-GigabitEthernet0/0/1]p t a v 10 20 [sw3-GigabitEthernet0/0/1]un sh
4、对交换机sw4各接口进行配置,e/0/1和e/0/2配置access口,设置trunk1进行捆绑
[Huawei]sysname sw4 [sw4]vlan batch 30 40 [sw4]int e0/0/1 [sw4-Ethernet0/0/1]p l a [sw4-Ethernet0/0/1]p d v 30 [sw4-Ethernet0/0/1]un sh [sw4]int e0/0/2 [sw4-Ethernet0/0/2]p l a [sw4-Ethernet0/0/2]p d v 40 [sw4-Ethernet0/0/2]un sh [sw4]int Eth-Trunk 1 [sw4]int g0/0/1 [sw4-GigabitEthernet0/0/1]eth-trunk 1 [sw4-GigabitEthernet0/0/2]eth-trunk 1 [sw4]int Eth-Trunk 1 [sw4-Eth-Trunk1]p l t [sw4-Eth-Trunk1]p t a v 30 40 [sw4-Eth-Trunk1]un sh 5、对三层交换机sw4各接口进行配置,g/0/1和g/0/2配置trunk口;配置vlanif
[Huawei]sysname sw1 [sw1]vlan batch 10 20 30 [sw1]int g0/0/1 [sw1-GigabitEthernet0/0/1]p l t [sw1-GigabitEthernet0/0/1]p t a v 10 20 [sw1]int g0/0/2 [sw1-GigabitEthernet0/0/2]p l a [sw1-GigabitEthernet0/0/2]p d v 30 [sw1]int Vlanif 10 [sw1-Vlanif10]ip add 192.168.10.1 24 [sw1-Vlanif10]un sh [sw1]int Vlanif 20 [sw1-Vlanif20]ip add 192.168.20.1 24 [sw1]int Vlanif 30 [sw1-Vlanif30]ip add 12.0.0.1 30
6、设置路由器接口e-trunk1口的捆绑
[Huawei]sysname r1 [r1]int Eth-Trunk 1 [r1-Eth-Trunk1]trunkport g 0/0/1 to 0/0/2 [r1]int Eth-Trunk 1.30 [r1-Eth-Trunk1.30]ip add 192.168.30.1 24 [r1-Eth-Trunk1.30]d t v 30 [r1]int Eth-Trunk 1.40 [r1-Eth-Trunk1.40]ip add 192.168.40.1 24 [r1-Eth-Trunk1.40]d t v 40 [r1-Eth-Trunk1.40]a b e [r1-Eth-Trunk1.40]un sh
7、配置静态路由
[r1]ip route-static 192.168.10.0 24 12.0.0.1 [r1]ip route-static 192.168.20.0 24 12.0.0.1 [sw1]ip route-static 192.168.30.0 24 12.0.0.2 [sw1]ip route-static 192.168.40.0 24 12.0.0.2
8、用pc6依次将ping前五个pc,全部ping通