cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Join Customer Connection to register!
475
Views
5
Helpful
10
Replies
vLesio
Beginner

Access gateway from different vlans in one subnet

Hi,

I have created small network in Packet Tracer to study some things for exam, but I came accross a problem. 

I have 4 vlans (in the same subnet 10.0.1.0/24) and 2 computers connected to each vlan. Everything is connected to main switch with 3 trunk ports, one of them connected to router. 

Computers can ping to each other in different vlans, but none of them can communicate with router. All addresses are set, also default-gateway in switches. I tried changing switchport mode to acces, but then only one specific vlan can communicate with router. 

Is there any way to solve this problem?

1 ACCEPTED SOLUTION

Accepted Solutions

you are correct. Since there is only 1 subnet, your only option with this lab is to use an access port between switches and router. That way it doesn't matter which VLAN is sending the traffic to the router. 

View solution in original post

10 REPLIES 10
luis_cordova
VIP Advisor

Hi @vLesio 

 

Compress your exercise (winzip) and attach it to check.

 

Regards

Gucamole
Beginner

Alright, my first post in the forum :)

Couple of questions, why did you created 4 Vlans but just 1 subnet? Usually, you will have 1 subnet per VLAN. 

When you say "everything is connected to main switch with 3 trunk ports", are computers connected to the switch using trunk ports?

I am assuming the router interface is your computer default-gateway from scope 10.0.1.0/24?

I wanted to create more subnets, but there should be only one, only computer in different VLAN should communicate with each other and they all must communicate with router. Computers are connected to switches using access mode, and communication between them works fine. All computers have same default-gateway adres, which is router interface address in this subnet ;) 

I have been looking for like 7 hours now how to make this work but i found nothing, should I assume it's impossible?

paul driver
VIP Mentor

Hello

Can you post the PT file if possible.



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
vLesio
Beginner

PT file in attachment. I was trying something while waiting for answers, so router has only IP address configured. 

For some reason, ping command is not working for me, also I haven't used PT in a long time...

Below is my understanding

You have a trunk port between switches and switch to the router. When a packet comes to the first switch2 it will add an 802.1q tag for that VLAN and send it to switch0. Switch0 will look at the frame and see a VLAN tag and will forward it to the router via a trunk port. The router will look into the packet and sees it is tagged for a VLAN but cannot find it anywhere as the interface is not tagged with any dot1q VLAN. This is why I am thinking it's not working. I will try to replicate this on GNS3 as I am more familiar with that. 

ok..that's exactly why..replicated a similar lab in gns3 and did a packet capture. If you want to make this work, either you will have to create a Routing on a stick, or run multiple cables to switch with the access port. Below is the capture between the router and switch. 

capture.png

 

 

Ok, but none of this options will work because I use only one subnet. I tried making Routing on-a-stick but I'm not able to set the same IP address on several interfaces. 

To make this work, I would have to use more subnets so I can set different IP addresses on each subinterface, but then different vlans can communicate with each other.

Maybe it is just a mistake in exercise since no one can solve it in easy way :D

you are correct. Since there is only 1 subnet, your only option with this lab is to use an access port between switches and router. That way it doesn't matter which VLAN is sending the traffic to the router. 

View solution in original post

Vishnu Vardhan S
Beginner

Why we are using same subnet IP in different vlan. anybody please answer this question.

Please do not hesitate to click the STAR button if you are satisfied with my answer.