Cisco Netlab
VLAN, Trunk and 802.1q Router Configuration
Objectives
Initial Configuration
VLAN Trunking Configuration
802.1q Router/Switch trunking
Topology
You can click the Show Lab Content button to download the lab or you can download the l ab from
Learn@Stout in Content.
VLAN, Trunk and 802.1q Router Configuration
Step 1: Initial Switch Configuration
Configure hostnames on the switches
Configure enable secret, console and vty (Telnet) passwords as uwstout
Configure VLANs 10, 20 and 30 on StoutSW1 and StoutSW2
Configure the ports the PCs are connected to in the proper vlans Shutdown the fa0/4 interfaces on each switch
Configure an IEEE 802.1Q trunk between StoutSW1 and StoutSW2 using the fa0/1 interfaces
Configure the IP addresses and subnet masks on PC1a, PC1b and PC2 according to the topology
diagram
Verify your configuration before moving on to Step 2
If you need help remembering the commands for the initial configuration steps, try using ? or refer to the
previous labs.
Before moving to Step 2 verify your trunk and VLAN configuration, PC IP addresses and that the switchports
for the PCs are in the correct vlans. Use “show” commands and ipconfig to verify the initial configuration.
VLAN, Trunk and 802.1q Router Configuration Step 2: Configure 802.1 trunk between Menomonie and StoutSW1
Data from one vlan cannot cross into another vlan without the help of a router to route the data. Currently
the PCs cannot successfully send to each other because they are on different VLANs. In this step you will
configure a trunk between the Menomonie router and the StoutSW1 switch. (This type of configuration is
referred to as “Router-on-a-Stick”) so the router can be used to route traffic between the VLANs. The
physical interface on the router that is connected to StoutSW1 is fastethernet0/1 so you will configure the
trunked sub-interfaces on the fastethernet0/1 interface. Then configure fastethernet0/8 on StoutSW1 to trunk.
Configure the Router:
Configure the hostname on the router to Menomonie:
In global configuration mode type, hostname Menomonie
Configure the first sub-interface on Menomonie to route vlan 10
In global configuration mode type, interface fastethernet0/1.10
In interface configuration mode for fa0/1.10 type, encapsulation dot1q 10
Configure the second sub-interface on Menomonie to route vlan 20
In global configuration mode type, interface fastethernet0/1.20
In interface configuration mode for fa0/1.20 type, encapsulation dot1q 20
Configure the third sub-interface on Menomonie to route vlan 30
In global configuration mode type, interface fastethernet0/1.30
In interface configuration mode for fa0/1.30 type, encapsulation dot1q 30
Now that the virtual trunked interfaces have been configured you can assign an IP address to the
interfaces. The addresses for each interface will be as follows, with default subnet masks:
Fastethernet 0/1.10 : 192.168.10.1
Fastethernet 0/1.20 : 192.168.20.1
Fastethernet 0/1.30 : 192.168.30.1
In global configuration mode type, interface fa0/1.10
In interface configuration mode for fa0/1.10 type, ip address 192.168.10.1 255.255.255.0
In interface configuration mode for fa0/1.20 type, ip address 192.168.20.1 255.255.255.0
In interface configuration mode for fa0/1.10 type, ip address 192.168.30.1 255.255.255.0
Configure StoutSW1:
VLAN, Trunk and 802.1q Router Configuration The router is configured to trunk on the fastethernet0/1, now the StoutSW1 port it connects to needs to be
configured to trunk in order to complete the link. Configure fastethernet0/8 to trunk:
In interface configuration mode for fastethernet0/8 on StoutSW1 type, switchport mode trunk
Verify the trunk was created.
Step 3: Configure the Default Gateway on the PCs
In the initial configuration we are not using any routers to route traffic on the network. In that configuration
the PCs are unable to communicate with each other because they are in different VLANs and subnets. At
this point you have configured the router and switch so traffic can pass to the router to be routed to the
other VLANs. The router is the default gateway, it is what is being used when traffic needs to leave the
network from which it was sent. In this step you will configure the PCs to use the router’s sub-interface IP
address as its default gateway, then verify you have connectivity in the network.
Configure each PC with the proper default gateway.
PC1a default gateway 192.168.10.1
PC1b default gateway 192.168.20.1
PC2 default gateway 192.168.30.1
Verify network connectivity:
At this point your network is complete and you should be able to communicate/ping to all PCs.
In the command prompt of PC1a ping PC1b and PC2 IP address, the pings should be successful.
VLAN, Trunk and 802.1q Router Configuration
Verify the router is being used to forward traffic between the VLANs. You can use the tracert command on
the PCs to see the path the traffic is taking to get to its destination. Review the path traffic is taking to get
from PC1a to PC1b, notice the first hop is the router sub-interface and then it is forwarded to the PC.
In the command prompt of PC1a type, tracert 192.168.20.10
Step 4: Saving the Configuration file to NVRAM
Now you need to save your configuration from RAM to NVRAM using the command copy running-config
startup-config in Privileged Mode.
Now you need to save your configuration from RAM to NVRAM. The configuration in RAM is called the running -config, the configuration in NVRAM is called startup-config. In order to save our device configuration you need to copy from RAM to NVRAM. Use the command: copy running-config startup-config in Privileged Mode.
***Before completing a lab you must always issue this command on each network device (router or switch) you have
configured. When you do that it saves the configuration you did. When you issue the command once you have
completed the lab, that is the file I see as your final file submitted. This is the configuration I will grade you on. You ca n
issue the copy running-config startup-config command multiple times while doing your lab (which is a good idea in
case you lose your internet connection or power), just be sure to issue it one more time right before you have
completed the lab.