2-5 VLAN Interfaces


  • Virtual LANs (VLANs) on a router are treated as physically separate network interfaces even though they are logical interfaces.

  • Fast Ethernet and Gigabit Ethernet interfaces can be configured with trunking encapsulations that support VLANs.

  • Encapsulation types supported are ISL and IEEE 802.1Q.

  • ISL adds a 26-byte header containing the VLAN number to the beginning of frames and a 4-byte CRC to the end. IEEE 802.1Q adds a 4-byte tag within frames just after the source address field.

  • VLANs are configured as subinterfaces on a trunking major interface.

  • All VLANs receive a tag after encapsulation, except for the IEEE 802.1Q native VLAN, which leaves frames untagged.

  • Traffic must be routed or bridged in order to cross between VLANs.

Configuration

  1. Define a subinterface for a VLAN:

     (global)  interface fastethernet   mod/num   .   subinterface  

    -OR-

     (global)  interface gigabitethernet   mod/num/slot   .   subinterface  

    A subinterface must be created to support a specific VLAN. Subinterface numbers are arbitrary and can be given to match the VLAN number if desired.

  2. Configure a trunking encapsulation:

     (interface)  encapsulation  {  isl   dot1q  }  vlan  [  native  ] 

    The VLAN encapsulation can be either ISL ( isl ) or IEEE 802.1Q ( dot1q ). The subinterface is assigned the VLAN number, vlan. If dot1q is used, the subinterface VLAN can also be made the native VLAN with the native keyword. If the native VLAN is not specified, VLAN 1 is used. dot1q encapsulation sends data for the native VLAN without VLAN encapsulation.

  3. Assign network addresses or bridging parameters.

    NOTE

    When bridging is configured, each VLAN with an ISL trunk has its own Spanning-Tree Protocol (STP) running. This is called Per-VLAN Spanning Tree (PVST). An IEEE 802.1Q trunk can have only a single instance of STP. However, Cisco supports PVST+, which allows PVST by tunneling STP instances across the dot1q domain. See Section 4-1 for more information.

Example

A Gigabit Ethernet interface is used for trunking IEEE 802.1Q VLANs. Subinterface 17 is used for VLAN 17, and subinterface 26 is used for VLAN 26. (Note that the subinterface numbers can be arbitrarily chosen and don't have to match the VLAN number. For convenience, the numbers can match, as in the example.) Figure 2-2 shows a network diagram.

Figure 2-2. Network Diagram for the VLAN Interface Example

graphics/02fig02.gif

  interface gigabitethernet 9/0/0.17   description VLAN 17 to Accounting Dept   encapsulation dot1q 17 native   ip address 192.168.88.1 255.255.255.0   interface gigabitethernet 9/0/0.26   description VLAN 26 to Engineering Dept   encapsulation dot1q 26   ip address 192.168.100.1 255.255.255.0  


Cisco Field Manual[c] Router Configuration
Cisco Field Manual[c] Router Configuration
ISBN: 1587050242
EAN: N/A
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net