Skip to content

Packet Traveling – Series Finale

    Packet Traveling – Series Finale

    This article is a part of a series on Packet Traveling — everything that happens in order to get a packet from here to there. Use the navigation boxes to view the rest of the articles.


    Packet Traveling

    In this series, we studied the different layers of the OSI Model, and how each of the seven layers provides a unique service which the other layers depend on.

    We also studied the key players of the Internet, where we defined a Host, Client, Server, Switch, Router, and ARP. As well as each of their unique roles in moving a packet its path.

    We then looked at the specific workings of a Switch, and its exact functions as it facilitates communication within a network. Then we looked at the specific workings of a Router, and exactly how it facilitates communication between networks.

    Finally, its time to finish the Packet Traveling series with a video that ties everything together. In the following video, we will look at everything that happens to get data from Host A to Host D, as it passes from a Host, through a Switch, to a Router, through another Switch, and finally to its final destination.

    Packet Traveling Series Finale Video

    Series Navigation

    Host to Host through a Router >>

    4.9 12 votes
    Article Rating
    Notify of

    Newest Most Voted
    Inline Feedbacks
    View all comments

    Thank you for this awesome series, can you make an series over a campus network which includes bunch of proxy server as a gateway for their respective subnets and bunch of switches(when one switch is connected to another one) and access points to cover larger area..

    Ed, in your video at 11:20. When the packet got to Host B, the host stripped L3 and L3. How does Host B still have information to send back the response? How does it know that Host A should get a response when L2 and L3 are gone?

    Thank you.

    When does the broadcast IP get used as opposed to the broadcast FF:FF:FF:FF:FF:FF?

    I’m thinking that the broadcast FF:FF:FF:FF:FF:FF is used at computer A,B,C,D and at Switches 1 and Switches 2.

    When does the broadcast IP get used? The broadcast IP of a /24 is for my question if that helps.

    Would routers only use the broadcast IP then?

    Any help is very appreciated!

    L3 Broadcast will be needed for a client looking for IP address from DHCP server – Eg when you do ipconfig / renew on PC or when when you are setting up the client for the first time.
    For routers, If you configure “ip address DHCP” for an interface, then also the router will do a L3 broadcast intially to get the IP address for that interface.

    Also, an L3 broadcast will in turn require a L2 broadcast to find out the MAC address of all the hosts in the network for which you requested the L3 broadcast initially.

    Amazing series. By far the most lucid I’ve come across. I will be refering any interested parties to this site in the future. I am still a bit confused on the relation between subnet masks and private Ips.

    I know that any realistic router is going to assign each device on the network a private ip and perform name address translation on ingoing and outgoing packets (using port mapping). But I am uncertain of why this doesn’t render the whole concept of the subnet mask redundant. Is a subnet mask used only for cases when an outside client needs to specifically address a host behind a router outside of its own network? Even then my understanding is that protocols have been developed which allow for two computers to communicate directly using NAT. If so wouldn’t it make more sense for most networks to have all octets of the IP address be network rather than host?

    Thanks for the speedy response Ed! I am definitely looking forward to all future series. Perhaps my source of confusion regards the distinction between a private network and a local one. My understanding is that the IETF has reserved several IP ranges for “private internets” and are “not publicly routable on the “global internet.” I had assumed, based on this, that the host would determine whether to send out an ARP request to the default gateway on the basis of whether the destination IP was in this reserved range or not.

    This makes sense to my neophyte mind because then the some 4.3 billion IP addresses of IPv4 could each refer to a potentially massive network and all local routing could be handled with the private ips in the reserved range.

    Perhaps I am merely imagining simple home networks and not considering issues that could crop up in larger corprate networks (eg subnets inside of subnets). Any thoughts on how I’ve gotten so bumfuzzled?


    I have doubt in default gateway ip address. As you have mentioned in the video if the host sends the packet to another host in a different network that should go via default gateway. suppose if default gateway not configured in host then what will happen? suppose wrong default gateway ip address mentioned in the host, In that scenario how the host will send the packet to a destination?

    if i want to send data between 2 devices on same subnet, will router be required in this case?? or only switch will work??

    Plz help

    Hi there,

    I have a quick question about the cut-through method by which a switch can forward frames.
    You were saying that the switch stores nothing, but when I looked at another article it says “switch copies into its memory only the destination MAC address”.

    Could you please clarity this for me?


    Hi Sir,

    It was really very good tutorial and I learnt a lot and understood these topic.
    Also the way you explained is awesome

    Awesome explanation .. It just cleared all my doubts.
    Thanks a lot !!

    Could you please elaborate on packet travel when we hit in a browser?

    Thank you

    Please make an article on dynamic routing and how it works ….

    #Raadhe Raadhe

    In this entire series, it was discussed that if the destination in the packet is in the same subnet then it will be broadcasted to get the mac address of destination IP but if the destination is in a different subnet than it will look for the mac address of gateway first. So one question should be popped into your mind that how the host will determine whether destination present in packet is in the same subnet or different subnet?

    So the answer is, there will an ANDing of below things and then the decision will be taken by the host.

    1. source IP address + source subnet mask.
    2. destination IP address + source subnet mask

    If the resultant of both are the same then the destination is in the same subnet if not then it’s in a different subnet.

    Example –

    00001010.00001010.00001010.00000001 (
    11111111.11111111.11111111.00000000 (
    00001010.00001010.00001010.00000000 (AND result)

    00001010.00001010.00001010.00000010 (
    11111111.11111111.11111111.00000000 (
    00001010.00001010.00001010.00000000 (AND result)

    Here we go in our example is the same that’s mean the destination is in the same subnet.

    You can give a try to another destination IP from another subnet. (-_-)

    thanks, Ed this series really helped me to understand the concept better.

    This is the best series on networking I have ever seen in my entire life. I wish I had access to articles such as yours when I was in grad school. I would have gained a very thorough understanding of the topic and would have been a better all rounded software engineer. Keep up the good work.

    Let’s say there are two devices D1 and D2. D1 is behind router R1, and D2 is behind router R2. R1 and R2 each have their own local network. Now, let’s say D1 has IP and D2 also has IP (since they’re in different networks).

    From the video, if both D1 and D2 send requests to the same external host D3 (e.g. google) the source IP will be set to When D3 responds and sends a packet back, how does it know which to choose? How is that IP address determined and is it ever modified throughout its journey to the destination (similar to how the L2 frame is replaced along each hop)?

    Dude this series was amazing! Thank you so much for making it!

    Any chance to include articles to this series that include more parts/ devices of network that packet traverse (for ex. firewall, DNS & DHCP, MPLS inside ISP, Internet (from high level perspective), different medias on the WAN besides assuming all is Ethernet) ?
    It would be great to have next articles that talk about this not deep but just high level to bring it closer to what happens in real world.

    Again thank you so much, your articles made things more clear & connected concerning Data networks.

    Great article! How does this change when there are multiple switches connected together? IE: If we had 2 switches connected together after the host? Does the L2 header get stripped each time it passes between the switches? Does the MAC table on the first switch have the same port listed (to the second switch) for all the MACs ?


    Great series, among the best I’ve seen.

    On this video, one question. At 3:45 you start by saying A knows the IP address of B – how does it get that knowledge in the first place?

    Hello can you make a more complicated version of the packet traveling, like with more switches & routers + with servers and PC’s that are making ping to each other.

    Please start a series on Cyber security

    This is incredible well-explained!