Showing results for 
Search instead for 
Did you mean: 

I can not ping from one PC2 (vlan 10) to PC1 (vlan 20) with trunking (ROAS)

Level 1
Level 1

Good morning all,

I've been following a video series that teaches VLANs, trunking, and subinterfaces. However, no matter how much I try to follow along I am not able to replicate the results of the video series. I've tried at least 5 times. My problem starts when I try to configure the router with subnets (encapsulation dot1q, etc). I then create a trunking connection to the switch from the router. Yet, no success in being able to communicate between PC2 (VLAN 10) to PC1 (VLAN 20). Any suggestions?pinging from PC2 to PC1pinging from PC2 to PC1RouterRouterSwitch 1Switch 1Switch 2Switch 2

1 Accepted Solution

Accepted Solutions


Make sure a couple of things:-
1) Check the IP address on the PCs. For example, if you configure on PC2: IP address:, Subnet Mask: and Gateway:; and on PC1: IP address, Subnet Mask: and Gateway:, then you will need to correct the configuration on the Router as follows:

interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address

interface GigabitEthernet0/0.20
encapsulation dot1Q 20
ip address

2) To be sure, configure fa0/20 on Switch1 as follows:
int fa0/20
switchport access vlan 10
switchport mode access

P.S.:- By the way, thank you for the rating. However, You do not need to rate for all replies.


View solution in original post

18 Replies 18

Level 1
Level 1

Check if int gig 0/1 is administratively down. It has to be up for int gig 0/0.10 to be up.

Hey Paul!

Thanks for the reply. Yes, it is up. 

Router ip int brief (pane)Router ip int brief (pane)



Does each PC ping the IP adress of the router on their vlan ?

If not :

1) verify the netmask of the interface of each PC. You are sharing the same Class C subnet into two /25 subnets. It is a common issue to keep (/24) as netmask...

2) please verify that vlans 10 and 20 are correctly set up :

- sh vlan brie : to verify that both vlans 10 and 20 are present on each switch

- sh run int <name_if> : to verify the config of port switch of each PC and in front of the router


In front of the router, the swith port should look like :

int <name_if>

switchport mode trunk

no shut

! add this if you want to limit vlans

!  switchport trunk allowed vlan 10,20




Neither PC's will ping the Router.


2.) Switch 1 does not have vlan 20 on it because the switch port connecting to the next switch is trunked. Cisco Packet Tracer - C__Users_Robert Lexie_Desktop_Network Academy 1.1.pkt 8_7_2018 10_53_29 AM.png

I can't quite make out your diagrams, but have you added both vlans to all the switches in the path?

Trunk ports can only carry the VLANs that are actually on the switches. Even if you have set them up correctly on the router, you must then add them to all the switches with the following command example:


conf t

vlan 10



This will create the vlan on the switches, ready to be passed along trunk ports. If you have missed a switch and haven't added either of the VLANs, it's not going to work.


Hope that helps. Apologies if I have misunderstood.


M.S Rees1, you're good. I think I may have thought from earlier post that if the VLAN is connected to a port it won't work. However, I checked, and both VLAN's are on both switches. It's just that on one switch the VLAN isn't assigned to a port. 

See any issues with this?



Hi Leerical,


Let's backup a little bit and start from the basics:

VLANs -- are used to create different LANs. Devices on different VLANs are not able to communicate to each other unless you have a layer 3 device. One way of routing traffic between different VLANs is using ROAS as you configured here --> using subinterfaces. If there are switches, as in your case, you will need to have trunk ports to carry multiple VLANs (if you have more than one VLAN). Trunk ports are used to pass traffics from multiple VLANs as far as the VLANs are configured on the switches.


In your case, if you can not ping from PC2 on VLAN 10 to PC1 on VLAN 20, please follow the steps below:

1) Check whether vlan 20 is configured on Switch 2

2) check whether vlan 10 and vlan 20 is configured on Switch 1

3) check if the port between switch 1 and switch 2 is configured as trunk ports

4) check if the port between switch 1 and Router 2 is configured as trunk port on switch 1 side


If you have configured everything and it still not working, please share your configuration for switch 1, switch 2 and router 2.



P.S.:- Please do not forget to rate correct answers and resolve once you find the correct solution.





See any issues with this?