Cisco Support Community
Community Member

Traffic Between 2 Ports on Different VLANs on the Same Switch


This question probably results from a flaw in my understanding of network layer 2 versus layer 3 and VLANs so any additional context in that regard would be very welcome

If I've got 2 systems on difference VLANs that are connected to ports on the same switch (e.g. 2950), with that switch being connected via an uplink to a router or layer 3 switch and i want to pass traffic between the 2 systems (e.g. copy a file from a folder shared on one system to another), will the traffic pass directly from one port on the 2950 to the other? Or will it need to go through the uplink? I guess it will need to go through the uplink initially as layer 3 needs to be involved for inter-VLAN routing but wondering if layer 2 MAC address will ultimately be learned, allowing traffic to pass directly between the systems, not over the uplink.

Thanks in advance,


Everyone's tags (1)
Hall of Fame Super Silver

Re: Traffic Between 2 Ports on Different VLANs on the Same Switc

The layer 3 interface on each respective VLAN needs to act as a gateway. In your case those are (sub)interfaces on your router. The MAC address to port mapping known by the switch won't help one device to another on separate vlans sine each will only populate its arp cache with addresses from its respective subnet / VLAN.

Sent from Cisco Technical Support iPad App

Traffic Between 2 Ports on Different VLANs on the Same Switch

If the hosts are on different Layer 2 Vlans and you want to pass data between them, that data needs to be 'Routed'.

In order to Route data from one Layer 2 Vlan to another, you need a device capable of Layer 3 Routing. That device can be a traditional Router or can be something called a Layer 3 switch.

A 2950 switch is Layer 2 only so has the ability to create many Layer 2 Vlans which is what you have done. In order to route traffic between those Vlans, you can either use a router or a L3 switch.

If you decided to use a router, look up something called 'Router on a Stick' which involves creating a Trunk link from the 2950 to the Router and then setting up Subinterfaces on the Routers port to act as the 'Default Gateway' for each of your Vlans.

CreatePlease to create content