• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

Packet and Frames passing through hub, switches and routers

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.

Thanks
0
telecomkev
Asked:
telecomkev
1 Solution
 
MysidiaCommented:
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" 10.0.0.1 wants to communicate with  the ip address of Host "B" 10.0.0.2 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  10.0.0.1;  who has the IP address 10.0.0.2?"
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 (10.0.0.1) 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 10.0.0.2"

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
10.0.0.2

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



0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now