14976-50_interVLAN routing on router
14976-50_interVLAN routing on router
Good
Router Average
Fair
Poor
Yes
Introduction No
Before You Begin Just browsing
Conventions
Prerequisites Suggestions for
improvement:
Components Used
Important Notes
Configure
Network Diagram
Configurations
debug and show Commands (256 character limit)
Sample show Command Output
Catalyst 3500XL Switch Send
Cisco 2600 Router
Cisco Support Community - Featured Conversations
Related Information
Introduction
This document provides sample configurations on InterSwitch Link (ISL) and 802.1Q trunking between
a Catalyst 3512-XL switch and a Cisco 2600 router; the results of each command are displayed as they
are executed. Cisco 3600 and 4500/4700 series routers, or other members of the Cisco 2600 series
routers, with FastEthernet interfaces, and any Catalyst 2900XL, 3500XL, 2940, 2950 or 2970 can be
used in the scenarios presented in this document to obtain the same results.
Trunking is a way to carry traffic from several VLANs over a point-to-point link between the two
devices. Two ways in which Ethernet trunking can be implemented are:
ISL (Cisco proprietary protocol, and not supported by the 2940 or 2950 series switches)
We will create a trunk that will carry traffic from two VLANs (VLAN1 and VLAN2) across a single
link between a Catalyst 3500 and a Cisco 2600 router.
We are using the Cisco 2600 router to do the Inter-VLAN routing between VLAN1 and VLAN2.
Catalyst 2900XL/3500XL/2940/2950/2970 series switches are Layer 2 (L2) switches, and are not
capable of routing or communicating between the VLANs. For further details on Inter-VLAN routing,
refer to the Routing Between Virtual LANs Overview chapter of the Cisco IOS® Switching Services
Configuration Guide, Release 12.1.
To create the examples in this document, we used the following switches in a lab environment with
cleared configurations:
The configurations in this document were implemented in an isolated lab environment. Ensure that you
understand the potential impact of any configuration or command on your network before using it. The
configurations on all devices were cleared with the write erase command to ensure that they have a
default configuration.
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Prerequisites
Components Used
Important Notes
Catalyst 2940 and 2950 series switches only support 802.1q trunking, and do not support ISL trunking.
On a 4 MB DRAM Catalyst 2900XL switch, trunking is only supported with the following trunking-
capable modules:
WS-X2914-XL-V: 4-port 10/100 ISL/802.1Q switch module
Refer to Table 1 below for a current list of switch models that support trunking:
Table 1
Minimum
Minimum Current
Release
Release Release
Switch Required for
Required Required for
Models IEEE
for ISL Trunking
802.1Q
Trunking (ISL/802.1Q)
Trunking
WS-
11.2(8)SA4 11.2(8)SA5 11.2(8.6)SA6
C2916M-
(Enterprise (Enterprise (Original
XL (4-Meg
Edition) Edition) Edition)
Switch)
11.2(8)SA4 11.2(8)SA5
12.0(5)WC(1)
C2912-XL (Enterprise (Enterprise
or later
Edition) Edition)
11.2(8)SA4 11.2(8)SA5
12.0(5)WC(1)
C2924-XL (Enterprise (Enterprise
or later
Edition) Edition)
11.2(8)SA4 11.2(8)SA5
WS- 12.0(5)WC(1)
(Enterprise (Enterprise
C2924C-XL or later
Edition) Edition)
WS- 11.2(8)SA4 11.2(8)SA5
12.0(5)WC(1)
C2924M- (Enterprise (Enterprise
or later
XL Edition) Edition)
WS- 11.2(8)SA4 11.2(8)SA5
12.0(5)WC(1)
C2912MF- (Enterprise (Enterprise
or later
XL Edition) Edition)
WS-
12.0(5)WC(1)
C2924M- 12.0(5)XU 12.0(5)XU
or later
XL-DC
WS- 11.2(8)SA4 11.2(8)SA5
12.0(5)WC(1)
C3508G- (Enterprise (Enterprise
or later
XL Edition) Edition)
11.2(8)SA4 11.2(8)SA5
WS-C3512- 12.0(5)WC(1)
(Enterprise (Original
XL or later
Edition) Edition)
11.2(8)SA4 11.2(8)SA5
WS-C3524- 12.0(5)WC(1)
(Enterprise (Enterprise
XL or later
Edition) Edition)
12.0(5)XP 12.0(5)XP
WS-C3548- 12.0(5)WC(1)
(Enterprise (Enterprise
XL or later
Edition) Edition)
WS-C3524- 12.0(5)WC(1)
12.0(5)XU 12.0(5)XU
PWR-XL or later
12.1(13)AY or
WS-C2940- ISL Not later for 802.1Q.
12.1(13)AY
8TF Supported ISL is not
supported.
12.1(13)AY or
WS-C2940- ISL Not later for 802.1Q.
12.1(13)AY
8TT Supported ISL is not
supported.
12.0(5)WC(1)
WS-C2950- ISL Not 12.0(5)WC or later for
12 Supported (1) 802.1Q. ISL is
not supported.
12.0(5)WC(1)
WS-C2950- ISL Not 12.0(5)WC or later for
24 Supported (1) 802.1Q. ISL is
not supported.
12.0(5)WC(1)
WS- ISL Not 12.0(5)WC or later for
C2950C-24 Supported (1) 802.1Q. ISL is
not supported.
12.0(5)WC(1)
WS- ISL Not 12.0(5)WC or later for
C2950T-24 Supported (1) 802.1Q. ISL is
not supported.
12.0(5)WC(1)
WS-
ISL Not 12.0(5)WC or later for
C2950G-
Supported (1) 802.1Q. ISL is
12-EI
not supported.
12.0(5)WC(1)
WS-
ISL Not 12.0(5)WC or later for
C2950G-
Supported (1) 802.1Q. ISL is
24-EI
not supported.
WS- 12.0(5)WC(1)
C2950G- or later for
ISL Not 12.0(5)WC
48-EI 802.1Q. ISL is
Supported (1)
not supported.
12.0(5)WC(1)
WS-
ISL Not 12.0(5)WC or later for
C2950SX-
Supported (1) 802.1Q. ISL is
24
not supported.
12.0(5)WC(1)
WS-C2950- ISL Not 12.0(5)WC or later for
24-EI-DC Supported (1) 802.1Q. ISL is
not supported.
12.1(13)EA1 or
WS- ISL Not later for 802.1Q.
12.1(13)EA1
C2955T-12 Supported ISL is not
supported.
12.1(13)EA1 or
WS- ISL Not later for 802.1Q.
12.1(13)EA1
C2955S-12 Supported ISL is not
supported.
12.1(13)EA1 or
WS- ISL Not later for 802.1Q.
12.1(13)EA1
C2955C-12 Supported ISL is not
supported.
WS-
12.1(11)AX or
C2970G- 12.1(11)AX 12.1(11)AX
later
24T
WS-
12.1(14)EA1 or
C2970G- 12.1(14)EA1 12.1(14)EA1
later
24TS
Note: In the above table, only WS-C2916M-XL is a 4 MB DRAM switch. All the other switches listed
are 8 MB DRAM switches. To determine whether your switch has 4 MB or 8 MB of DRAM, enter the
user-level show version command. For more information, see the How to Determine the Amount of
Switch Memory Using the Command Line Interface section of Upgrading Software in Catalyst 2900-
XL/3500-XL Switches Using the Command Line Interface.
Note: In Catalyst 2900XL/3500XL/2940/2950/2970 switches, a VLAN interface, for example, int vlan
1, int vlan 2, int vlan x, can be created for each and every VLAN that is configured on the switch.
However, only one VLAN can be used at a time as a management VLAN. The IP address is assigned to
the VLAN interface of the management VLAN only. If the IP address is assigned to another VLAN
interface whose VLAN is not used as management VLAN, that interface will not come up. It is
preferred to create the VLAN interface only for the management VLAN.
For 802.1Q trunking, one VLAN is not tagged. This VLAN is called native VLAN. The native VLAN is
used for untagged traffic when the port is in 802.1Q trunking mode. While configuring 802.1Q trunking,
it is very important to keep in mind that the native VLAN must be configured the same on each side of
the trunk link. It is a common mistake not to match the native VLANs while configuring 802.1Q
trunking between the router and the switch. For details on native VLANs, refer to the IEEE 802.1Q
section of Bridging Between IEEE 802.1Q VLANs, in New Features in Release 12.1(3)T.
In this sample configuration, the native VLAN is VLAN1, by default, on both the Cisco 2621 router and
the Catalyst 3512XL switch. Depending on your network needs, you may have to use a native VLAN
other than the default VLAN, VLAN1. Commands have been mentioned in the Configurations section
of this document on how to change the native VLAN on the Cisco 2600 router and Catalyst 3500XL
switch.
Sample configurations presented in this document can be used on Cisco 2600/3600/4500/4700 series
routers with Fast Ethernet interfaces or Fast Ethernet network modules. Also, make sure that you are
using the Cisco IOS version that supports ISL/802.1Q VLAN trunking. For a complete list of Cisco
2600/3600/4500/4700 routers that support ISL/802.1Q VLAN trunking and the supported Cisco IOS
versions, refer to Table 2 below.
Table 2
Minimum
Minimum
Release
Release Minimum
Router Required for
Required Required Feature
Models IEEE
for ISL Set (ISL/802.1Q)
802.1Q
Trunking
Trunking
Cisco
11.3(3a)T 12.0(1)T IP PLUS / IP PLUS
2620
Cisco
11.3(3a)T 12.0(1)T IP PLUS / IP PLUS
2621
Cisco
12.1(3a)T 12.1(3a)T IP PLUS / IP PLUS
2620
Cisco
12.1(3a)T 12.1(3a)T IP PLUS / IP PLUS
2650
Cisco
11.3(1)T 12.0(1)T IP PLUS / IP PLUS
3620
Cisco
11.3(1)T 12.0(1)T IP PLUS / IP PLUS
3640
Cisco
12.0(5)T 12.0(5)T IP PLUS / IP PLUS
3661
Cisco
12.0(5)T 12.0(5)T IP PLUS / IP PLUS
3662
Cisco
11.3(1)T 12.0(1)T IP PLUS / IP PLUS
4500-M
Cisco
4700-M 11.3(1)T 12.0(1)T IP PLUS / IP PLUS
Note: Table 2 only lists the minimum or current maintenance/main releases that support this sample
configuration. Router models with certain network modules may have different minimum Cisco IOS
versions. For a complete list of minimum supported software for any router family, use the Software
Advisor ( registered customers only) .
Note: The minimum supported release may not necessarily be the recommended release. To determine
the best maintenance release for your Cisco product, search for bugs listed by product component in the
Bug Toolkit ( registered customers only) .
Note: Table 2 lists the minimum feature set required to do IP Inter-VLAN routing and trunking to
support this sample configuration. For a complete list of other feature sets supported in different Cisco
IOS versions and on different platforms, use the Download Software area.
Configure
In this section, you are presented with the information to configure the features described in this
document.
Note: To find additional information on the commands used in this document, use the Command
Lookup Tool ( registered customers only) .
Network Diagram
This document uses the network setup shown in the diagram below.
Configurations
Note: Router models with certain network modules may have different minimum Cisco IOS versions
that support ISL trunking.
Catalyst 3512-XL
802.1Q Configuration on the Router for Cisco IOS Versions Earlier than 12.1(3)T
Catalyst 3512-XL
Note: The following screen captures show the commands that were entered on the 3512XL switch. Com
the commands are added in blue italics to explain certain commands and steps.
!-- Set the IP address and default gateway for VLAN1 for management purposes.
3512xl#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
3512xl(config)#int vlan 1
3512xl(config-if)#ip address 10.10.10.2 255.255.255.0
3512xl(config-if)#exit
3512xl(config)#ip default-gateway 10.10.10.1
3512xl(config)#end
3512xl#vlan database
3512xl(vlan)#vtp transparent
Setting device to VTP TRANSPARENT mode.
3512xl(vlan)#vlan 2
VLAN 2 added:
Name: VLAN0002
3512xl(vlan)#exit
APPLY completed.
Exiting....
3512xl#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
3512xl(config)#int fastEthernet 0/1
3512xl(config-if)#switchport mode trunk
!-- or as dot1q:
3512xl(config-if)#switchport trunk encapsulation dot1q
!-- In case of 2940/2950 series switches, none of the above two commands are used,
!-- 2940/2950 series switches only support 802.1q encapsulation which is configured
!-- when trunking is enabled on the interface by using switchport mode trunk command
3512xl#write memory
Building configuration...
3512xl#
--------------------------------------------------------------------------------
3512xl#show running-config
Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 3512xl
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
switchport mode trunk
!
!
interface FastEthernet0/2
switchport access vlan 2
spanning-tree portfast
!
interface FastEthernet0/3
spanning-tree portfast
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface VLAN1
ip address 10.10.10.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
ip default-gateway 10.10.10.1
!
line con 0
transport input none
stopbits 1
line vty 0 4
password mysecret
login
line vty 5 15
login
!
end
2600 Router
Note: The following screen captures show the commands that were entered on the Cisco 2600
router. Comments between the commands are added in blue italics to explain certain commands
and steps.
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname c2600
c2600#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
c2600(config-subif)#encapsulation isl 1
!-- or as dot1q:
!-- In case of dot1q, you need to make sure that
!-- the native VLAN matches across the link.
!-- On 3512XL, by default, the native VLAN is 1.
!-- On the router, configure VLAN1 as the native VLAN.
c2600(config-subif)#encapsulation dot1Q 1 ?
native Make this is native vlan
<cr>
c2600(config-subif)#encapsulation dot1Q 1 native
!-- On the switch, if you have a native VLAN other than VLAN1,
!-- on the router, configure the same VLAN to be the native VLAN,
!-- by using the above command.
Note: The encapsulation dot1Q 1 native command was added in Cisco IOS version 12.1(3)T. If
you are using an earlier version of Cisco IOS, refer to the 802.1Q configuration for Cisco IOS
Versions Earlier than 12.1(3)T section of this document to configure 802.1Q trunking on the router.
c2600(config-subif)#encapsulation isl 2
!-- or as dot1q:
c2600(config-subif)#encapsulation dot1Q 2
c2600#write memory
Building configuration...
[OK]
c2600#
Note: In order to make this setup work, and to successfully ping between workstation1 and
workstation2, you need to make sure that the default gateways on the workstations are setup
properly. For workstation1, the default gateway should be 10.10.11.1 and for workstation2, the
default gateway should be 10.10.10.1. For details on how to set the default gateways on the
workstations, refer to their respective sections in this document.
Note: The following paragraph is only applicable, if you have configured 802.1Q trunking between
the router and the switch.
Note: If you have followed the configuration steps listed in the above sections, and are still not able
to ping across the VLANs (between workstation1 and workstation2), then there is a possibility that
you have come across Caveat CSCds42715, in which the 802.1Q native VLAN keyword does not
function properly when fast switching is enabled. The bug fix was integrated in the following code
versions: 12.2(0.5), 12.2(0.5)T, 12.1(5)DC, 12.1(5)YB, 12.2(0.18)S, 12.1(5)YD02, 12.2(2)B, 12.2
(15)ZN. You can check the status and a brief description of the bug by using the Bug Toolkit
( registered customers only) and entering the bug ID CSCds42715.
--------------------------------------------------------------------------------
c2600#show running-config
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname c2600
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation isl 1
ip address 10.10.10.1 255.255.255.0
no ip redirects
!
!
!
interface FastEthernet0/0.2
encapsulation isl 2
ip address 10.10.11.1 255.255.255.0
no ip redirects
!
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
!
line con 0
transport input none
line aux 0
line vty 0 4
password mysecret
login
!
no scheduler allocate
end
802.1Q Configuration on the Router for Cisco IOS Versions Earlier than 12.1(3)T
As described earlier in this document, while configuring 802.1Q trunking it is very important
to match the native VLAN across the link. In the Cisco IOS software versions earlier than
12.1(3)T, you cannot define the native VLAN explicitly, as the encapsulation dot1Q 1 native
command under the sub-interface is not available. In the earlier Cisco IOS versions, it is
important to configure the native VLAN-Interface not as a sub-interface, which is in our
example VLAN1. If configured wrong, the router would expect a tag dot1q frame on VLAN1
and the switch is not expecting a tag on VLAN1. As a result, no traffic will pass between
VLAN1 on the switch and the router. In these situations always put the configuration for the
native VLAN under the main interface and on the trunk create subinterface for all other
VLANS.
In the current lab setup, use the following steps to configure the Cisco 2600 router:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname c2600
c2600(config)#enable password mysecret
c2600(config)#line vty 0 4
c2600(config-line)#login;
c2600(config-line)#password mysecret
c2600(config-line)#exit
c2600(config)#no logging console
c2600(config)#^Z
c2600#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
!-- Note that the IP address for VLAN1 is configured on the main interface,
!-- and no encapsulation for VLAN1 will be done under the sub-interface.
Note: In order to make this setup work and to successfully ping between workstation1 and
workstation2, you need to make sure that the default gateways on the workstations are setup
properly. For workstation1, the default gateway should be 10.10.11.1, and for workstation2,
the default gateway should be 10.10.10.1. For details on how to set the default gateways on
the workstations, refer to thei respective sections in this document.
c2600#show running-config
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname c2600
!
no logging console
enable password mysecret
!
!
!
!
!
memory-size iomem 7
ip subnet-zero
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 10.10.10.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 10.10.11.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
line con 0
transport input none
line aux 0
line vty 0 4
password mysecret
login
!
no scheduler allocate
end
c2600#
Certain show commands are supported by the Output Interpreter Tool ( registered customers only) , which
allows you to view an analysis of show command output.
show vlan
show vlan
show interface
This command is used to check the administrative and operational status of the port. It is also used to
make sure that the native VLAN matches on both sides of the trunk. The native VLAN is used for
untagged traffic when the port is in 802.1Q trunking mode. Refer to Creating and Maintaining VLANs
on Catalyst 2900XL and 3500XL Switches for details on native VLANs.
Note: For 802.1Q trunking, the output of the above command changes as follows:
show vlan
This command is used to verify that the interfaces (ports) belong to the correct VLAN. In our example,
only interface Fa0/2 belongs to VLAN2. The rest are members of VLAN1.
3512xl#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6,
Fa0/7, Fa0/8, Fa0/9, Fa0/10,
Fa0/11, Fa0/12, Gi0/1, Gi0/2
2 VLAN0002 active Fa0/2
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
...(output suppressed)
This command is used to check the VLAN trunking protocol (VTP) configuration on the switch. In our
example, we have used transparent mode. The correct VTP mode depends on the topology of your
network. For details on VTP, refer to Creating and Maintaining VLANs on Catalyst 2900XL and
3500XL Switches.
show vlan
This command tells you what L2 or L3 information is configured for each VLAN.
c2600#show vlan
Note: For 802.1Q trunking, the output of the above command changes as follows:
c2600#show vlan
Note: For 802.1Q trunking, with Cisco IOS versions earlier then 12.1(3)T, the output of the command
changes as follows:
c2600#show vlan
Note: No IEEE 802.1Q encapsulation is displayed for VLAN1 on any of the sub-interfaces.
show interface
This command is used to check the administrative and operational status of the interface.
Note: For 802.1Q trunking, the output of the above command changes as follows:
ISL or 802.1q for inter VLAN routing ? fkseow 3 Replies 8 years, 4 days ago
two vlan in a switch not communicating karthikgopi 8 Replies 2 months, 2 weeks ago
Related Information
Configuring 802.1q Trunking Between a Catalyst 3550/3750 and Catalyst Switches
Creating and Maintaining VLANs on Catalyst 2900XL and 3500XL Switches
Creating and Maintaining VLANs on Catalyst 2950 Switches
Using PortFast and Other Commands to Fix Workstation Startup Connectivity Delays
Catalyst 2900XL/3500XL, Cisco IOS Desktop Switching Command Reference
Catalyst 2940 Switch Command Reference
Catalyst 2950 and Catalyst 2955 Switch Command Reference
Catalyst 2970 Switch Command Reference
XC: Cisco IOS Switching Services Configuration Guide
XR: Cisco IOS Switching Services Command Reference
Technical Support - Cisco Systems