Packet and Frames passing through hub, switches and routers

Posted on 2008-11-08
Last Modified: 2012-05-05
Hi All,
Could someone help clarify how a host lets say "A" would communicate with host "B" on the same subnet, but has to pass through hubs and switches and doesn't know where "B" is. In terms of ARP, since only hubs and switches are involved would only be interested in MAC addresses, right? In this scenario no routers are involved.

Second scenario would be the same, except, now lets add that router, and connect multiple subnets. now host "A" wants to communicate with host "C" on a separate subnet, through hubs, switches and a router.

I'm assuming layers 1 2 and 3 are involved, ARP, IP and MAC addresses.

Question by:telecomkev
    1 Comment
    LVL 23

    Accepted Solution

    Ethernet communications are broken up into small chunks called frames.
    Each frame contains a 'destination' and 'source' hardware address, the data, and a checksum.

    When a hub or multi-port repeater receives an Ethernet frame, it simply forwards the frames out all ports other than the one it came in on:  unless a collision has occured.
    When a collision occurs a "collision jam"  signal is sent across the collision domain, by the device that detected the collision.

    A collision occurs when two devices in the same collision domain attempt to transmit at once: after a collision, all hosts on the network stop transmitting for a random backoff time.

    _ALL_  devices connected directly to a hub see traffic that successfully
    passes into any port on  that hub  (hubs are generally dumb multiport
    repeaters, that merely regenerate the communication that arrived,
    and have no intelligence).

    Bridges, switches, and routers can be used to separate collision domains.  Fewer collisions  means better throughput.

    When a typical modern switch  (called a learning switch) receives a frame,  it examines the source address of the frame, and stores that hardware address
    as associated with the source port.

    The table entries expire after an aging period, but will be kept so long as the host is generating traffic.

    If the switch doesn't know which port to send a frame to, because the destination
    hardware address is not in its table, it forwards it to all ports except the one it came in on.

    A switch does the same for broadcast traffic.
    If the port of the hardware destination address is known, then the frame is sent out that port (unless it was the port that the frame was received from, in which case the frame is discarded).

    ARP is the protocol that converts IP addresses to HARDWARE addresses. There are some different variants of ARP apply to different networking technologies.

    In the Ethernet protocols, the hardware addresses used are called MAC addresses.
    Hosts on an Ethernet have a temporary table in memory that maps hardware
    addresses to their corresponding IPs and vice versa.

    Say host "A" wants to communicate with  the ip address of Host "B" on the same subnet.

    Host "A" does not know Host "B"'s hardware address, so it can't communicate yet.

    Host "A" sends a broadcast ARP request out, this is addressed to the Ethernet broadcast address  FF:FF:FF:FF:FF

    It creates an "incomplete" entry in its ARP table to indicate it is waiting for a
    response to its own ARP request.

    The request essentially says...  "I am;  who has the IP address"
    The request (like all Ethernet frames) contains Host A's hardware address.

    The request is broadcast... all switches send the request out all ports on
    the same VLAN except the one it came in on

    Eventually Host B sees the broadcast.
    Host B and all hosts that receive the ARP request take the IP address seen
    in the ARP request ( and store that IP in their ARP cache with the
    hardware address that host A announced.

    Host B (only host B) then replies to the ARP request with an ARP reply, which is
     not broadcast but is instead directed to Host A's hardware address:

    "Hello, my hardware address is say 12:34:56:78,  and I am"

    The switches forward the request to the port associated in their tables with Host A's hardware address.

    Eventually Host A receives the frame, and completes the ARP entry with

    Once the ARP entry on host A has completed,  host A begins its first packet of
    data to host B.


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
    Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now