[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]


Configuring VLANs

A virtual LAN (VLAN) enables multiplexing multiple IP and PPPoE interfaces and MPLS interfaces over a single physical Ethernet port. This multiplexing is accomplished through VLAN subinterfaces. Ethernet interfaces support the 802.1q-1998 IEEE Standards for Local and Metropolitan Area Networks: Virtual Bridged Local Area Networks, which the router uses as its standardized format for frame tagging.

The Ethernet V2 frame format enables multiplexing of different protocols over a single physical link. IEEE 802.1q compatibility extends the frame format by adding a tag that contains a VLAN ID. This feature enables multiplexing of different channels (VLANs) over the physical link; each channel is able to multiplex different protocols.

This capability works very much like ATM encapsulation as described in RFC 2684—Multiprotocol Encapsulation over ATM Adaptation Layer 5 (September 1999). This encapsulation type enables multiplexing of multiple protocols over a single ATM virtual circuit (VC).

As shown in Figure 13, VLANs are similar to ATM VCs, with the VLAN ID serving the same function as the virtual path identifier (VPI) and virtual channel identifier (VCI) to multiplex the different channels over the physical link. The Ethernet protocol type serves the same function within a VLAN as the logical link control (LLC) subnetwork attachment point (SNAP) within a VC, to multiplex the different protocols over the channel.


Figure 13: Use of VLANs to Multiplex Different Protocols over a Single Physical Link

In a VLAN configuration, the router can send VLAN 0 tagged or untagged frames.

All VLAN subinterfaces use the MAC address of the Ethernet interface over which they are configured. However, some configurations, such as multiple IP over VLAN subinterfaces, require that you connect many VLAN subinterfaces to a single device. In these cases, the device uses the MAC address to identify and select the correct VLAN to use. When the MAC address is the same for all VLANs, uneven load balancing of traffic occurs. To ensure proper load balancing, you must assign unique MAC addresses to the individual VLAN subinterfaces that are connected to the device. Any ARP requests and responses generated for the IP address assigned to a VLAN subinterface use this MAC address.

You must assign the MAC address when you configure the VLAN ID. If you change the MAC address of the VLAN subinterface after you configure it, system errors can occur. To change the MAC address, you must first remove the VLAN subinterface and then reconfigure it.

For more information, see:

Creating a VLAN Major Interface

To use VLANs, you must first configure the Ethernet interface for VLAN encapsulation. This creates the VLAN major interface. For example:

  1. Specify a Fast Ethernet, Gigabit Ethernet, or 10-Gigabit Ethernet port.
  2. host1(config)#interface fastEthernet 4/0
    
    
    
  3. Specify VLAN as the encapsulation method.
  4. host1(config-if)#encapsulation vlan
    
    
    

The router creates the VLAN major interface.

You can now create multiple VLAN subinterfaces to carry higher-level protocols. For examples, see Common VLAN Configurations, next.

Common VLAN Configurations

Ethernet interfaces support IP, PPPoE, MPLS, or both IP and PPPoE on each VLAN. In addition to a VLAN major interface level, a VLAN subinterface level distinguishes the VLAN.

This section describes how to create the following common VLAN configurations, which you can configure on Fast Ethernet, Gigabit Ethernet, and 10-Gigabit Ethernet interfaces:

Configuring IP over VLAN

To configure IP over VLAN over an Ethernet interface:

  1. Specify a Fast Ethernet, Gigabit Ethernet, or 10-Gigabit Ethernet port.
  2. host1(config)#interface fastEthernet 4/0
    
    
    
  3. Specify VLAN as the encapsulation method.
  4. host1(config-if)#encapsulation vlan
    
    
    

The VLAN major interface is added.

  1. Create a VLAN subinterface by adding a subinterface number to the interface identification command.
  2. host1(config-if)#interface fastEthernet 4/0.3
    
    
    
  3. Do one of the following:
  1. Assign a VLAN ID for the subinterface.
  2. host1(config-if)#vlan id 201
    
    
    
  3. Assign a VLAN ID and the optional unique MAC address for the subinterface.
  4. host1(config-if)#vlan id 201 mac-address 0090.1a01.1234
    
    
    
  1. Assign an IP address and mask.
  2. host1(config-if)#ip address 192.6.129.5 255.255.255.0
    
    
    
  3. (Optional) Configure additional VLAN subinterfaces by completing Steps 3 through 5.

Figure 14 illustrates the IP/VLAN/Fast Ethernet stacking, showing two separate VLAN subinterfaces. Configure one VLAN subinterface entirely; then configure the next VLAN subinterface.


Figure 14: Example of IP/VLAN/Fast Ethernet Stacking Configuration Steps

Configuring PPPoE over VLAN

