background image
626
Appendix B
Configuring the Catalyst 1900 Switch
Each of the hosts in their VLAN must use the same subnet addressing.
To configure the router-on-a-stick for inter-VLAN routing, you need to
complete three steps:
1.
Enable ISL trunking on the switch port the router connects to.
2.
Enable ISL encapsulation on the router's subinterface.
3.
Assign an IP address to the subinterface and other logical addressing
if applicable (IPX, for example).
To create a subinterface from global configuration mode, choose the Fast
Ethernet interface, a period, and a number. You will now be in the (config-
subif)
prompt for the interface.
To configure ISL routing on a subinterface, use the encapsulation isl
vlan-number
command. You can then assign an IP address, IPX address,
AppleTalk address, etc., to the subinterface. This is a unique subnet, and all
the hosts on that VLAN should be in that same subnet. It is not required but
is highly recommended.
Here is how to configure the 2621 router to support ISL routing with our
four VLANs. First, I'll configure a subinterface with the same number as
the VLAN I want to route. This is locally significant only, which means it
doesn't matter at all what the subinterface numbers are on the network.
Notice that you need to set the encapsulation next, or you will receive an
error when trying to set the subinterface's IP address. VLAN 1 is in the
172.16.10.0 network. I need to assign the subinterface a valid host address
from within that subnet.
2621#config t
2621(config)#int f0/0.1
2621(config-subif)#encapsulation isl 1
2621(config-subif)#ip address 172.16.10.1 255.255.255.0
2621(config-subif)#int f0/0.2
2621(config-subif)#encapsulation isl 2
2621(config-subif)#ip address 172.16.20.1 255.255.255.0
2621(config-subif)#int f0/0.3
2621(config-subif)#encapsulation isl 3
2621(config-subif)#ip address 172.16.30.1 255.255.255.0
2621(config-subif)#int f0/0.4
2621(config-subif)#encapsulation isl 4
2621(config-subif)#ip address 172.16.40.1 255.255.255.0
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com