CCNP Switch Lab 4-1 Inter-VLAN Routing with an External Router

CCNP Switch Lab 4-1 Inter-VLAN Routing with an External Router




  •  Configure inter-VLAN routing using an external router, also known as a router on a stick.



Inter-VLAN routing using an external router can be a cost-effective solution when it is necessary to segment a network into multiple broadcast domains. In this lab, you split an existing network into two separate VLANs on the access layer switches, and use an external router to route between the VLANs. An 802.1Q trunk connects the switch and the Fast Ethernet interface of the router for routing and management. Static routes are used between the gateway router and the ISP router. The switches are connected via an 802.1Q EtherChannel link.

Note: This lab uses Cisco 1841 routers with Cisco IOS Release 12.4(24)T1 and the Advanced IP Services image c1841 -advipservicesk9-mz.124-24.T1 .bin. The switches are Cisco WS-C2960-24TT-L with the Cisco IOS image c2960-lanbasek9 mz.122-46.SE.bin. You can use other routers (such as 2801 or 2811), switches (such as 2950), and Cisco IOS Software versions if they have comparable capabilities and features. Depending on the router or switch model and Cisco IOS Software version, the commands available and output produced might vary from what is shown in this lab.

Required Resources

  • 2 routers (Cisco 1841 with Cisco IOS Release 12.4(24)T1 Advanced IP Services or comparable)
  • 2 switches (Cisco 2960 with the Cisco IOS Release 12.2(46)SE C2960-LANBASEK9-M image or comparable)
  • Serial and Ethernet cables

Step 1: Prepare the switches and routers for the lab.

a. Cable the network as shown in the topology diagram. On each switch, erase the startup configuration, delete the vlan.dat file, and reload the switches. Refer to Lab 1 -1, “Clearing a Switch” and Lab 1 -2, “Clearing a Switch Connected to a Larger Network” to prepare the switches for this lab.

b. Erase the startup configuration and reload the routers.

Step 2: Configure the hosts.
Configure PC hosts A and B with the IP address, subnet mask (/24), and default gateway shown in the

Step 3: Configure the routers.

a. Configure the ISP router for communication with your gateway router. The static route used for the internal networks provides a path for the local network from the ISP. In addition, configure a loopback interface on the ISP router to simulate an external network.

b. Configure the Gateway router to communicate with the ISP router. Notice the use of a static default route. The default route tells the router to send any traffic with an unknown destination network to the ISP router.

c. Verify connectivity from the Gateway router using the ping command. Was this ping successful?
The ping will be successful if the serial connection is set up properly.

Step 4: Configure the switches.

a. Configure the switch hostnames and IP addresses on the management VLAN according to the diagram. By default, VLAN 1 is used as the management VLAN. Create a default gateway on both access layer switches using the ip default gateway ip_address command.
The following is a sample configuration for switch ALS1.

b. (Optional) Set an enable secret password and configure the vty lines for Telnet access to the switch.

c. By default, how many lines are available for Telnet on the access switches?
Sixteen lines are available by default.

Step 5: Confirm the VLANs.

a. Verify that the only existing VLANs are the built-in VLANs. Issue the show vlan command from privileged mode on both access layer switches.

Which VLAN is the default management VLAN for Ethernet? What types of traffic are carried on this VLAN?
The default management VLAN is VLAN 1. Management traffic usually includes traffic for managing the switches, including VTP frames. VLAN 1 is also the default native VLAN, so untagged frames are assigned to this VLAN by default on 802.1q trunk links.

Step 6: Configure trunk links and EtherChannel on switches.

a. Use the Fast Ethernet 0/11 and 0/12 ports of ALS1 and ALS2 to create an EtherChannel trunk between the switches.

b. Verify the EtherChannel configuration using the show etherchannel command.

Step 7: Configure VTP.

a. Set up the VTP domain for the access layer switches in global configuration mode. The default VTP mode is server for both switches. Configure ALS2 as a VTP client, and leave ALS1 as a server. Configure the VTP domain name and version on VTP server ALS1.

b. Use the show vtp status command to verify the ALS1 VTP configuration and that client ALS2 has learned the new VTP domain information from ALS1.

Step 8: Configure VLANs and switch access ports.

a. Configure the VLAN 100 named Payroll and VLAN 200 named Engineering on VTP server ALS1.

