H3CNE 08 VLAN ACCESS配置实例
<H3C>system-view [H3C]sysname sw1 方法一、在VLAN中划入相关端口 [sw1]vlan 10 //创建VLAN [sw1-vlan10]name caiwu //命名VLAN [sw1-vlan10]description caiwu //描述VLAN [sw1-vlan10]port GigabitEthernet 1/0/1 //加入端口 [sw1-vlan10]vlan 20 [sw1-vlan20]name shichang [sw1-vlan20]description shichang [sw1-vlan20]port GigabitEthernet 1/0/2 [sw1-vlan20]quit [sw1]interface vlan-interface 10 //创建VLAN接口 [sw1-Vlan-interface10]description caiwu gateway //描述接口名称 [sw1-Vlan-interface10]ip address 172.16.10.1 24 //配置地址 [sw1-Vlan-interface10]quit [sw1]interface vlan-interface 20 [sw1-Vlan-interface20]description shichang gateway [sw1-Vlan-interface20]ip address 172.16.20.1 24 [sw1-Vlan-interface20]quit [sw1]display vlan 10 //查看VLAN信息 [sw1]display interface vlan-interface 10 //查看VLAN接口信息 [sw1]display ip interface brief //查看IP接口摘要信息 [sw1]display ip routing-table //查看路由表 方法二、在端口中指定相关VLAN 类似于华为port link-type access 及portdefault vlan XX [sw1]interface GigabitEthernet 1/0/3 [sw1-GigabitEthernet1/0/3]port access vlan 10 //接口类型为访问 并且加入VLAN 此一条命令相当于合并了华为的两条命令。 |