6.华为交换机知识【IP划分vlan】

任务:配置基于IP地址划分vlan

说明:1.IP划分vlan只能在hybrid端口上划分

          2.IP划分vlan仅对untagged报文生效

          3.接口默认没有开启IP划分vlan功能

          4.模拟实验中两台客户端先连接到一台交换机,这台交换机再连接到S5700上的0/0/1接口上

操作:1.进入系统视图                                system-view

          2.建立两个vlan                                 vlan batch 100 200

          3.进入vlan 100视图                           vlan 100

          4.设置IP子网vlan地址                        ip-subnet-vlan 1 ip 192.168.2.2 24

          5.进入vlan 200视图                           vlan 200

          6.设置另一IP子网vlan地址                 ip-subnet-vlan 1 ip 192.168.3.2 24

          7.进入接口视图                                interface giga 0/0/1

          8.设置接口为hybrid类型                    port link-type hybrid

          9.设置接口允许通过两个vlan报文       port hybird untagged vlan 100 200

          10.开启接口的ip子网划分vlan功能      ip-subnet-vlan enable

          11.退出接口                                     quit

          12.查看IP子网划分vlan信息               disp ip-subnet-vlan vlan all

 

在eNSP模拟器上的命令如下

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]vlan batch 100 200
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]vlan 100
[Huawei-vlan100]ip-subnet-vlan 1 ip 192.168.2.2 24
[Huawei-vlan100]quit
[Huawei]vlan 200
[Huawei-vlan200]ip-subnet-vlan 1 ip 192.168.3.2 24
[Huawei-vlan200]quit
[Huawei]interface giga 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type hybrid
[Huawei-GigabitEthernet0/0/1]port hybrid untagged vlan 100 200
[Huawei-GigabitEthernet0/0/1]ip-subnet-vlan enable
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]disp ip-subnet-vlan vlan all
 ----------------------------------------------------------------
 Vlan    Index   IpAddress           SubnetMask          Priority    
 ----------------------------------------------------------------
 100     1       192.168.2.2         255.255.255.0       0 
 200     1       192.168.3.2         255.255.255.0       0 
 ----------------------------------------------------------------
 ip-subnet-vlan count: 2     total count: 2 

你可能感兴趣的:(知识,6,华为交换机)