I have a very rudimentary doubt. I am sure missing something but cant recollect what.

Suppose we have 2 hosts connected on 2 interfaces of a switch. if host 1 pings host 2 , it will first send an ARP request for host 2, host 2 will reply and it will be entered in the ping packet.

BUT, we dmac is always of the next hop of the packet. In this case the next hop of the packet is the switch interface, so why dmac of the host and not the switch.

Is it that next hop concept is used in routers and not in switches ?


Hosts do not know whether they are connected to directly to another host, or to a switch, or to two switches. They only know who the other party is they want to speak to, not what devices may or may not exist in between.

After having completed the ARP process, the host will be able to create a packet with a L2 header that includes a destination MAC address of the other host.

The switch will then behave as follows:

Packet Traveling - Host to Host communication through a Switch

In this example, the initial frame is addresses unicast, directly to Host B. The switch will flood the frame out all ports because it does not know (at this point) where Host B's MAC address exists.

Had the initial frame been a broadcast, which is to say a frame destined to the MAC address ffff.ffff.ffff, the effect would have been the same -- the switch would have flooded the frame.

| improve this answer | |
  • 1
    Where do you find or create these gif? I'm always in need of them for my presentations? – defalt Mar 11 '17 at 20:04
  • @defalt I create them all. There are many others on my blog -- Practical Networking .net, or PracNet.net for short -- feel free to use any of them in your presentations (although attribution would be appreciated). There is a contact form on the blog, feel free to use it and we can talk in more detail about how I go about creating them. – Eddie Mar 13 '17 at 1:42

Hops are for routers, or other layer-3 devices. Switches are transparent devices, and the frames are unchanged by a switch. A switch will terminate the physical layer-1 connection, but it doesn't terminate the layer-2 connection. Hosts, including routers, will terminate a layer-2 connection.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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