华为eNSP实验——单臂路由实现网络通信

二层交换机——路由器 实验(单臂路由)

在这里插入图片描述

R1:
The device is running!

u t m
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R1
[R1]user-interface vty 0 4
[R1-ui-vty0-4]idle-timeout 0 0
[R1-ui-vty0-4]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]vlan-type dot1q 20 default
[R1-GigabitEthernet0/0/0.1]ip add 192.168.2.1 24
[R1-GigabitEthernet0/0/0.1]un sh
Info: Interface GigabitEthernet0/0/0.1 is not shutdown.
[R1-GigabitEthernet0/0/0.1]q
[R1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.1]vlan-type dot1q 30 default
[R1-GigabitEthernet0/0/0.2]ip add 192.168.3.1 24
[R1-GigabitEthernet0/0/0.2]un sh
Info: Interface GigabitEthernet0/0/0.2 is not shutdown.
[R1-GigabitEthernet0/0/0.2]q

LSW2:
The device is running!

u t m Info: Current terminal monitor is off. sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw2 [sw2]user-interface vty 0 4 [sw2-ui-vty0-4]idle-timeout 0 0 [sw2-ui-vty0-4]q [sw2]vlan 20 [sw2-vlan20]q [sw2]vlan 30 [sw2-vlan30]q [sw2]int e0/0/1 [sw2-Ethernet0/0/1]p l a [sw2-Ethernet0/0/1]p d v 20 [sw2-Ethernet0/0/1]q [sw2]int e0/0/2 [sw2-Ethernet0/0/2]p l a [sw2-Ethernet0/0/2]p d v 30 [sw2-Ethernet0/0/2]q [sw2]int g0/0/1 [sw2-GigabitEthernet0/0/1]p l t [sw2-GigabitEthernet0/0/1]p t a v 20 30 [sw2-GigabitEthernet0/0/1]un sh Info: Interface GigabitEthernet0/0/1 is not shutdown. [sw2-GigabitEthernet0/0/1]q [sw2]user-interface vty 0 4 [sw2-ui-vty0-4]authentication-mode password [sw2-ui-vty0-4]set authentication password cipher aaa [sw2-ui-vty0-4]user privilege level 3 [sw2-ui-vty0-4]q 配置PC机的IP地址、子网掩码和网关(属于不同网段,所以要设置网关,设置完成后必须要点“应用”):

在这里插入图片描述
在这里插入图片描述
进入命令行输入“ping (另一台PC的IP地址)”,进行连接,能够成功连接,说明配置无问题,实现了二层交换机+路由器使网络成功通信。

猜你喜欢

转载自blog.csdn.net/weixin_48191138/article/details/106958286