To configure PPPoE over VLAN over an Ethernet interface:

  1. Specify a Fast Ethernet, Gigabit Ethernet, or 10-Gigabit Ethernet port.
  2. host1(config)#interface fastEthernet 4/1
    
    
    
  3. Specify VLAN as the encapsulation method.
  4. host1(config-if)#encapsulation vlan
    
    
    

The VLAN major interface is added.

  1. Create a VLAN subinterface by adding a subinterface number to the interface identification command.
  2. host1(config-if)#interface fastEthernet 4/1.1
    
    
    
  3. Do one of the following:
  1. Specify PPPoE as the encapsulation method on the interface.
  2. host1(config-if)#pppoe
    
    
    
  3. Create a PPPoE subinterface.
  4. host1(config-if)#pppoe subinterface fastEthernet 4/1.1.1
    
    
    
  5. Specify PPP as the encapsulation method on the interface.
  6. host1(config-if)#encapsulation ppp
    
    
    
  7. Assign an IP address and mask.
  8. host1(config-if)#ip address 192.6.129.5 255.255.255.0
    
    
    
  9. (Optional) Configure additional VLAN subinterfaces by completing Steps 3 through 8.

Figure 15 illustrates the PPPoE/VLAN/Fast Ethernet stacking, showing two separate VLAN subinterfaces. One VLAN subinterface has two PPPoE subinterfaces, and one VLAN subinterface has one PPPoE subinterface.


Figure 15: Example of PPPoE/VLAN/Fast Ethernet Stacking Configuration Steps

Configuring MPLS over VLAN

To configure MPLS over VLAN over an Ethernet interface:

  1. Specify a Fast Ethernet, Gigabit Ethernet, or 10-Gigabit Ethernet port.
  2. host1(config)#interface fastEthernet 4/0
    
    
    
  3. Specify VLAN as the encapsulation method.
  4. host1(config-if)#encapsulation vlan
    
    
    

The VLAN major interface is added.

  1. Create a VLAN subinterface by adding a subinterface number to the interface identification command.
  2. host1(config-if)#interface fastEthernet 4/1.1
    
    
    
  3. Do one of the following:
  1. Enable MPLS on the interface.
  2. host1(config-if)#mpls
    
    
    

Figure 16 illustrates the MPLS/VLAN/Fast Ethernet stacking, showing one VLAN subinterface.


Figure 16: Example of MPLS/VLAN/Fast Ethernet Stacking Configuration Steps

Configuring IP over VLAN and PPPoE over VLAN

To configure IP over VLAN with PPPoE over the same VLAN over an Ethernet interface:

  1. Specify a Fast Ethernet, Gigabit Ethernet, or 10-Gigabit Ethernet port.
  2. host1(config)#interface fastEthernet 4/1
    
    
    
  3. Specify VLAN as the encapsulation method.
  4. host1(config-if)#encapsulation vlan
    
    
    

The VLAN major interface is added.

  1. Create a VLAN subinterface by adding a subinterface number to the interface identification command.
  2. host1(config-if)#interface fastEthernet 4/1.1
    
    
    
  3. Do one of the following:
  1. Create an IP interface on the same VLAN as the PPPoE interface.
  2. host1(config-if)#ip address 164.10.6.71 255.255.255.0
    
    
    
  3. Specify PPPoE as the encapsulation method on the interface.
  4. host1(config-if)#pppoe
    
    
    
  5. Create a PPPoE subinterface.
  6. host1(config-if)#pppoe subinterface fastEthernet 4/1.1.1
    
    
    
  7. Specify PPP as the encapsulation method on the interface.
  8. host1(config-if)#encapsulation ppp
    
    
    
  9. Assign an IP address and mask.
  10. host1(config-if)#ip address 192.6.129.5 255.255.255.0
    
    
    
  11. (Optional) Configure additional PPPoE subinterfaces by completing Steps 7 through 9 using unique numbering.

To configure additional IP interfaces over the VLAN major interface:

  1. Create a new VLAN subinterface by adding a unique subinterface number to the interface identification command.
  2. host1(config-if)#interface fastEthernet 4/1.2
    
    
    
  3. Assign a VLAN ID for the subinterface.
  4. host1(config-if)#vlan id 401
    
    
    
  5. Assign an IP address and mask.
  6. host1(config-if)#ip address 164.10.6.51 255.255.255.0
    
    
    

Figure 17 illustrates the configuration steps for two VLAN subinterfaces. In this example:


Figure 17: Example of PPPoE over VLAN with IP over VLAN Stacking Configuration Steps

encapsulation ppp

encapsulation vlan

ip address

pppoe

pppoe subinterface fastEthernet

pppoe subinterface gigabitEthernet

    pppoe subinterface tenGigabitEthernet

vlan description

vlan id


[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]