<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]interface vlan-interface 2
[H3C-Vlan-interface2]ip address 192.168.0.1 24
[H3C-Vlan-interface2]quit
[H3C]vlan 2
[H3C-vlan2]port GigabitEthernet 3/1/1
如上所示,在交换机上看一个VLAN 2,然后为VLAN 2配置一个端口GigabitEthernet 3/1/1。
然后我们用一根网线将一台电脑连接上交换机的3/1/1口,并且配置电脑的:
- ip地址为:192.168.0.2
- 子网掩码为:255.255.255.0
然后在电脑上ping网关192.168.0.1,发现可以ping通。