Configuring VLans.pdf

(304 KB) Pobierz
Microsoft Word - Configuring_VLans.doc
Configuring VLANs
This chapter provides information about configuring virtual LANs (VLANs). It includes
command-line interface (CLI) procedures for using commands that have been specifically
created or changed for the Catalyst 2950 switches. For complete syntax and usage
information for the commands used in this chapter, refer to the Catalyst 2950 Desktop
Switch Command Reference .
This chapter does not repeat the concepts and CLI procedures provided in the standard
Cisco IOS Release 12.1 documentation. For information about the standard IOS Release
12.1 commands, refer to the IOS documentation set available from the Cisco.com home
page at Service and Support > Technical Documents . On the Cisco Product
Documentation home page, select Release 12.1 from the Cisco IOS Software drop-down
list.
For information about configuring these settings from Cluster Management Suite (CMS),
refer to the online help.
Note Some features can be implemented only by using the CLI.
Overview
A VLAN is a switched network that is logically segmented by function, project team, or
application, without regard to the physical locations of the users. Any switch port can
belong to a VLAN, and unicast, broadcast, and multicast packets are forwarded and
flooded only to stations in the VLAN. Each VLAN is considered a logical network, and
packets destined for stations that do not belong to the VLAN must be forwarded through
a router or bridge as shown in Figure 8-1. VLANs are identified with a number from 1 to
1001.
Because a VLAN is considered a separate logical network, it contains its own bridge
Management Information Base (MIB) information and can support its own
implementation of the Spanning Tree Protocol (STP).
Figure 8-1 VLANs as Logically Defined Networks
51853527.003.png
Table 8-1 lists the number of supported VLANs on the switches.
Table 8-1 Maximum Number of Supported VLANs
Switch
Number of Supported VLANs Trunking Supported?
Catalyst 2950 switches 250
Yes
The Catalyst 2950 switches support IEEE 802.1Q trunking methods for transmitting
VLAN traffic over 100BASE-T and Gigabit Ethernet ports.
The GigaStack GBIC also supports both trunking methods. When you are configuring a
cascaded stack of Catalyst 3500 XL switches that use the GigaStack GBIC and want to
include more than one VLAN in the stack, be sure to configure all of the GigaStack
GBIC interfaces as trunk ports by using the switchport mode trunk interface
configuration command. For more information on these commands, refer to the
Catalyst 2950 Desktop Switch Command Reference .
Note The Catalyst 2950 switches do not support ISL trunking.
Trunking is not supported on all switches. For the list of products that support trunking,
refer to the release notes.
Management VLANs
Communication with the switch management interfaces is through the switch IP address.
The IP address is associated with the management VLAN, which by default is VLAN 1.
51853527.004.png 51853527.005.png
The management VLAN has these characteristics:
It is created from CMS or through the CLI on static-access and dynamic-access
and trunk ports. You cannot create or remove the management VLAN through
Simple Network Management Protocol (SNMP).
Only one management VLAN can be administratively active at a time.
With the exception of VLAN 1, the management VLAN can be deleted.
When created, the management VLAN is administratively down.
Before changing the management VLAN on your switch network, make sure you follow
these guidelines:
The new management VLAN should not have an Hot Standby Router Protocol
(HSRP) standby group configured on it.
You must be able to move your network management station to a switch port
assigned to the same VLAN as the new management VLAN.
Connectivity through the network must exist from the network management
station to all switches involved in the management VLAN change.
Switches running a IOS software version that is earlier than Cisco IOS 12.0(5)XP
cannot have the management VLAN changed.
Switches running Cisco IOS 12.0(5)XP should be upgraded to the current
software release as described in the release notes.
If you are using SNMP or CMS to manage the switch, ensure that the port through which
you are connected to a switch is in the management VLAN.
Changing the Management VLAN for a New Switch
If you add a new switch to an existing cluster and the cluster is using a management
VLAN other than the default VLAN 1, the command switch automatically senses that the
new switch has a different management VLAN and has not been configured. The
command switch issues commands to change the management VLAN on the new switch
to match the used by the cluster. This automatic change occurs for new, out-of-box
switches that do not have a config.text file and for which there have been no changes to
the running configuration.
Before a new switch can be added to a cluster, it must be connected to a port that belongs
to the cluster management VLAN. If the cluster is configured with a management VLAN
other than the default, the command switch changes the management VLAN for new
switches when they are connected to the cluster. In this way, the new switch can
exchange Cisco Discovery Protocol (CDP) messages with the command switch and be
proposed as a cluster candidate.
Note For the command switch to change the management VLAN on a new switch,
there must have been no changes to the new switch configuration, and there must be
51853527.006.png
no config.text file.
Because the switch is new and unconfigured, its management VLAN is changed to the
cluster management VLAN when it is first added to the cluster. All ports that have an
active link at the time of this change become members of the new management VLAN.
Changing the Management VLAN Through a Telnet Connection
Before you start, review the "Management VLANs" section. Beginning in privileged
EXEC mode on the command switch, follow these steps to configure the management
VLAN interface through a Telnet connection:
Command
Purpose
Step 1 configure
terminal
Enter global configuration mode.
Step 2
cluster
management-vlan
vlanid
Change the management VLAN for the cluster. This ends
your Telnet session. Move the port through which you are
connected to the switch to a port in the new management
VLAN.
Step 3 show running-
config
Verify the change.
Assigning VLAN Port Membership Modes
You configure a port to belong to a VLAN by assigning a membership mode that
determines the kind of traffic the port carries and the number of VLANs it can belong to.
Table 8-2 lists the membership modes and characteristics.
Table 8-2 Port Membership Modes
Membership
Mode
VLAN Membership Characteristics
Static-access
A static-access port can belong to one VLAN and is manually assigned.
By default, all ports are static-access ports assigned to VLAN 1.
IEEE 802.1Q
A trunk is a member of all VLANs in the VLAN database by default,
but membership can be limited by configuring the allowed-VLAN list.
You can also modify the pruning-eligible list to block flooded traffic to
VLANs on trunk ports that are included in the list.
VLAN Trunking Protocol (VTP) maintains VLAN configuration
consistency by managing the addition, deletion, and renaming of
51853527.001.png
VLANs on a network-wide basis. VTP exchanges VLAN configuration
messages with other switches over trunk links.
Dynamic
access
A dynamic-access port can belong to one VLAN and is dynamically
assigned by a VLAN Membership Policy Server (VMPS). The VMPS
can be a Catalyst 5000 series switch but never a Catalyst 2950,
Catalyst 2900 XL, or Catalyst 3500 XL switch.
When a port belongs to a VLAN, the switch learns and manages the addresses associated
with the port on a per-VLAN basis.
VLAN Membership Combinations
You can configure your switch ports in the various VLAN membership combinations in
Table 8-3.
Table 8-3 VLAN Combinations
Port
Mode
VTP
Required?
Configuration
Procedure
Comments
Static-
access
ports
No
"Assigning Static-Access
Ports to a VLAN" section
If you do not want to use VTP
to globally propagate the
VLAN configuration
information, you can assign a
static-access port to a VLAN
and set the VTP mode to
transparent to disable VTP.
The switch automatically
transitions to VTP transparent
mode (VTP is disabled). No
VTP configuration is required.
"Configuring VTP Server
Mode" section
You can configure at least one
trunk port on the switch and
make sure that this trunk port is
connected to the trunk port of a
second switch.
Static-
access and
trunk ports
Adding, modifying, or
removing VLANs in the
database as described in
the "Configuring VLANs
in the VTP Database"
section
Recommended
Some restrictions apply to
trunk ports.
You can change the VTP
version on the switch and
"Assigning Static-Access
51853527.002.png
Zgłoś jeśli naruszono regulamin