Saturday, 27 October 2012

MPLS Configuration Site

VLAN Configuration

VLAN Configuration

  • VLANs are broadcast domains defined within switches to allow control of broadcast, multicast, unicast, and unknown unicast within a Layer 2 device.
  • VLANs are defined on a switch in an internal database known as the VLAN Trunking Protocol (VTP) database. After a VLAN has been created, ports are assigned to the VLAN.
  • VLANs are assigned numbers for identification within and between switches. Cisco switches have two ranges of VLANs, the normal range and extended range.
  • VLANs have a variety of configurable parameters, including name, type, and state.
  • Several VLANs are reserved, and some can be used for internal purposes within the switch.

Creation of an Ethernet VLAN

VLANs are created on Layer 2 switches to control broadcasts and enforce the use of a Layer 3 device for communications. Each VLAN is created in the local switch's database for use. If a VLAN is not known to a switch, that switch cannot transfer traffic across any of its ports for that VLAN. VLANs are created by number, and there are two ranges of usable VLAN numbers (normal range 1–1000 and extended range 1025–4096). When a VLAN is created, you can also give it certain attributes such as a VLAN name, VLAN type, and its operational state. To create a VLAN, use the following steps.
  1. Configure VTP.
    VTP is a protocol used by Cisco switches to maintain a consistent database between switches for trunking purposes. VTP is not required to create VLANs; however, Cisco has set it up to act as a conduit for VLAN configuration between switches as a default to make administration of VLANs easier. Because of this, you must first either configure VTP with a domain name or disable VTP on the switch. VTP is explained in detail in section "6-4: VLAN Trunking Protocol."
    For Catalyst 4000 and 6000 switches running IOS Supervisor 12.1(8a) or above (native IOS), you can configure the VTP parameters in global configuration mode as well.
    • Specify a VTP name:
      set vtp domain domain-name
      (vlan) vtp domain domain-name
      (global) vtp domain domain-name

      By default, the VTP is in server mode and must be configured with a domain name before any VLANs can be created. These commands specify the VTP domain name. For IOS switches, you enter vlan database mode, (vlan), by entering the command vlan database, at the privileged-level prompt.
      The global configuration command vtp domain is not available on all switches that run IOS.
    • Disable VTP synchronization:
      set vtp mode transparent
      (vlan) vtp transparent
      (global) vtp mode transparent

      Another option is to disable VTP synchronization of the databases. Disabling it enables you to manage your local VTP database without configuring and relying on VTP. For Catalyst 4000 and 6000 switches running IOS Supervisor 12.1(8a) or above (native IOS), you can configure the VTP parameters in global configuration mode as well.
      The global configuration command vtp mode transparent is not available on all switches that run IOS.
    • Disable VTP:
      set vtp mode off

      With the introduction of COS version 7.1.1, an option now exists to disable VTP completely. Use the command set vtp mode off to turn off VTP. After doing so, you can administer the local VTP database.
  2. Create the VLAN.
    VLANs are created by number. The two ranges of VLANs are as follows:
    • The standard range consists of VLANs 1 to 1000.
    • The extended range consists of VLANs 1025 to 4096.
    Extended VLANs are currently supported only on switches running COS software version 6.1 or greater. When you create a VLAN, you have many options to consider. Many options are valid only for FDDI and Token Ring VLANs. Some of the items configured deal with options, such as private VLANs, which are discussed in other sections in this book. VLANs are created using the set vlancommand for COS devices or with the vlan command in vlan database mode for IOS switches. For Ethernet VLANs, you can also configure the standard parameters in Table 6-1.

    Table 6-1 Configurable VLAN Parameters

    A description of the VLAN up to 32 characters. If none is given, it defaults to VLAN00XXX, where xxx is the VLAN number.
    The maximum transmission unit (packet size, in bytes) that the VLAN can use; valid values are from 576 to18190. The MTU can extend up to 1500 for Ethernet, but beyond for Token Ring or FDDI. The default is1500.
    Used to specify whether the state of the VLAN is active or suspended. All ports in a suspended VLAN will be suspended and not allowed to forward traffic. The default state is active.

    Many other options are available during the VLAN configuration command; however, most of these deal with the configuration of FDDI and Token Ring VLANs. Because these are not widely used topologies, the options and descriptions of Token Ring and FDDI VLAN configuration and parameters have not been included in this book. For information on Token Ring or FDDI VLANs, refer to lan/cat5000/rel_6_3/config/vlans.htm.
    1. Create a VLAN in the standard range:
      set vlan vlan-id [name name] [state state] [mtumtu]
      (vlan) vlan vlan-id [name vlan-name] [state{suspend | active}] [mtu mtu-size]
      (global) vlan vlan-id
      (vlan-config) vlan vlan-id [mtu mtu-size] [namevlan-name] [state {suspend | active}]

      The vlan-id specifies the VLAN by number. For COS you can specify a range of VLANs in the vlan-id section; you cannot configure the name for a range of VLANs, however, because each VLAN is to have a unique name. For IOS switches, VLANs are created in vlan database mode. For Catalyst 6000 and 4000 switches running Supervisor IOS 12.1(8a) and above, you can create VLANs in global configuration mode if the switch is in VTP transparent mode. To do this, enter the vlan vlan-id command to move to vlan-config mode. From vlan-config mode, you can manage the parameters of the VLANs.
      You cannot modify any of the parameters for VLAN 1.
    2. Create a VLAN in the extended range.
      Extended VLANs support VLANs up to 4096 in accordance with the 802.1Q standard. Currently only switches running COS 6.1 or greater can support creation and assignment of VLANs in the extended range. You cannot currently use VTP to manage VLANs in the extended range, and these VLANs cannot be passed over an Inter-Switch Link (ISL) trunk link.
      1. Enable spanning-tree MAC reduction:
        set spantree macreduction enable

        To allow these switches to use the extended range, you must first enable spanningtree macreduction to allow the switch to support a large number of spanning-tree instances with a very limited number of MAC addresses and still maintain the IEEE 802.1D bridge ID requirement for each STP instance.
        After you have created a VLAN in the extended range, you cannot disable this feature unless you first delete the VLAN.
      2. Create a VLAN in the extended range:
        set vlan vlan-id [name name] [state state] [mtumtu]

        Here the vlan-id would be a number from 1025 to 4096. Numbers 1001 to 1024 are reserved by Cisco and cannot be configured.
        For Catalyst 6000 series switches with FlexWAN cards, the system identifies these ports internally with VLAN numbers starting with 1025. If you have any FlexWAN modules, be sure to reserve enough VLAN numbers (starting with VLAN 1025) for all the FlexWAN ports you want to install. You cannot use these extended VLANs if you install FlexWAN ports.

