Exam: Cisco 200-301 - Cisco Certified Network Associate (CCNA)
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:
Example Question
Q1. In which of the following ways does Router on stick inter-VLAN method configured?
Answer A
When Router on stick inter-VLAN method is configured, you can configure multiple VLANs on a single interface.
Related IT Guides
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 support@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:
This is a ONE TIME OFFER. You will never see this Again
Instant Discount
10% OFF
Enter Your Email Address to Receive Your 10% OFF Discount Code Plus... Our Exclusive Weekly Deals
Save 10%. Today on all IT exams. Instant Download
Use the following Discount Code during the checkout and get 10% discount on all your purchases:
SignUp10OFF
Start Shopping