Configure and verify interVLAN routing (Router on a stick)

Exam: 200-120 - CCNA Cisco Certified Network Associate CCNA (803)

By default the devices on the same VLAN only can communicate with each other. To allow communication between different VLANs you can configure inter-VLAN routing between them. In a traditional inter-VLAN routing setup, each router interface is connected to a separate network through a switch port, which is also associated with a specific VLAN. The router accepts traffic on its interface from one VLAN through switch and routes the traffic to another VLAN.

The following figure explains the scenario. The Switch SW1 has two VLANs VLAN 10 and VLAN 20 configured on interfacesFa/08 and Fa0/11 respectively. The switch ports Fa0/4 and Fa0/3, which are also the part of VLANs 10 and 20 respectively, are configured to router interfaces. Also, PC 1 is configured on VLAN 10 and PC 2 is configured on VLAN 20.

In this setup, you are configuring each VLAN on a separate router interface. You can configure multiple VLANs on a single interface using Router on stick inter-VLAN mechanism.

"

To configure Router on stick inter-VLAN mechanism,you need to configure the router’s interfaces as trunk links. Let us create a Router on stick setup where a single router interface is configured as a trunk link. The router will accept the tagged VLAN traffic on its trunk interface and route traffic between different VLANs.

To do this, you need to configure IP addresses on the router interfaces, which would be used by computers on VLAN 10 and VLAN 20 to accessthe devices connected to each other. The router may use routing table to forward data to the correct device, if the destination address is on adifferent VLAN.

Let us configure the setup shown in the diagram given below. The Router R1 is connected to switch SW1 on trunk port F0/3. VLANs 10 and 20 have also been added to switch SW1. PC1 and PC2 are connected to VLAN 10 and VLAN 20 respectively.

Configure VLANs 10 and 20 on Sw1

SW1#config t

SW1(config)#vlan 10

SW1(config-vlan)#vlan 20

SW1(config-vlan)#exit

Set interface fa0/3 to trunk mode. Remember, you cannot use the switchport mode dynamic auto or switchport mode dynamic desirable modes to create trunk on the router because the routers do not support dynamic trunking protocol.

SW1(config)#interface fa0/3

SW1(config-if)#switchport mode trunk

SW1(config-if)#end SW1#

Configure PC1 and PC2 with IP addresses and the default gateways

PC1:
IP Address: 192.168.10.2
Subnet: 255.255.255.0
Default Gateway: 192.168.1.1

PC2:
IP Address: 192.168.11.2
Subnet: 255.255.255.0
Default Gateway: 192.168.2.1

At this stage if you try to check the connectivity between PC1 and PC2, the connectivity will fail because the router that would connect the two VLANs is not configured,

Configure router with IP addresses to perform the inter-VLAN routingso that the router can route frames between VLAN 10 and VLAN 20.

Use interface interface_id.Subinterface_id command to create sub interfaces.

R1#config t

R1(config)#interface fa0/0.10

Next, assign VLAN ID using the encapsulation dot1q vlan_id subinterface.

R1(config-subif)#encapsulation dot1q 10

You also need to configure the router with the default gateways that you have configured on the PC1 and PC2 and assign IP address to the sub interfaces if the router.

R1(config-subif)#ip address 192.168.1.1 255.255.255.0

R1(config-subif)#interface fa0/0.20

R1(config-subif)#encapsulation dot1q 20

R1(config-subif)#ip address 192.168.2.1 255.255.255.0

R1(config-subif)#interface fa0/0

R1(config-if)#no shut

R1(config-if)#end

Verify Inter-VLAN Routing Configuration

View the router configuration using the show running-config command in privileged EXEC mode to verify the router configuration.

Router#show running-config

Interface Subinterface Gateway IP Address/Mask VLAN ID Router Encapsulation

Fa0/0 fa0/0.10 192.168.1.1/24 VLAN 10 encapsulation dot1q 10

Fa0/0 fa0/0.20 192.168.2.1/24 VLAN 20 encapsulation dot1q 20

Ping PC2 from PC1 to check if both the PCs in different VLANs can connect to each other.

C:\>ping 192.168.10.2

Pinging 192.168.10.2 with 32 bytes of data:

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Ping statistics for 192.168.10.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>ping 192.168.10.2

Pinging 192.168.10.2 with 32 bytes of data:

Request timed out.

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Reply from 192.168.10.2: bytes=32 time<10ms TTL=255

Ping statistics for 192.168.10.2:

Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

Verifying the VLAN Configuration

Router>show vlan

