Cisco 1700 Series Router Software Configuration Guide
Configuring Routing Among VLANs with IEEE 802.1Q Encapsulation

Table Of Contents

Configuring Routing Among VLANs with IEEE 802.1Q Encapsulation

IEEE 802.1Q Encapsulation Configuration Task List

Configuring IP Routing over IEEE 802.1Q

Enabling IP Routing

Defining the VLAN Encapsulation Format

Assigning an IP Address to a Network Interface

Configuring IPX Routing over IEEE 802.1Q

Enabling NetWare Routing

Defining the VLAN Encapsulation Format

Configuring NetWare on the Subinterface

Examples of IEEE 802.1Q Encapsulation Configuration

Configuring IP Routing over IEEE 802.1Q

Configuring IPX Routing over IEEE 802.1Q

VLAN Commands

clear vlan statistics

Syntax Description

Default

Command Mode

Example

debug vlan packets

Syntax Description

Command Mode

Usage Guidelines

Example

encapsulation dot1q

Syntax Description

Default

Command Mode

Usage Guidelines

Example

show vlans

Syntax Description

Command Mode

Example


Configuring Routing Among VLANs with IEEE 802.1Q Encapsulation


This chapter describes the required and optional tasks for configuring routing between virtual LANs (VLANs) with IEEE 802.1Q encapsulation. For complete descriptions of the VLAN commands used in this chapter, refer to the "Cisco IOS Switching Commands" chapter in the Cisco IOS Switching Services Command Reference. For descriptions of other commands that appear in this chapter, you can either use the command reference master index or search online.

The IEEE 802.1Q protocol is used to interconnect multiple switches and routers and to define VLAN topologies. IEEE 802.1Q support is available for Fast Ethernet interfaces.

This chapter contains the following sections:

IEEE 802.1Q Encapsulation Configuration Task List

Examples of IEEE 802.1Q Encapsulation Configuration

VLAN Commands

IEEE 802.1Q Encapsulation Configuration Task List

You can configure routing among any number of VLANs in your network. This section provides procedures for configuring protocols supported with IEEE 802.1Q encapsulation. The basic process is the same, regardless of the protocol. The process involves the following:

Enabling the protocol on the router

Enabling the protocol on the interface

Defining the encapsulation format as IEEE 802.1Q

Customizing the protocol to meet the requirements for your environment

The configuration processes documented in this chapter include the following:

Configuring IP Routing over IEEE 802.1Q

Configuring IPX Routing over IEEE 802.1Q

Configuring IP Routing over IEEE 802.1Q

IP routing over IEEE 802.1Q extends IP routing capabilities to include support for routing IP frame types in VLAN configurations, using the IEEE 802.1Q encapsulation.

To route IP over IEEE 802.1Q between VLANs, you need to customize the subinterface to create the environment in which it will be used. Perform these tasks in the order in which they appear:

Enabling IP Routing

Defining the VLAN Encapsulation Format

Assigning an IP Address to a Network Interface

Enabling IP Routing

IP routing is automatically enabled in the Cisco IOS software for routers. To reenable IP routing if it has been disabled, use the following command in global configuration mode:

ip routing

Once you have IP routing enabled on the router, you can customize the characteristics to suit your environment. If necessary, refer to the IP configuration chapters in the Cisco IOS IP and IP Routing Configuration Guide for guidelines on configuring IP.

Defining the VLAN Encapsulation Format

To define the encapsulation format as IEEE 802.1Q, use the following commands in interface configuration mode.

 
Command
Task

Step 1 

interface fastethernet 
slot/port.subinterface-number 1 

Specify the subinterface on which IEEE 802.1Q will be used.

Step 2 

encapsulation dot1q vlanid 

Define the encapsulation format as IEEE 802.1Q (dot1q) and specifies the VLAN identifier.

1 If the router supports only port numbers, and not slot numbers, the format for this command is
interface fastethernet port.subinterface-number

Assigning an IP Address to a Network Interface

An interface can have one primary IP address. To assign a primary IP address and a network mask to a network interface, use the following command in interface configuration mode.

Command
Task
ip address ip-address mask

Set a primary IP address for an interface.


A mask identifies the bits that denote the network number in an IP address. When you use a mask to subnet a network, that mask is referred to as a subnet mask.

Configuring IPX Routing over IEEE 802.1Q

Internet Packet Exchange (IPX) Routing over IEEE 802.1Q VLANs extends Novell NetWare routing capabilities to include support for routing Novell Ethernet 802.3 encapsulation frame types in VLAN configurations. Users with Novell NetWare environments can configure Novell Ethernet 802.3 encapsulation frames to be routed, using IEEE 802.1Q encapsulation across VLAN boundaries.

To configure Cisco IOS software on a router with connected VLANs to exchange IPX Novell Ethernet 802.3 encapsulated frames, perform these tasks in the order in which they are appear:

Enabling NetWare Routing

