You are on page 1of 18

Managing Cisco

Devices

Configuring VLANs

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-1


VTP Configuration Guidelines

 VTP domain name


 VTP mode (server/client/transparent)—VTP
server mode is the default
 VTP pruning
 VTP password

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-2


Creating a VTP Domain

wg_sw#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw(config)#vtp transparent
wg_sw(config)#vtp domain switchlab

wg_sw_2950#vlan database
wg_sw_2950(vlan)#vtp [ server | client | transparent ]
wg_sw_2950(vlan)#vtp domain domain-name
wg_sw_2950(vlan)#vtp password password
wg_sw_2950(vlan)#vtp pruning
wg_sw_2950(vlan)#snmp-server enable traps vtp
wg_sw_2950(vlan)#exit

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-3


Configuring 802.1Q Trunking

wg_sw_a(config-if)#switchport mode trunk

• Configures the port as a VLAN trunk

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-4


VLAN Configuration Guidelines

 Maximum number of VLANs is switch-dependent.


 Catalyst desktop switches support 64 VLANs with a separate spanning
tree per VLAN.
 VLAN1 is the factory default Ethernet VLAN.
 CDP and VTP advertisements are sent on VLAN1.
 The Catalyst switch IP address is in the management VLAN (VLAN1
by default).
 To add or delete VLANs, the switch must be in VTP server or
transparent mode.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-5


Adding a VLAN

wg_sw_2950#vlan database
wg_sw_2950(vlan)# vlan vlan# [name vlan-name]

wg_sw_2950#vlan database
wg_sw_ 2950(vlan)#vlan 9 name switchlab2
wg_sw_ 2950(vlan)#exit

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-6


Modifying a VLAN Name

wg_sw_a(config)#vlan vlan# name vlan-name

wg_sw_a#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#vlan 9 name switchlab90

wg_sw_a#show vlan 9

VLAN Name Status Ports


------------------------------------------------
9 switchlab90 Enabled
------------------------------------------------

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-7


Assigning Switch Ports to a VLAN

wg_sw_2950(config-if)#switchport access vlan vlan#

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-8


Verifying the VTP Configuration
for the Catalyst 2950

wg_sw_2950#show vtp status

wg_sw_2950#show vtp status


VTP Version : 2 <--- Indicates v2-capable
Configuration Revision : 4
Maximum VLANs supported locally : 68
Number of existing VLANs : 6
VTP Operating Mode : Server
VTP Domain Name : switchlab
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled <--- Indicates v2 disabled; v1 set
VTP Traps Generation : Disabled <--- Catalyst 2950 default
MD5 digest : 0x3D 0x02 0xD4 0x3A 0xC4 0x46 0xA1 0x03
Configuration last modified by 10.1.1.40 at 5-4-02 22:25:

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-9


Verifying a Trunk

wg_sw_2950#show interface interface switchport

wg_sw_2950#show interface fa0/2 switchport


Name: Fa0/2
Switchport: Enabled
Administrative mode: trunk
Operational Mode: trunk
. . .

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-10


Verifying a VLAN

Catalyst 2950

wg_sw_2950#show vlan [id vlan#]

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-11


Verifying VLAN Membership
on a Catalyst 2950
wg_sw_2950#show vlan brief

wg_sw_2950#show vlan brief


VLAN Name Status Ports
---- ------------------------ --------- -----------------------
1 default active Fa0/4, Fa0/5, Fa0/6, 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
5 VLAN5 active Fa0/3
9 VLAN9 active Fa0/22, Fa0/23
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-12


Verifying STP for a VLAN

wg_sw_2950#show spanning-tree vlan [vlan#]

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-13


Troubleshooting Switched LANs

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-14


Problem: One Device Cannot
Communicate with Another

 Make sure the IP address, subnet mask, and VLAN membership


of the switch interface is correct.
 If the host is in the same subnet as the switch interface, make sure
the switch interface and the switch port to which the host is
connected are assigned to the same VLAN.
 If the host is in a different subnet, make sure the default gateway
on the switch is configured with the address of a router in the
same subnet as the switch interface.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-15


Problem: One Device Cannot
Communicate with Another (Cont.)

 If the port is in listening or learning mode, wait until the port is in


forwarding mode and try to connect to the host again.
 Make sure the speed and duplex settings on the host and the
appropriate switch ports are correct.
 If the connected device is an end station, enable spanning-tree
PortFast, disable trunking, and disable chaneling on the port.
 Make sure the switch is learning the MAC address of
the host.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-16


Problem: A Device Cannot Establish a
Connection Across a Trunk Link

 Make sure the trunking mode configured on both ends of the link
is valid. The trunking mode should be on or desirable on one end
and on, desirable, or auto on the other end.
 Make sure the trunk encapsulation type configured on both ends
of the link is valid.
 On IEEE 802.1Q trunks, make sure the native VLAN is the same
on both ends of the trunk.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-17


Problem: VTP Not Updating
Configuration on Other Switches

 Make sure the switches are connected through trunk links. VTP
updates are exchanged only over trunk links.
 Make sure the VTP domain name is the same on the appropriate
switches. VTP updates are only exchanged between switches in
the same VTP domain.
 Check if the switch is in VTP transparent mode. Only switches in
VTP server or VTP client mode update their VLAN configuration
based on VTP updates from other switches.
 If you are using VTP passwords, you must configure the same
password on all switches in the VTP domain.

© 2007 Cisco Systems, Inc. All rights reserved. ICND1 v1.0—6-18

You might also like