Virtual LAN ID: 10 (Inter Switch Link Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.10

Protocols Configured: Address: Received: Transmitted:

IP 192.168.1.1 0 0

Virtual LAN ID: 20 (Inter Switch Link Encapsulation)

vLAN Trunk Interface: FastEthernet0/0.20

Protocols Configured: Address: Received: Transmitted:

IP 192.168.2.1 0 0

Troubleshooting Inter-VLAN Routing Configuration

If PC1 and PC2 are not able to connect each other and if you are not able to share resources of VLAN 20 from VLAN 10 and Vice versa. Then the possible causes may be:

  • The routerinterface on switch is not configured as a trunk and the port is left in the default VLAN mode. To resolve the problem, use the switchport mode trunk interface command on switch to enable the connectivity between the switch and router.
  • Make sure PCs are in correct VLANs and are configured with correct IP addresses and default gateway addresses
  • Ensure that the router is configured with the correct sub-interfaces that match the default gateway of the PCs

Example Question

Q1. In which of the following ways does Router on stick inter-VLAN method configured?

  1. You can configure multiple VLANs on a single interface using Router on stick inter-VLAN mechanism.
  2. In the router on stick inter-VLAN method, each router interface is connected to a separate network through a switch port, which is also associated with a specific VLAN.
  3. In the router on stick inter-VLAN method, a server is configured to perform the routing between the two VLANs
  4. None of the above.

Answer A

When Router on stick inter-VLAN method is configured, you can configure multiple VLANs on a single interface.

Related IT Guides

  1. Configure and verify ACLs in a network environment
  2. Configure and verify an ACLs to limit telnet and SSH access to the router
  3. Configure and verify DHCP (IOS Router)
  4. Configure and verify initial switch configuration including remote access management
  5. Configure and verify VLANs
  6. Describe the types, features, and applications of ACLs
  7. Identify and correct common network problems
  8. Select the appropriate media, cables, ports, and connectors to connect switches to other network devices and hosts
  9. Select the Components Required to Meet a Network Specification
  10. Verify network status and switch operation using basic utilities

Close 100% Pass Guarantee or Your Money Back

How to Claim the Refund / Exchange?

In case of failure your money is fully secure by BrainDumps Guarantee Policy. Before claiming the guarantee all downloaded products must be deleted and all copies of BrainDumps Products must be destroyed.


Under What Conditions I can Claim the Guarantee?

Full Refund is valid for any BrainDumps Testing Engine Purchase where user fails the corresponding exam within 30 days from the date of purchase of Exam. Product Exchange is valid for customers who claim guarantee within 90 days from date of purchase. Customer can contact BrainDumps to claim this guarantee and get full refund at billing@braindumps.com. Exam failures that occur before the purchasing date are not qualified for claiming guarantee. The refund request should be submitted within 7 days after exam failure.


The money-back-guarantee is not applicable on following cases:

  1. Failure within 7 days after the purchase date. BrainDumps highly recommends the candidates a study time of 7 days to prepare for the exam with BrainDumps study material, any failures cases within 7 days of purchase are rejected because in-sufficient study of BrainDumps materials.
  2. Wrong purchase. BrainDumps will not entertain any claims once the incorrect product is Downloaded and Installed.
  3. Free exam. (No matter failed or wrong choice)
  4. Expired order(s). (Out of 90 days from the purchase date)
  5. Retired exam. (For customers who use our current product to attend the exam which is already retired).
  6. Audio Exams, Hard Copies and Labs Preparations are not covered by Guarantee and no claim can be made against them.
  7. Products that are given for free.
  8. Different names. (Candidate's name is different from payer's name).
  9. The refund option is not valid for Bundles and guarantee can thus not be claimed on Bundle purchases.
  10. Guarantee Policy is not applicable to Admission Tests / Courses, CISSP, EMC, HP, Microsoft, PMI, SAP and SSCP exams as braindumps.com provides only the practice questions for these.
  11. Outdated Exam Products.
Close
Spring Sale! Get 20% Discount for All Exams!

This is a ONE TIME OFFER. You will never see this Again

Instant Discount
Braindumps Testing Engine

20% OFF

Enter Your Email Address to Receive Your 20% OFF Discount Code Plus... Our Exclusive Weekly Deals

A confirmation link will be sent to this email address to verify your login.


* We value your privacy. We will not rent or sell your email address.
Close
Your 20% Discount on Your Purchase

Save 20%. Today on all IT exams. Instant Download

Braindumps Testing Engine

Use the following Discount Code during the checkout and get 20% discount on all your purchases:

Apr17Promo20

Start Shopping