二、具体实现
首先,将所有的PC配置在192.168.10.0/24这个网络,并测试连通性:
PC1----192.168.10.2
PC2----192.168.10.3
PC3----192.168.10.4
PC4----192.168.10.5
PC1----192.168.10.2
PC2----192.168.10.3
PC3----192.168.10.4
PC4----192.168.10.5
PC1àPC2
C:>ping 192.168.10.3
Pinging 192.168.10.3 with 32 bytes of data:
C:>ping 192.168.10.3
Pinging 192.168.10.3 with 32 bytes of data:
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Reply from 192.168.10.3: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.10.3: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
PC1àPC3
C:>ping 192.168.10.4
Pinging 192.168.10.4 with 32 bytes of data:
C:>ping 192.168.10.4
Pinging 192.168.10.4 with 32 bytes of data:
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Reply from 192.168.10.4: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.10.4: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
PC1àPC4
C:>ping 192.168.10.5
Pinging 192.168.10.5 with 32 bytes of data:
C:>ping 192.168.10.5
Pinging 192.168.10.5 with 32 bytes of data:
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Reply from 192.168.10.5: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.10.5: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
由此可见,网络连接正常。
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
由此可见,网络连接正常。
然后,在交换机上配置Vlan:
Switch>enable
Switch#vlan database
Switch(vlan)#vlan 2 name Vlan2
VLAN 2 added:
Name:Vlan2
Switch(vlan)#vlan 3 name Vlan3
VLAN 3 added:
Name:Vlan3
Switch(vlan)#exit
Switch>enable
Switch#vlan database
Switch(vlan)#vlan 2 name Vlan2
VLAN 2 added:
Name:Vlan2
Switch(vlan)#vlan 3 name Vlan3
VLAN 3 added:
Name:Vlan3
Switch(vlan)#exit