Describing Routing Between VLANs
How to configure Inter-VLAN routing using an external router

A router interface providing inter-VLAN routing on trunk link must be configured with a subinterface for each VLAN that will be serviced across the link. Each of the subinterfaces on the physical link must then be configured with the same trunk encapsulation protocol. That protocol, either ISL or 802.1Q, is typically determined by what was configured on the switch side of the link.

Configuring an External Router using ISL Encapsulation
Use the encapsulation isl vlan_id subinterface configuration command to enable ISL trunking on a router subinterface.

NOTE:

The subnets of the VLANs are directly connected to the router. Routing between these subnets does not require a dynamic routing protocol. Routes to the subnets associated with each VLAN will appear in the routing table on directly connected interfaces.

Configuring an External Router using 802.1Q
Use the encapsulation dot1q subinterface configuration command to enable 802.1Q encapsulation on a router subinterface.

The use of the native keyword indicates that the un-tagged frames are associated with a particular subinterface. The configuration for the other individual VLAN subinterfaces is configured as it was with ISL. The subinterface number need not match the dot1q VLAN number.

Verifying the Inter-VLAN Routing Configuration Using Ping
After the router is properly configured and connected to the network, the router can communicate with other nodes on the network.

To test connectivity to remote hosts, use the ping command from privileged mode:

Router#pingdestination-ip-address
Step 1 From the router, attempt to ping a host address on each VLAN to verify router connectivity to each VLAN.
Step 2 From a host on a particular VLAN, attempt to ping a host on another VLAN to verify routing across the external router.

The ping command will return one of these responses:

  • Success rate is 100 percent or ip-address is alive – This response occurs in one to ten milliseconds, depending on network traffic and the number of Internet Control Message Protocol (ICMP) packets sent.
  • Destination does not respond – No answer message is returned if the host does not respond.
  • Unknown host – This response occurs if the targeted host cannot be resolved.
  • Destination unreachable – This response occurs if the default gateway cannot reach the specified network or is being blocked.
  • Network or host unreachable – This response occurs if the Time to Live (TTL) times out. The TTL default is 2 seconds.

Verifying the Inter-VLAN Routing Configuration
Use the show commands to display the current (running) configuration, IP routing information, and IP protocol information. This will verify if the routing table represents the subnets of all VLANs.

Example: Displaying Inter-VLAN Configuration Information

Router#show vlan

Example: Displaying Routing Table Information

Router#show ip route

Lab Activity

Lab Exercise: Inter-VLAN Routing with an External Router

The purpose of this lab is to configure an external router to route Inter-VLAN traffic.