Feature Example

In this example, the switches Access_1 and Distribution_1 are going to be configured with VLANs 5, 8, and 10 with the names Cameron, Logan, and Katie, respectively. Also the distribution switch will be configured with VLAN 2112 with the name Rush.
An example of the Catalyst OS configuration for Distribution 1 follows:
Distribution_1 (enable)>set vtp mode transparent
Distribution_1 (enable)>set vlan 5 name Cameron
Distribution_1 (enable)>set vlan 8 name Logan
Distribution_1 (enable)>set vlan 10 name Katie
Distribution_1 (enable)>set spantree macreduction enable
Distribution_1 (enable)>set vlan 2112 name Rush
Distribution_1 (enable)>
An example of the Supervisor IOS configuration for Distribution 1 follows:
Distribution_1#vlan database
Distribution_1(vlan)#vtp transparent
Distribution_1#conf t
Distribution_1(config)#vlan 5 
Distribution_1(config-vlan)# name Cameron
Distribution_1(config-vlan)#vlan 8 
Distribution_1(config-vlan)# name Logan
Distribution_1(config-vlan)# vlan 10
Distribution_1(config-vlan)# name Katie
Distribution_1(config-vlan)# end
Distribution_1 #copy running-config startup-config
For the Supervisor IOS, extended VLANs such as 2112 are not supported.
An example of the Layer 2 IOS configuration for Access 1 follows:
Access_1#vlan database
Access_1 (vlan)#vtp transparent
Access_1 (vlan)#vlan 5 name Cameron
Access_1 (vlan)#vlan 8 name Logan
Access_1 (vlan)#vlan 10 name Katie
Access_1 (vlan)#exit
Access_1#copy running-config startup-config