My question is related to the Vlan. And this question would consist of 2 parts.

1)Would Switch 1 know all the devices present in Vlan 2 or Vlan 3, including the ones present in the Switch 2.

For ex: Would Vlan 2 of Switch 1 know about Host H and Host F and vice-versa.

If not,

2)Say, Im sending data from Host B in Vlan 2 to Host H present in Switch 2 Vlan 2, so if the Switch 1 doesnt have any info in its table, it sends a broadcast and ultimately Host H receives it, if im not wrong.

Now, how will Host H send the data back to Host B?

Host H will only be aware of the Destination MAC addres, so how does the switch know that the data has to be sent through fa0/4 tagging the frame.

As far as my knowledge goes, each vlan will be knowing about only their devices, so using what info does the switch forward it out of the fa0/4.

Please help me on this. The concept is pretty confusing.

An explanation, with the flow of the data from the beginning starting from Host B to Host H and then finally from Host H to Host B would be helpful.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Dec 25, 2018 at 9:03

1 Answer 1


First, to have packets move between VLANs, you need a router.

Switches maintain MAC address tables, one for each VLAN on the switch. The MAC address table has the interface where a frame with the source MAC address was last seen. It is highly likely that one switch will have the MAC addresses of the hosts on the other switch for a VLAN pointing to the link between the switches because any frames from the hosts on the other switch that find their way to the first switch will have the source MAC addresses placed in the switch MAC address table for that VLAN.

If a switch needs to send a frame to a destination MAC address, it first looks for the destination address in the MAC address table (and updates the MAC address table with the source MAC address). It will switch the frame for the destination MAC address to the interface it finds for that MAC address in the MAC address table, or if the destination address doesn't have an entry in the MAC address table, the switch will flood (broadcast is a frame type, so flood is the correct term, even if the action seems to be the same) the frame to all other interfaces than the one where the frame entered.

It only takes one frame to put the source MAC address in the table (but every frame will update the table with the source MAC address of the frame), so the table gets built quickly. That is because every time a host uses ARP to discover a destination MAC address, it broadcasts an ARP request that goes to every other switch interface. The switch will see both the ARP request and ARP reply, so it will have the source MAC addresses of each host in its MAC address table with the interfaces on which the source MAC addresses were seen.

The entries in a MAC address table will eventually time out if there is no activity for a MAC address. That is to eliminate entries for hosts that have been shut down. Most business-grade switches will let you configure the time out period.

  • I really need to take touch typing
    – Ron Trunk
    Jul 13, 2018 at 18:36
  • I am struggling with one-handed typing because I have a big splint on my left hand after I went to the minor emergency center about my hand.
    – Ron Maupin
    Jul 13, 2018 at 18:39
  • Well, that makes me feel even worse!
    – Ron Trunk
    Jul 13, 2018 at 18:40
  • Thanks from r your time in explaining, but I’m stuck somewhere. Is it possible to explain the packet flow when Host B in Switch 1 VLAN 2 tries to ping Host H one Switch 2 VLAN 2 assuming Switch has its MAC table empty. It would really help me a lot in understanding it clearly. Thank you.
    – RRHS
    Jul 14, 2018 at 17:14
  • A host in one VLAN cannot communicate with a host in the another VLAN because you do not have a router. VLANs break a switch into multiple, virtual, separate, unconnected switches, and a router is needed to communicate between VLANs. The first host will understand that the destination is on a different network, and it will want to send the traffic to its gateway, but there is no gateway, so it will simply drop the traffic with an error message.
    – Ron Maupin
    Jul 14, 2018 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.