|
|
VLANs allow you to segment your network, limiting broadcast domains and organizing your network hierarchically.
To configure VLANs on the switch, perform these tasks:
Step 1 Configure VLAN Trunk Protocol---Create a VLAN Trunk Protocol (VTP) domain and set the VTP mode on the switch.
Step 2 Configure VLANs---Create VLANs in the VTP domain and assign switch ports to those VLANs.
VTP propagates information about the VLAN configuration throughout the switched network.
The switch can operate in any one of these three VTP modes:
When a switch is configured as a VTP server, you must define a VTP domain before you can create VLANs.
To configure a switch as a VTP server, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Assign a name to the VTP management domain. | set vtp domain name |
Step 2 Set the VTP mode. | set vtp mode server |
Step 3 Verify the VTP configuration. | show vtp domain |
This example shows how to configure a switch as a VTP server:
Console> (enable) set vtp domain BigCorp VTP domain BigCorp modified Console> (enable) set vtp mode server VTP domain BigCorp modified Console> (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password -------------------------------- ------------ ----------- ----------- ---------- BigCorp 1 2 server - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 5 1023 0 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 0.0.0.0 disabled disabled 2-1000 Console> (enable)
To configure a switch as a VTP client, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Assign a name to the VTP management domain. | set vtp domain name |
Step 2 Set the VTP mode. | set vtp mode client |
Step 3 Verify the VTP configuration. (It might take a few moments before a VTP client learns the VTP and VLAN configuration information from neighboring switches.) | show vtp domain |
This example shows how to configure a switch as a VTP client:
Console> (enable) set vtp domain BigCorp VTP domain BigCorp modified Console> (enable) set vtp mode client VTP domain BigCorp modified Console> (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password -------------------------------- ------------ ----------- ----------- ---------- BigCorp 1 2 client - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 5 1023 0 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 0.0.0.0 disabled disabled 2-1000 Console> (enable)
To configure a switch for VTP transparent mode, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Set the VTP mode. | |
Step 2 Verify the VTP configuration. | show vtp domain |
This example shows how to configure a switch as VTP transparent:
Console> (enable) set vtp mode transparent
VTP domain modified
Console> (enable) show vtp domain
Domain Name Domain Index VTP Version Local Mode Password
-------------------------------- ------------ ----------- ----------- ----------
1 2 Transparent -
Vlan-count Max-vlan-storage Config Revision Notifications
---------- ---------------- --------------- -------------
5 1023 0 disabled
Last Updater V2 Mode Pruning PruneEligible on Vlans
--------------- -------- -------- -------------------------
0.0.0.0 disabled disabled 2-1000
Console> (enable)
VTP clients and servers in the same domain update their VLAN configuration based on the advertised configuration. VTP transparent switches do not act on VTP updates; you must manually make changes to the VLAN configuration on such switches.
Typically, in an IP network, each VLAN is associated with a single IP subnetwork. That is, all of the hosts in a given VLAN belong to a single subnet, use the same subnet mask, and use one or more default gateways connected to that subnetwork. Remember that stations in different VLANs cannot communicate with one another without a router configured to route between the different VLANs.
The supervisor engine software supports many VLAN types, including Ethernet, Fiber Distributed Data Interface (FDDI), ATM, and Token Ring. This section describes only how to configure Ethernet VLANs. For information about configuring other types of VLANs, refer to the Software Configuration Guide for your switch.
To configure an Ethernet VLAN in a VTP domain, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Create a VLAN by assigning it a VLAN number and, if desired, a VLAN name. | set vlan vlan_num [name name] |
Step 2 Verify the VLAN configuration. | show vlan vlan_num |
This example shows how to create a VLAN and verify the VLAN configuration:
Console> (enable) set vlan 10 name Corporate Vlan 10 configuration successful Console> (enable) show vlan 10 VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- ------------------------ 10 Corporate active 103 VLAN Type SAID MTU Parent RingNo BrdgNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ ------ ---- -------- ------ ------ 10 enet 100010 1500 - - - - - 0 0 VLAN DynCreated ---- ---------- 10 static VLAN AREHops STEHops Backup CRF 1q VLAN ---- ------- ------- ---------- ------- Console> (enable)
After you create a VLAN, you can assign one or more switch ports to the VLAN. Devices connected to those ports will belong to that VLAN. Make sure the connected device is properly configured with an IP address, subnet mask, and default gateway in the subnet associated with the VLAN.
To add a switch port to a VLAN, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Add one or more switch ports to a VLAN. | set vlan vlan_num mod_num/port_num |
Step 2 Verify that the ports are properly assigned to the VLAN. | show vlan vlan_num |
Step 3 Check to which VLAN a particular port belongs. | show port [mod_num/port_num] |
This example shows how to assign ports to a VLAN and how to verify to which VLAN the ports belong:
Console> (enable) set vlan 10 3/1-2
VLAN 10 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
10 3/1-2
Console> (enable) show vlan 10
VLAN Name Status IfIndex Mod/Ports, Vlans
---- -------------------------------- --------- ------- ------------------------
10 Corporate active 103 3/1-2
<... output truncated ...>
Console> (enable) show port 3
Port Name Status Vlan Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
3/1 connected 10 normal full 1000 1000BaseSX
3/2 connected 10 normal full 1000 1000BaseSX
<... output truncated ...>
Console> (enable)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Oct 1 13:02:17 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.