VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12 100 vlan0100 active
200 vlan0200 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
※インターフェースにVLANを割り当てます。 switch#conf t
Enter configuration commands, one per line. End with CNTL/Z
switch(config)#interface fastethernet 0/1
switch(config-if)#switchport access vlan 100
switch(config-if)#no shut
switch(config-if)#exit
switch(config)#int fa 0/2
switch(config-if)#switchport access vlan 100
switch(config-if)#no sh
switch(config-if)#no shutdown
switch(config-if)#exit
switch(config)#int fa 0/3
switch(config-if)#switchport access vlan 200
switch(config-if)#no sh
switch(config-if)#exit
switch(config)#int fa 0/4
switch(config-if)#switchport access vlan 200
switch(config-if)#no sh
switch(config-if)#exit
switch(config)#exit
※VLANが割り当てられていることを確認します。 switch#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
100 vlan0100 active Fa0/1, Fa0/2
200 vlan0200 active Fa0/3, Fa0/4
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
switch#
[ここからはエンドデバイス(PC)のコマンドプロンプトです]
※IPアドレス「192.168.0.1」のエンドデバイスからPINGを打ちます。
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-1999 Microsoft Corp.
C:\>ping 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.2 ;bytes=32 time=22ms TTL=254 ←疎通OK!
Reply from 192.168.0.2 ;bytes=32 time=22ms TTL=254
Reply from 192.168.0.2 ;bytes=32 time=22ms TTL=254
Reply from 192.168.0.2 ;bytes=32 time=22ms TTL=254
Ping Statistics for 192.168.0.2:
Packets Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 22ms, Maximum = 23ms, Average = 22ms
C:\>ping 192.168.0.3
Ping Statistics for 192.168.0.3:
Packets Sent = 4, Received = 0, Lost = 4 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>ping 192.168.0.4
Ping Statistics for 192.168.0.4:
Packets Sent = 4, Received = 0, Lost = 4 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>