Defining the VLAN Encapsulation Format

Configuring NetWare on the Subinterface

Enabling NetWare Routing

To enable IPX routing on IEEE 802.1Q interfaces, use the following command in global configuration mode.

Command
Task
ipx routing [node]

Enable IPX routing globally.


Defining the VLAN Encapsulation Format

To define the encapsulation format as IEEE 802.1Q, use the following commands in interface configuration mode.

 
Command
Task

Step 1 

interface fastethernet 
slot/port.subinterface-number1 

Specify the subinterface on which IEEE 802.1Q will be used.

Step 2 

encapsulation dot1q vlan-identifier

Define the encapsulation format as IEEE 802.1Q and specify the VLAN identifier.

1 If the router supports only port numbers, and not slot numbers, the format for this command is
interface fastethernet port.subinterface-number

Configuring NetWare on the Subinterface

After you enable NetWare globally and define the VLAN encapsulation format, you may need to enable the subinterface by specifying the NetWare network number. Use this command in interface configuration mode.

Command
Task

ipx network network

Specify the IPX network number.


Examples of IEEE 802.1Q Encapsulation Configuration

This section provides configuration examples for each of the protocols described in this chapter:

Configuring IP Routing over IEEE 802.1Q

Configuring IPX Routing over IEEE 802.1Q

Configuring IP Routing over IEEE 802.1Q

This configuration example shows IP being routed on VLAN 101:

!
ip routing
!
interface fastethernet 0.101
  encapsulation dot1q 101
  ip addr 10.0.0.11 255.0.0.0
!

Configuring IPX Routing over IEEE 802.1Q

This configuration example shows IPX being routed on VLAN 102:

!
ipx routing
!
interface fastethernet 0.102
  encapsulation dot1q 102
  ipx network 100
!

VLAN Commands

This section provides an alphabetical listing of all the VLAN commands that are new or specific to the Cisco router. All other commands used with this feature are documented in the Cisco IOS Release 12.1T command reference documents.

clear vlan statistics

To remove virtual LAN statistics from any statically configured or system-configured entries, use the clear vlan statistics privileged EXEC command:

clear vlan statistics

Syntax Description

This command has no arguments or keywords.

Default

No default behavior or values.

Command Mode

Privileged EXEC.

Example

The following example clears VLAN statistics:

clear vlan statistics

debug vlan packets

Use the debug vlan packets privileged EXEC command to display general information on virtual LAN (VLAN) packets that the router has received but that it is not configured to support:

debug vlan packets

The no form of this command disables debugging output:

no debug vlan packets

Syntax Description

This command has no arguments or keywords.

Command Mode

Privileged EXEC.

Usage Guidelines

The debug vlan packets command displays only packets with a VLAN identifier that the router is not configured to support. This command allows you to identify other VLAN traffic on the network. Virtual LAN packets that the router is configured to route or switch are counted and indicated when you use the show vlans command.

Example

The following is sample output from the debug vlan packets output:

Router# debug vlan packets
Virtual LAN packet information debugging is on

encapsulation dot1q

To enable IEEE 802.1Q encapsulation of traffic on a specified subinterface in virtual LANs, use the encapsulation dot1q command in subinterface configuration mode.

The command is as follows:

encapsulation dot1q vlan-id

Syntax Description

vlan-id

Virtual LAN identifier. The allowed range is from 1 to 4095 (in hexadecimal, from 0x1 to 0xfff).


Default

Disabled.

Command Mode

Subinterface configuration.

Usage Guidelines

IEEE 802.1Q encapsulation is configurable on Fast Ethernet interfaces.

Example

The following example encapsulates VLAN traffic, using the IEEE 802.1Q protocol for VLAN 100:

interface fastethernet 0.100
  encapsulation dot1q 100

show vlans

To view VLAN subinterfaces, use the show vlans privileged EXEC command:

show vlans

Syntax Description

This command has no arguments or keywords.

Command Mode

Privileged EXEC.

Example

The following is sample output from the show vlans command:

Router# show vlans

Virtual LAN ID:	1 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface: FastEthernet0

This is configured as native Vlan for the following interface(s):
FastEthernet0

   Protocols Configured: Address: Received: Transmitted:
Virtual LAN ID:	100 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface: FastEthernet0.100

   Protocols Configured: Address: Received: Transmitted:
	      IP                100.0.0.2     10       10

Virtual LAN ID:2500 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface: FastEthernet0.200

   Protocols Configured: Address: Received: Transmitted:
	      IP                200.0.0.2      5         5

Table 4-1 describes the fields shown in the output.

Table 4-1 show vlans Field Descriptions  

Field
Description

Virtual LAN ID

Domain number of the VLAN

vLAN Trunk Interface

Subinterface that carries the VLAN traffic

Protocols Configured

Protocols configured on the VLAN

Address

Network address

Received

Packets received

Transmitted

Packets transmitted