SW1:192.168.0.2
CLI session with the switch is open.
To end the CLI session, enter [Exit].
Switch>
%LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname
%Incomplete command.
Switch(config)#hostname Sw1
Sw1(config)#exit
Sw1#vlan database
Sw1(vlan)#vlan 2 name student
VLAN 2 added:
Name:student
Sw1(vlan)#vlan 3 name teacher
VLAN 3 added:
Name:teacher
Sw1(vlan)#exit
APPLY completed.
Exiting....
Sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw1(config)#int fastethernet 0/1
Sw1(config-if)#switchport access vlan 2
Sw1(config-if)#exit
Sw1(config)#int fastethernet 0/2
Sw1(config-if)#s
Sw1(config-if)#switchport access vlan 2
Sw1(config-if)#exit
Sw1(config)#int fastethernet 0/12
Sw1(config-if)#switchport access vlan 3
Sw1(config-if)#end
Sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw1(config)#int vlan 2
Sw1(config-if)#ip address 192.168.0.2 255.255.255.0
Sw1(config-if)#no shut
Sw1(config-if)#exit
Sw1(config)#interface fastethernet 0/12
Sw1(config-if)#switchport trunk encapsulation dot1q
Sw1(config-if)#switchport mode trunk
Sw1(config-if)#switchport access vlan 2
Sw1(config-if)#exit
Sw1(config)#int vlan 2
Sw1(config-if)#exit
Sw1(config)#end
Sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw1(config)#ip default-gateway 192.168.0.1
Sw1(config)#end
SW2:192.168.0.3
CLI session with the switch is open.
To end the CLI session, enter [Exit].
%LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#h
Switch(config)#hostname Sw2
Sw2(config)#exit
Sw2#vlan database
Sw2(vlan)#exit
APPLY completed.
Exiting....
Sw2#int
Sw2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw2(config)#int fastethernet 0/1
Sw2(config-if)#switchport access vlan 3
% Access VLAN does not exist. Creating vlan 3
Sw2(config-if)#exit
Sw2(config)#exit
Sw2#vlan database
Sw2(vlan)#vlan 3 name teacher
Sw2(vlan)#exit
APPLY completed.
Exiting....
Sw2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw2(config)#int fastethernet 0/1
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#exit
Sw2(config)#int fastethernet 0/2
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#exit
Sw2(config)#int fastethernet 0/12
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#end
Sw2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw2(config)#int vlan 2
Sw2(config-if)#exit
Sw2(config)#exit
Sw2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw2(config)#int vlan 3
Sw2(config-if)#ip address 192.168.0.3 255.255.255.
Sw2(config-if)#ip address 192.168.0.3 255.255.255.0
Sw2(config-if)#no shut
Sw2(config-if)#end
Sw2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw2(config)#ip default-gateway 192.168.0.1
Sw2(config)#end
Sw2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Sw2(config)#interface fastethernet 0/12
Sw2(config-if)#s
Sw2(config-if)#switchport trunk encapsulation dot1q
Sw2(config-if)#switchport mode trunk
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#end
Sw2#ping 192.168.0.1
% Unrecognized host or address, or protocol not running.
Sw2#ping 192.168.0.22
% Unrecognized host or address, or protocol not running.
Sw2#
pc1:192.168.0.11
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>winipcfg
C:>ping 192.168.0.22
Pinging 192.168.0.22 with 32 bytes of data:
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.0.22: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.0.33:
Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PC2:192.168.0.22
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>winipcfg
C:>winipcfg
C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.0.33:
Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PC:3192.168.0.33
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>winipcfg
C:>winipcfg
C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.0.33: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
C:>ping 192.168.0.44
Pinging 192.168.0.44 with 32 bytes of data:
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.0.44: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
PC4:192.168.0.44
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>winipcfg
C:>ping 192.168.0.22
Pinging 192.168.0.22 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.0.22:
Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.0.33: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
同一Vlan段之间能通信
可是我怎么弄都弄不了两个Vlan之间就是不能通信
真是郁闷啊