III:在交换机上将相应vlan接口上应用vlan.
|
KC-S(config)#int f1/13 KC-S(config-if)#switchport access vlan 10 #将当前接口应用到vlan KC-S(config-if)#no sh KC-S(config-if)#exit KC-S(config)#int f1/14 KC-S(config-if)#switchport access vlan 10 KC-S(config-if)#exit KC-S(config)#int f1/15 KC-S(config-if)#switchport access vlan 20 KC-S(config-if)#exit KC-S#sh vlan-switch |
IV:PC-1不能ping通PC-2或PC-3,但PC-2和PC-3可以互通,可见vlan将主机阻隔
|
PC-1#ping 192.168.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: … Success rate is 0 percent (0/3) PC-2#ping 192.168.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/76/96 ms PC-2# PC-3#ping 192.168.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 48/70/88 ms |

