Issue the show vlan brief command and verify that the VLANs are assigned to the correct interfaces.
S1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gig0/1
Gig0/2
10 Student active Fa0/6
20 Faculty active
99 Management active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
S1#
Issue the show ip interfaces brief command.
S1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
[ ... ]
Vlan1 unassigned YES manual administratively down down
Vlan99 192.168.1.11 YES manual up down
S1#
What is the status of VLAN 99? Why? The status of VLAN 99 is up/down, because it has not been assigned to an active port yet.
Use the Topology to assign VLANs to the appropriate ports on S2.
S1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/24, Gig0/1, Gig0/2
10 Student active Fa0/6, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/22, Fa0/23
20 Faculty active Fa0/11, Fa0/21
99 Management active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
S1#
Which VLAN is F0/24 is now associated with? VLAN 1, the default VLAN.
Step 6: Remove a VLAN ID from the VLAN database.
Add VLAN 30 to interface F0/24 without issuing the VLAN command.
S1(config)#interface fastEthernet 0/24
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 30
% Access VLAN does not exist. Creating vlan 30
S1(config-if)#
Note: Current switch technology no longer requires that the vlan command be issued to add a VLAN to the database. By assigning an unknown VLAN to a port, the VLAN adds to the VLAN database.
Verify that the new VLAN is displayed in the VLAN table.
S1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Gig0/1, Gig0/2
10 Student active Fa0/6, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/22, Fa0/23
20 Faculty active Fa0/11, Fa0/21
30 VLAN0030 active Fa0/24
99 Management active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
S1#
Use the no vlan 30 command to remove VLAN 30 from the VLAN database.
S1(config)#no vlan 30
Issue the show vlan brief command.
S1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Gig0/1, Gig0/2
10 Student active Fa0/6, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/22, Fa0/23
20 Faculty active Fa0/11, Fa0/21
99 Management active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
S1#
After deleting VLAN 30, what VLAN is port F0/24 assigned to? What happens to the traffic destined to the host attached to F0/24? Port F0/24 is not assigned to any VLAN. This port will not transfer any traffic.
Issue the no switchport access vlan command on interface F0/24.
Issue the show vlan brief command to determine the VLAN assignment for F0/24. To which VLAN is F0/24 assigned? VLAN 1
Note: Before removing a VLAN from the database, it is recommended that you reassign all the ports assigned to that VLAN.
Step 7: Configure an 802.1Q Trunk Between the Switches
Use DTP to initiate trunking on F0/1.
S1(config)#interface fastEthernet 0/1
S1(config-if)#switchport mode dynamic desirable
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
S1(config-if)#
Issue the show vlan brief command on S1 and S2. Interface F0/1 is no longer assigned to VLAN 1. Trunked interfaces are not listed in the VLAN table.
S1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/24, Gig0/1, Gig0/2
10 Student active Fa0/6, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/22, Fa0/23
20 Faculty active Fa0/11, Fa0/21
99 Management active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
S1#
Issue the show interfaces trunk command to view trunked interfaces. Notice that the mode on S1 is set to desirable, and the mode on S2 is set to auto.
S1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 desirable n-802.1q trunking 1
Port Vlans allowed on trunk
Fa0/1 1-1005
Port Vlans allowed and active in management domain
Fa0/1 1,10,20,99
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,10,20,99
S1#
Note: By default, all VLANs are allowed on a trunk. The switchport trunk command allows you to control what VLANs have access to the trunk. For this lab, keep the default settings which allows all VLANs to traverse F0/1.
Can S1 ping S2?
S1#ping 192.168.1.12
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.12, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms
S1#
Can PC-A ping PC-B?
PC>ping 192.168.10.4
Pinging 192.168.10.4 with 32 bytes of data:
Reply from 192.168.10.4: bytes=32 time=1ms TTL=128
Reply from 192.168.10.4: bytes=32 time=0ms TTL=128
Reply from 192.168.10.4: bytes=32 time=0ms TTL=128
Reply from 192.168.10.4: bytes=32 time=0ms TTL=128
Ping statistics for 192.168.10.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC>
Can PC-A ping PC-C?
PC>ping 192.168.20.3
Pinging 192.168.20.3 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.20.3:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>
Step 8: Manually configure trunk interface F0/1.
Change the switchport mode on interface F0/1 to force trunking. Make sure to do this on both switches.
Issue the show interfaces trunk command to view the trunk mode. Notice that the mode changed from desirable to on.
S1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/1 1-1005
Port Vlans allowed and active in management domain
Fa0/1 1,10,20,99
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,10,20,99
S1#
Why might you want to manually configure an interface to trunk mode instead of using DTP? Not all equipment uses DTP. Using the switchport mode trunk command ensures that the port will become a trunk no matter what type of equipment is connected to the other end of the link.
Step 9: Delete the VLAN Database
Determine if the VLAN database exists.Issue the show flash command to determine if a vlan.dat file exists in flash.
Issue the show flash command to verify that the vlan.dat file has been deleted.
S1#show flash:
Directory of flash:/
1 -rw- 4414921 <no date> c2960-lanbase-mz.122-25.FX.bin
64016384 bytes total (59601463 bytes free)
S1#
To initialize a switch back to its default settings, what other commands are needed? To get a switch back to its default settings, the erase startup-config and reload commands need to be issued after the delete vlan.dat command.
Keywords:
erase startup-config , yaser rahmati , یاسر رحمتی , delete vlan.dat , reload , show flash: , DTP , show interfaces trunk , trunk , switchport mode trunk , 802.1q , vlan , show vlan brief , ping , no switchport access vlan , show vlan brief , ipconfig /all , Assign VLANs , show ip interface brief