华为模拟器中的单臂路由,使用三层交换机

时间:2020-07-22 20:44:18   收藏:0   阅读:105

技术图片

实验步骤:

Step1:必打命令

<Huawei>undo terminal monitor
<Huawei>system-view
[Huawei]sysname SW1
[SW1]user-interface console 0
[SW1-ui-console0]idle-timeout 0 0
[SW1-ui-console0]quit

Step2:设置交换机中的vlan种类

[SW1]vlan batch 10 20

Step3:设置两个端口的vlan同行模式

[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access 
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access 
[SW1-GigabitEthernet0/0/2]port default vlan 20
[SW1-GigabitEthernet0/0/2]quit

Step4:设置连接PC机的网关

[SW1]int Vlanif 10
[SW1-Vlanif10]ip address 192.168.1.1 24
[SW1-Vlanif10]undo shutdown
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip address 192.168.2.1 24
[SW1-Vlanif20]undo shutdown
[SW1-Vlanif20]quit

Step5:在PC机上ping两个网关和另一个PC机地址,ping通则代表实验成功。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!