b. Use the show vlan brief command on ALS2 to verify that ALS2 has learned the new VLANs from ALS1.

c. Configure the switch access ports for the hosts according to the diagram. Statically set the switch port mode to access, and use Spanning Tree PortFast on the interfaces. Assign the host attached to ALS1 Fast Ethernet 0/6 to VLAN 100, and the host attached to ALS2 Fast Ethernet 0/6 to VLAN 200.

d. Use the show vlan brief command to verify that Fa0/6 is in VLAN 100 on ALS1 and in VLAN 200 on ALS2.

Step 9: Configure ALS1 trunking to the Gateway router.

Configure switch ALS1 interface Fast Ethernet 0/1 for trunking with the Gateway router Fast Ethernet interface, according to the topology diagram.

Note: Optionally, you can apply the spanning-tree portfast trunk command to interface Fa0/1 of switch ALS1. This allows the link to the router to rapidly transition to the forwarding state despite being a trunk.

Step 10: Configure the Gateway router Fast Ethernet interface for VLAN trunking.

The native VLAN cannot be configured on a subinterface for Cisco IOS releases earlier than 12.1(3)T. The native VLAN IP address must be configured on the physical interface. Other VLAN traffic is configured on subinterfaces. Cisco IOS release 12.1(3)T and later support native VLAN configuration on a subinterface with the encapsulation dot1q native command. If a subinterface is configured using the encapsulation dot1q native command, the configuration on the physical interface is ignored. This technique is used in the lab configuration.

a. Create a subinterface for each VLAN. Enable each subinterface with the proper trunking protocol, and configure it for a particular VLAN with the encapsulation command. Assign an IP address to each subinterface, which hosts on the VLAN can use as their default gateway.

The following is a sample configuration for the Fast Ethernet 0/0 interface.

Note: For enhanced switch security, it is considered best practice to use independent unused VLANs for native and management VLANs.

The following is a sample configuration for the VLAN 100 subinterface.

b. Use the show ip interface brief command to verify the interface configuration and status.

c. Use the show interfaces description command to verify the interface status and description assigned.

d. Use the show vlans command on the Gateway router.

e. Use the show cdp neighbor detail command on the Gateway router to verify that ALS1 is a neighbor. Telnet to the IP address given in the CDP information.

Yes, because the subnet given by CDP was a directly connected subnet to the router

Step 11: Verify inter-VLAN routing on the Gateway router and the host devices.
a. Ping to the ISP loopback interface from either host. Was this ping successful?
Yes, if the hosts are set up with the correct IP addresses and default gateways. This is because the static routes on Gateway and ISP make it possible for pings to make it to ISP and then back to the hosts.

b. Ping from Host A to Host B. Was this ping successful?
Yes, if the hosts are set up with the correct IP addresses and default gateways, because Gateway routes between the VLANs

c. Telnet to the ALS2 VLAN 1 management IP address from the Engineering host. Was this Telnet successful?
Yes, if the hosts are set up with the correct IP addresses and default gateways, because Gateway routes between the VLANs. If any of the tests failed, make the necessary corrections to the configurations for the router and switches.

Router Interface Summary Table

Router Interface Summary

Router Model Ethernet Interface
Ethernet Interface
Serial Interface
Serial Interface
1700 Fast Ethernet 0
Fast Ethernet 1
Serial 0 (S0) Serial 1 (S1)
1800 Fast Ethernet 0/0
Fast Ethernet 0/1
Serial 0/0/0
Serial 0/0/1
2600 Fast Ethernet 0/0
Fast Ethernet 0/1
Serial 0/0 (S0/0) Serial 0/1 (S0/1)
2800 Fast Ethernet 0/0
Fast Ethernet 0/1
Serial 0/0/0
Serial 0/0/1
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many interfaces the router has. Rather than list all combinations of configurations for each router class, this table includes identifiers for the possible combinations of Ethernet and serial interfaces in the device. The table does not include any other type of interface, even though a specific router might contain one. For example, for an ISDN BRI interface, the string in parenthesis is the legal abbreviation that can be used in Cisco IOS commands to represent the interface.

Router ISP
Device Configurations (Instructor version)

Router Gateway

Note: VLAN and VTP commands do not display in the running configuration when the switch is in client or server mode. It is only displayed in transparent mode.

Switch ALS1

Switch ALS2

More Resources

About the author


Leave a Comment