VLAN, VLAN Trunk, VTP, and STP are very important in switch configuration. As a CCNA test for primary authentication, they also put forward basic requirements for their configuration. The experiment in this section describes the basic operations related to these configurations.
1. Tutorial Purpose
Through this experiment, you can master the following skills:
Configure VLAN;
Use VLAN Trunk to configure cross-switch VLANs;
Configure VTP;
Configure STP;
View information about the above configuration items.
2. device requirements
This experiment requires the following devices:
Two Cisco Catalyst 1900 series switches, with unlimited models and Enterprise Edition Software, are used in this experiment;
One cable in the crossover line sequence;
One Terminal Server, such as the Cisco 2509 router, and the corresponding cable used for reverse Telnet;
One PC with a Super Terminal Program, as well as the Internet Explorer cable and adapter.
3. cable connection and configuration instructions
As shown in Figure 3-3, use a crossover network cable to connect the Fast Ethernet0/26 port of the SW1 switch to the Fast Ethernet0/26 port of the SW2 switch.
In the figure, the router used as the terminal server and the PC used as the Super Terminal are omitted.
4. Experiment configuration and monitoring results
After the cable connection is complete. Power up all devices and start the experiment.
The operations of this experiment are recorded in monitoring list 3-3.
Section 1st: Configure VTP on SW1 and SW2
SW1912 # conft
Enter configuration commands, one per line. End with CNTL/Z
SW1912 (config) # hostn SW1
SW1 (config) # vtp?
ClientVTP client
DomainSet VTP domanin name
Passowrd Set VTP password
Pruning VTP pruning
ServerVTP server
Transparent VTP transparent
Trap VTP trap
SW1 (config-if) # tnmk on
SW1 (config-if )#
(Ctrl + Shift + 6, x)
Term_Server> 2
[Resuming connection 2 to switch2. ..]
> En
# Conft
Enter configuration commands, one per line, End with CNTL/Z
(Config) # hostn SW2
SW2 (config) # vtp domain cisco
SW2 (config) # vtp client
SW2 (config )#
Section 2nd: Configure VLAN Trunk
(Ctrl + Shift + 6, x)
Term_Server> 2
[Resuming connection 2 to switch2. ..]
SW1 (config) # int fa0/26
SW1 (config-if) # trunk?
AutoSet DISL state to AUTO
Desirable Set DISL state to DESIRABLE
Nonegotiate Set DISL state to NONEGOTIATE
Off Set DISL state to OFF
On Set DISL state to ON
SW1 (config-if) # trunk on
SW1 (config-if )#
(Ctrl + Shift + 6, x)
Term_Server> 2
[Resuming connection 2 to switch2. ..]
SW2 (config) # int fa0/26
SW2 (config-if) # trunk?
SW2 (config-if )#
SW2 # sh trunk
DISL state: On, Trunking: on, Encapsulation type: ISL
SW2 # sh trunk B
DISL state: Off, Trunking: Off, Encapsulation type: Unknown
SW2 # sh trunk a allowed-vlans
1-1005
Section 3rd: Configure VLAN and view VTP Information
Term_Server> 1
[Resuming connection 1to switch1. ..]
SW1 (config) # vlan 10 name DEPT1
SW1 (config) # vlan 11 name DEPT2
SW1 (config) # vlan 12 name DEPT3
SW1 (config) # vlan 13 name DEPT4
SW1 (config )#
SW1 # sh vlan
VLAN NameStatusPorts
-------------------------------------
1 default Enabled 1-12, AUI, A, B
10 DEPT1Enabled
11 DEPT2Enabled
12 DEPT3Enabled
13 DEPT4Enabled
1002 fddi-default suincluded
1003 fddi-default suincluded
1004 fddi-default suincluded
1005 fddi-default suincluded
-----------------------------
VLAN TypeSAID MTUParent RingNo BridgeNo Stp Trans1 Trans2
---------------------------------------------------------------------
1 Ethernet100001 1500 000 Unkn 10021003
10Ethernet100010 1500 011 Unkn 00
11Ethernet100011 1500 011 Unkn 00
12Ethernet100012 1500 011 Unkn 00
13Ethernet100013 1500 011 Unkn 00
1002 FDDI 101002 15000 00Unkn11003
1003 Token-Ring101003 15001005 10Unkn11002
1004 FDDI-Net 101004 15000 01IEEE0 0
1005 Token-Ring-Net 101005 1500 0 01IEEE0 0
---------------------------------------------------------------------
SW1 #
Term_Server> 2
[Resuming connection 2 to switch2. ..]
SW2 # sh vlan
VLAN Name StatusPorts
------------------------------------------
1 defaultEnabled1-12, AUI, A, B
10DEPT1 Enabled
11DEPT2 Enabled
12DEPT3 Enabled
13DEPT4 Enabled
1002 fddi-defaultSuspended
1003 token-ring-defausu0000ded
1004 fddinet-default suincluded
1005 fddi-defaultSuspended
... (Specific VLAN information, such as SW1, omitted)
SW2 # sh vtp
VTP version: 1
Configuration revision: 4
Maximum VLANs supported locally: 1005
Number of existing VLANs: 9
VTP domain name
VTP password
VTP operating mode: Client
VTP pruning mode: Disabled
VTP traps generation: Enabled
Configruration last modified by: 192.168.1.1 at 00-00-0000 00:00:00
SW2 #
(Section 4th: configure the VLAN attribution of the port and view VLAN Information)
Term_Server> 1
[Resuming connection 1 to switch 1...]
SW1 # conft
Enter configuration commands, one per line. End with CNTL/Z
SW1 (config) # inte0/1
SW1 (config-if) # vlan-membership?
Dynameic Set VLAN membership type as dynamic
Static Set VLAN membership type as static
SW1 (config-if) # vlan-membership static 10
SW1 (config-if) # int e0/2
SW1 (config-if) # vlan-membership static 11
SW1 (config-if) # int e0/3
SW1 (config-if) # vlan-membership static 12
SW1 (config-if) # int e0/10
SW1 (config-if) # vlan-membership static 10
SW1 (config-if )#
SW1 # sh vlan
VLAN NameStatus Ports
--------------------------
1 defaultEnabled4-9, 11-12, AUI, A, B
10 DEPT1 Enabled1, 10
11 DEPT2 Enabled2
12 DEPT3 Enabled3
13 DEPT4 Enabled
1002 fddi-default suincluded
1003 token-ring-defau Suspended
1004 fddinet-default suincluded
1005 trnet-default suincluded
-----------------------------
VLAN TypeSAIDMTUParent RingNoBridgeNoStp TranslTrans2
----------------------------------
1 Ethernet 100001 1500 000 Unkn 10021003
10 Ethernet 100010 1500 011 Unkn 00
11 Ethernet 100011 1500 011 Unkn 00
12 Ethernet 100012 1500 011 Unkn 00
13 Ethernet 100013 1500 011 Unkn 00
1002 FDDI101002 1500 00 Unkn 1 1003
1003 Token-Ring 101003 1500 10 Unkn 1 1002
1004 FDDI-Net101004 1500 01 IEEE 0 0
1005 Token-Ring-Net 101005 1500 01 IEEE 0 0
----------------------
SW1 # sh vlan 11
VLAN NameStatus Ports
-----------------
11DEPT2 Enabled 2
--------------
VLAN Type SAID MTUParent RingNo BridgeNo Stp Trans1 Trans2
------------
11 Ethernet 100011 1500 011Unkn0 0
-------------------
SW1 # sh vlan-membership
Port VLAN Membership Type
----------------------
110 Static
211 Static
312 Static
41 Static
51 Static
61 Static
71 Static
81 Static
91 Static
10 10 Static
111 Static
121 Static
AUI 1 Static
A1 Static
B1 Static
Section 5th: View STP Information
SW1 # sh spantree 10
VLAN1O is executing the IEEE compatible Spanning Tree Protocol
Bridge Identifier has priority 32768, address 0004. DD4E. 9C81
Configured hello time 2, max age 20, forward delay 15
Current root has priority
Root port is FastEthernet0/26, cost of root path is 10
Topology change flag not set, detected flag not set
Topology changes 1, last topology change occured 0d00h04ml0s ago
Times: hold 1, topology change 8960
Hello 2, max age 20, forward delay 15
Timers: hello 2, topology change 35, notification 2
Port Ethernet 0/1 of VLANIO is Forwarding
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0004.27C4.2401
Designated bridge has priority 32768, address 0004. DD4E. 9C81
Designated port is 1, path cost 10
Timers: message age 20, forward delay 15, hold 1
Port Ethernet 0/10 of VLANIO is Forwarding
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0004.27C4.2401
Designated bridge has priority 32768, address 0004. DD4E. 9C81
Designated port is 10, path cost 10
Timers: message age 20, forward delay 15, hold 1
Port FastEthernet 0/26 of VLANIO is Forwarding
Port path cost 10, Port priority 128
Designated root has priority 32768, address 0004.27C4.2401
Designated bridge has priority 32768, address 0004.27C4.2401
Designated port is 26, path cost 0
Timers: message age 20, forward delay 15, hold 1
SW1 #
SW1 # conft
Enter configuration commands, one per line. End with CNTL/Z
SW1 (config) # no spantree 10
SW1 (config )#
SW1 # sh spantree 10
Error> r:-STP is not enabled for VLAN 10
SW1 #
(1) Section 1st configures VTP.
In global configuration mode, use vtp? Command to view VTP configuration items. You can see that there are VTP domain names, VTP modes (server, client, and transparent), VTP passwords, VTP pruning, VTP traps, and so on, we are concerned with commands related to VTP domain names and modes.
(2) First, set the SW1 switch to The VTP Server mode, which is also the default mode. In Server mode, you can set other VTP attributes.
(3) The vtp domain command sets the VTP domain name. "Cisco" is the domain name set in this experiment.
(4) On switch SW2. The default VTP mode is Server. First, set the VTP domain name to cisco, and then change the VTP mode. Clint. In this way. SW2 can get the VLAN settings from the SW1 switch.
(5) In section 2nd, "set VLAN Relay (trunk) mode for the FastEthernet0/26 ports of the two switches. What is the VLAN trunk mode, such as vlan trunk? The following five types of commands are listed.
Auto: Set the DISL (Dynamic ISL) status to automatic. When the port status of the connected device is on and desirable, the port becomes the trunk mode.
Desirable: When the DISL status is set to "desired" and the port status of the connected device is on, desiirable, or auto, both parties negotiate to become the trunk mode; if the port status of the connected device is off or noncgotiate, the connected link is in non-trunk mode.
Nonegotiate: Set the DISL status to non-negotiated. The port is permanently in master mode;
Off: sets the DISL status to disabled as the master mode;
On: Set the DISL status to master mode, and negotiate with the connected device to make the corresponding port of the connected device the master mode.
(6) on the Two vswitches, set the respective ports Fa0/26 to the trunk on mode.
(7) When checking the running status of VLAN Trunk, run the show trunk a and show trunk B commands. a represents port Fa0/26, and B Represents port Fa0/27.
As you can see, the Trunk on port a is in the on state, the encapsulation type is ISL, And the Trunk on port B is off, and the encapsulation type is unknown.
(8) The show Trunk a allowed-vlans command lists the VLAN numbers that trunk a can transmit. 1-indicates that data frames on all vlans can be transmitted on the Trunk link of the VLAN.
You can use the no trunk vlan-vlan_id command so that the trunk link does not transmit some VLAN data frames, vlan_id at the corresponding VLAN number.
(9) In section 3rd, we define four VLANs, which are:
VLAN 10 is named DEPT1;
VLAN 11 is named DEPT2;
VLAN 12 is named DEPT3;
VLAN 13 is named DEPT4.
(10) The show vlan command shows nine VLANs. In addition to the four defined VLAN numbers, five VLAN numbers are available, including 1, 1002, 1003, 1004, and 1 oo5. VLANl is the default VLAN. When no vswitch is configured, all ports are in VLAN 1. The other four VLANs are the VLANs used in the FDDI and ring networks, it is also given by default by the vswitch. Their statuses are all "Suspended" and are not actually used.
The show vlan command lists all ports of the current vswitch that belong to VLAN 1.
(11) Check the vlan information on the SW2 switch and find that the newly defined VLAN information in SW1 has passed the VTP
Publish the Protocol to sw2. The show vtp command displays detailed VTP information on sw2.
(12) Section 4th configures the VLAN defined by section 3rd to the corresponding port.
Use the static membership command to set the corresponding port to a static vlan.
Vlan-membership dynamic is a command for setting dynamic VLANs. This command is not an object observed by CCNA.
(13) The show vlan command indicates that the configuration in (12) has taken effect, and the corresponding port already belongs to the defined VLAN. Among them, the port numbers of ViAN 10 are 1 and l0, the port numbers of VLANH are 2, the port numbers of VLAN12 are 3, and the remaining ports are still VLAN 1.
(14) The show vlan 11 command lists detailed information about VLANn.
(15) The show vlan-membership command lists the VLAN numbers and VLAN types corresponding to each port in order of port numbers.
(16) Section 5th first demonstrates how to use the show spantree 10 (note that it is "spantree" instead of "spanningtree" command to view the execution result of the Spanning Tree information, indicating that for VLAN 10, the Root switch of the SW1 switch is the SW2 switch, and its MAC address is 0004.27C4.2401.
You can use the no spantree 10 command to disable the Spanning Tree Protocol on VLAN 10.
Run the show spantree 10 command again, and the switch replies "STP on VLAN 10 has been disabled ".