华为模拟器单臂路由技术
实验需求:
1.创建VLAN
2.VLAN划分正确
3.广播请求MAC地址开启
以下是拓扑图及所需设备:
一.创建VLAN
以下是命令及配置:
LSW1:
<Huawei>system-view
Oct 14 2013 11:41:30-08:00 Huawei %%01PHY/1/PHY(l)[54]: Ethernet0/0/3: change
status to up
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
[Huawei-vlan10]
Oct 14 2013 11:41:41-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 4, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-vlan10]vlan 20
[Huawei-vlan20]
Oct 14 2013 11:41:51-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 5, the
change loop count is 0, and the maximum number of records is 4095.
LSW2:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
Oct 14 2013 11:43:10-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 4, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-vlan10]vlan 20
Oct 14 2013 11:43:20-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 5, the
change loop count is 0, and the maximum number of records is 4095.
二.划分VLAN
以下是详细步骤:
LSW1:
[Huawei]interface Eth0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]
Oct 14 2013 11:45:31-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 6, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]
Oct 14 2013 11:45:41-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 7, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]
Oct 14 2013 11:47:01-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 8, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]
Oct 14 2013 11:47:11-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 9, the
change loop count is 0, and the maximum number of records is 4095.
LSW2:
[Huawei]interface Eth0/0/1
[Huawei-Ethernet0/0/1]port link-type a
[Huawei-Ethernet0/0/1]port link-type access
Oct 14 2013 11:49:20-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 6, the
change loop count is 0, and the maximum number of records is 4095. de
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]
Oct 14 2013 11:49:30-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 7, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]
Oct 14 2013 11:50:50-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 8, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]
Oct 14 2013 11:51:00-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 9, the
change loop count is 0, and the maximum number of records is 4095.
三.检查VLAN是否划分正确,命令为display vlan
如图所示:
四.创建中继口
将交换机互联端口现改为访问端口再改为中继口
以下是详细步骤:
[Huawei-Ethernet0/0/4]port link-type trunk
[Huawei-Ethernet0/0/4]
Oct 14 2013 12:02:51-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 12, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/4]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/4]
Oct 14 2013 12:04:01-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 13, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei]interface Eth0/0/3
[Huawei-Ethernet0/0/3]port link-type trunk
[Huawei-Ethernet0/0/3]
Oct 14 2013 12:06:30-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 12, the
change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/3]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/3]
Oct 14 2013 12:06:50-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 13, the
change loop count is 0, and the maximum number of records is 4095.[Huawei]interface Eth0/0/4
检查一下
如图所示:
注意:别忘了将也改为中继口
五.创建子接口,划分子接口给VLAN并且配置网关及掩码
以下是详细步骤:
[Huawei]interface GigabitEthernet 0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 10
[Huawei-GigabitEthernet0/0/0.1]ip add 192.168.1.1 24
Oct 14 2013 09
[Huawei-GigabitEthernet0/0/0.1]:28:07-05:13 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0.1 has entered the UP state.
[Huawei-GigabitEthernet0/0/0.1]
[Huawei-GigabitEthernet0/0/0.1]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.2]ip add 192.168.2.1 24
[Huawei-Gi
Oct 14 2013 09:31:11-gabitEt05:13 Huawei %%01Ihernet0/0/0.2]FNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/0.2 has entered the UP state.
[Huawei-GigabitEthernet0/0/0.2]
六.开启MAC地址请求
[Huawei]interface g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.1]
[Huawei-GigabitEthernet0/0/0.1]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.2]
七.验证
就此完成