Next, the router can be configured to perform inter-VLAN routing.

Router interfaces are configured in a manner similar to configuring VLAN interfaces on switches. To configure a specific interface, change to interface configuration mode from global configuration mode.

As shown in Figure 1, each interface is configured with an IP address using the ip address ip_address subnet_mask command in interface configuration mode.

In the example, interface G0/0 is configured with IP address and subnet mask using the ip address command.

Router interfaces are disabled by default and must be enabled using the no shutdown command before they are used. After the no shutdown interface configuration mode command has been issued, a notification displays, indicating that the interface state has changed to up. This indicates that the interface is now enabled.

The process is repeated for all router interfaces. Each router interface must be assigned to a unique subnet for routing to occur. In this example, the other router interface, G0/1, has been configured to use IP address, which is on a different subnet than interface G0/0.

After the IP addresses are assigned to the physical interfaces and the interfaces are enabled, the router is capable of performing inter-VLAN routing.

Examine the routing table using the show ip route command.

In Figure 2, there are two routes visible in the routing table. One route is to the subnet, which is attached to the local interface G0/0. The other route is to the subnet, which is attached to the local interface G0/1. The router uses this routing table to determine where to send the traffic it receives. For example, if the router receives a packet on interface G0/0 destined for the subnet, the router would identify that it should send the packet out interface G0/1 to reach hosts on the subnet.

Notice the letter C to the left of each of the route entries for the VLANs. This letter indicates that the route is local for a connected interface, which is also identified in the route entry. Using the output in this example, if traffic was destined for the subnet, the router would forward the traffic out interface G0/1.