Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

vlan question, how vlan 1 can ping vlan 2?

Unanswered Question
Sep 11th, 2013
User Badges:

Hey guys, I have a question here:

As I learned, vlan=subnet=broadcast domain.

I will add a topology from packet tracer:


Lets say pc0 is, and its connected to port fa0/24 to switch 0.

now, that por is in vlan 1.

the port that connect switch0 to switch1 is fa0/1 and is set to vlan1.

the port that connect switch1 to switch0 is also fa0/1 and is set to vlan2.

the pc1 ip is and is connected to port fa0/24 on switch1 and is set to vlan2.

if I ping from pc0 to pc1, every networking bone in my body says it wont work, but it does working...


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Christoph Faber Wed, 09/11/2013 - 05:54
User Badges:

I don't see why it should be working?

The VLAN-ID itself means nothing if it's only locally defined.

If you take VLAN 2 or VLAN 999 or any other number, both ports are in the same vlan, so incoming traffic on one port can reach any other port on that switch in the same vlan.

Incoming traffic is not flagged with a vlan so the switch defines it as the VLAN defined on the port.

Incoming on Switch 0 it is VLAN 1, outgoing it no longer has a VLAN as it leaves the port. Incoming Switch 1 it is defined as VLAN 2 since the Port is in VLAN2, so it can leave at Port 24 which is in VLAN 2 too.

The only possibility to stop it from working is defining the link between Switch 0 and 1 as a Trunk. Then it arrives at switch 1 in VLAN 1 and can't get to Port 24 in VLAN 2.

Edit: Killed the bee - changed it to be

IshaiCohen1337 Wed, 09/11/2013 - 07:03
User Badges:

I didnt only locally created the vlans, I also assign the ports to the vlans.

if port 0/24 and 0/1 on switch0 are assign to vlan 1

and ports 0/24 and 0/1 on switch1 are assign to vlan 2

a ping between host 1 and host 2 shouldnt be possible since there is routing between vlans..

I should mention, that the link between switch 0 to switch 1 is set to access and not trunk.

I think since it is set to access and not trunk, the packets are not tagged with their vlan tag, and therefor the hosts can reach eachother.

Christoph Faber Wed, 09/11/2013 - 07:11
User Badges:

There is no routing between the vlans and there does not have to be a routing between to let the hosts ping the other one.

A packet going out an access port is not tagged with a vlan as you posted yourself and thats also why you need no routing and why the vlan-id does not matter. It is tagged with the vlan of the access-port going in and why should a switch not forward a vlan2 packet to a vlan2 port?

Routing is only necessary if you link the switches together with a trunk as I mentioned before.

mfurnival Wed, 09/11/2013 - 07:14
User Badges:
  • Silver, 250 points or more

Yes, that is the key here - because the link between switches is an access port and not a trunk when a packet leaves switch0 it has no VLAN identifier so the fact that you are using different VLANs on the two switches is irrelevant.

mfurnival Wed, 09/11/2013 - 06:00
User Badges:
  • Silver, 250 points or more

Post your switch configs and we can try and figure it out.

IshaiCohen1337 Wed, 09/11/2013 - 07:04
User Badges:

If I have 2 hosts in different vlans on the same switch, a ping wont reach from one to the other, so What do you mean by there is no L-3 device?

IshaiCohen1337 Wed, 09/11/2013 - 07:43
User Badges:

thanks alot guys for your quick and professional feedbacks

have a nice day

markeelen Wed, 09/11/2013 - 15:23
User Badges:

What is happening here is that PC0 is sending it's ping into its connected switch on VLAN 1, as the link between the switches at this end is also on VLAN 1, this will traverse the link and end up on VLAN 2 at the other end.
As you have configured both PCs on the same subnet, and the other PC is on VLAN 2, this will work.
Now, change the link to a trunk and see what happens??


Sent from Cisco Technical Support iPhone App

glen.grant Wed, 09/11/2013 - 17:11
User Badges:
  • Purple, 4500 points or more

  You have basically bridged vlan 1 and 2 togethr the way you have it. All your connections are access ports. I will guarantee if you had made the ports  between switches trunks allowing vlan 1 and vlan 2 you would not be able to ping between vlan 1 and vlan 2 without a l3 device in between .  Also in your current setup I bet if you put  a device into vlan 1 on the far end it will not ping because you have it plugged into vlan 2


This Discussion