A Single Network

If A wants to talk to B, well, they're on the same LAN (Local Area Network), so A addresses the packet directly to B:

Simple 192.168.1.0/24 network with two hosts A (192.168.1.1) and B (192.168.1.2)

So "A" can send a packet to "B" like this:

Source IP192.168.1.1(A)
Destination IP192.168.1.2(B)
DataHello B! This is the Data

Unfortunately, it's not as simple as that. The IP address identifies the machines at a software (logical) level, but the physical (MAC) layer isn't the same as the logical (IP) layer.
  • The IP layer needs to be able to route from Alaska to Zebediela. It works at a relatively high level.
  • The MAC layer only needs to talk to machines on the local network (LAN). It works at a low level.

Source IP192.168.1.1(A)
Source MAC01:C0:F2:69:31:21(A)
Destination IP192.168.1.2(B)
Destination MAC03:A0:B3:27:A2:2E(B)
DataHello B! This is the Data

So how does A find out what B's MAC address is?

Networking Tutorial
Share on Twitter Share on Facebook Share on LinkedIn Share on Identi.ca Share on StumbleUpon

Get the Book:

Buy my 600-page Shell Scripting Book...


Or from other Amazon in other countries: USA, Germany, France, Spain, Italy, Canada, Japan, India, Brazil
Or from other retailers

Buy this Tutorial in Paperback or for Kindle:


USA, UK, Germany, France, Spain, Italy
Or Kindle in these countries: Canada, Australia, Japan, India, Brazil, Mexico

Buy this Tutorial as a DRM-Free PDF

(Free Sample)

$9.99 US Dollars

£4.99 UK Pounds

€6.99 Euros

You can join our Shell Scripting community on Facebook:

DefectiveByDesign.org