6.3 External Routers
6.3.1 Configuring external routers
On an external router, an interface can be logically divided into multiple, virtual subinterfaces. Subinterfaces provide a flexible solution for routing multiple data streams through a single physical interface. To accomplish this goal, you need to customize the subinterface to create the environment in which the subinterface is used. To define subinterfaces on a physical interface, perform the following tasks:
  • Identify the interface.
  • Define the VLAN encapsulation.
  • Assign an IP address to the interface.

To identify the interface, enter the following command in global configuration mode.

Router(config)#interface FastEthernet slot-number / port-number. subinterface-number

where slot-number/port-number.subinterface-number identifies the physical and logical interface.

To define the VLAN encapsulation, enter the following command in interface configuration mode.

Router(config-if)#encapsulation isl vlan-number

where vlan-number identifies the VLAN for which the subinterface will carry traffic. A VLAN ID is added to the frame only when the frame is destined for a nonlocal network. Each VLAN packet carries the VLAN ID within the packet header.

To assign the IP address to the interface, enter the following command in interface configuration mode.

Router(config-if)#ip address ip-address subnet-mask

Where ip-address and subnet-mask are the 32-bit network address and mask of the specific interface.

In the example, Route Processor has three subinterfaces configured on Fast Ethernet interface 0/0. These three interfaces are identified as 0/0.1, 0/0.10, and 0/0.20. All interfaces are encapsulated for ISL. Interface 0/0.1 is routing packets for VLAN 1, whereas interface 0/0.10 is routing packets for VLAN 10 and 0/0.20 is routing packets for VLAN 20.