Topic 7 – ARP, Broadcast Containment, and Router Gateways
MAC and IP Addressing Fundamentals
Every NIC on an Ethernet LAN possesses two primary identifiers:
Physical / Layer-2 address (MAC) – 48-bit hexadecimal value burned into the NIC, used for NIC→NIC delivery inside the same broadcast domain.
Logical / Layer-3 address (IP) – 32-bit IPv4 (or 128-bit IPv6) value, used to locate the host across internetworks.
Role separation:
If the destination IP is local, the frame’s destination MAC equals the target host’s MAC. If the destination IP is remote, the frame’s destination MAC equals the default-gateway’s MAC.
Frame Construction – Destination on the Same Network
Example scenario:
PC1 IP=192.168.10.10, MAC=aa−aa−aa .
PC2 IP=192.168.10.11, MAC=55−55−55.</p></li></ul></li><li><p>PC1encapsulatesthepacket:</p><ul><li><p>Layer−3header</p></li><li><p>SourceIP=192.168.10.10</p></li><li><p>DestinationIP=192.168.10.11</p></li><li><p>Layer−2(Ethernet)header</p></li><li><p>DestinationMAC=55! -! 55! -! 55</p></li><li><p>SourceMAC=aa! -! aa! -! aa</p></li></ul></li></ul><h3id="5fb8a0f4−9fda−48c4−aaae−c37d067f8ae3"data−toc−id="5fb8a0f4−9fda−48c4−aaae−c37d067f8ae3"collapsed="false"seolevelmigrated="true">FrameConstruction–DestinationonaRemoteNetwork</h3><ul><li><p>WhentheIPdestinationliesoutsidethelocalnetwork,thesendermustreacha<strong>routerinterface(defaultgateway)</strong>first.</p></li><li><p>Stepsalongthepath(PC1→R1→R2→PC2):</p><ol><li><p>PC1buildsaframewith<strong>dest−MAC=R1G0/0/0</strong>.</p></li><li><p>R1de−encapsulates,consultsitsroutingtable,re−encapsulatestowardR2with</p></li></ol><ul><li><p>SourceMAC=\text{R1 G0/0/1}</p></li><li><p>DestMAC=\text{R2 G0/0/1}
Final hop: R2 delivers with dest-MAC = PC2’s NIC.
Across every link the same IP packet travels inside a new Layer-2 frame that matches that medium (e.g., Ethernet, serial, MPLS …).
Address–mapping mechanisms:
Broadcast Domains & Containment
Access-Layer Communication Problem
Applications know IP destinations, not MACs.
Sender needs to translate destination IP → MAC; uses ARP (IPv4) or ND (IPv6).
ARP (Address Resolution Protocol) – Overview
Purpose: map IPv4 ↔ MAC and cache the mapping.
Operates directly over Ethernet (Ethertype 0x0806).</p></li><li><p>Twokeyfunctions:</p><ol><li><p><strong>Resolve</strong>unknownMACaddresses.</p></li><li><p><strong>Maintain</strong>anARPtable/cacheofrecentmappings.</p></li></ol></li></ul><h4id="055555a0−1876−411a−9b95−7a154dbbce02"data−toc−id="055555a0−1876−411a−9b95−7a154dbbce02"collapsed="false"seolevelmigrated="true">ARPTable(Cache)</h4><ul><li><p>StoredinRAM;eachentrybinds</p><ul><li><p>IPv4address⇔MACaddress</p></li><li><p>Time−stamp(dynamicentriesexpire).</p></li></ul></li><li><p>Lookuplogicwhenpreparingtotransmit:</p><ul><li><p>Ifdest−IPis<em>local</em>→searchforthatIP.</p></li><li><p>Ifdest−IPis<em>remote</em>→searchfordefault−gateway’sIP.</p></li><li><p>Hit⇒usecachedMAC.</p></li><li><p>Miss⇒initiateARPRequest.</p></li></ul></li><li><p>Entrylifetimes(exampleforWindows10):15\text{–}45seconds.</p></li><li><p>Manualcachemanagement:commandssuchasarp\ -d(Windows)orclear\ arp\ cache(Cisco)removeentries.</p></li></ul><h4id="5750ea6d−0650−4ddb−bf3e−a0e3a101bbfd"data−toc−id="5750ea6d−0650−4ddb−bf3e−a0e3a101bbfd"collapsed="false"seolevelmigrated="true">ARPRequest(Broadcast)</h4><ul><li><p>SenderconstructsEthernetframe:</p><ul><li><p>Dest−MAC=FF! -! FF! -! FF! -! FF! -! FF! -! FF(broadcast).</p></li><li><p>Src−MAC=\text{sender’s MAC}.</p></li><li><p>Ethertype=0x0806.</p></li><li><p>Payloadasks:“Whohas\text{IPv4}=X?Tell\text{MAC}=Y.”</p></li></ul></li><li><p>Switchfloodsrequest;everyNICexaminesthepayloadIP.</p></li></ul><h4id="7ffd2140−ad52−40ba−af59−aa9b58951eb0"data−toc−id="7ffd2140−ad52−40ba−af59−aa9b58951eb0"collapsed="false"seolevelmigrated="true">ARPReply(Unicast)</h4><ul><li><p>OnlytheNICwithmatchingIPresponds:</p><ul><li><p>Dest−MAC=\text{Requestor’s MAC}</p></li><li><p>Src−MAC=\text{Responder’s MAC}</p></li><li><p>Ethertype=0x0806
Requestor updates ARP table; subsequent frames become unicast.
If no reply ⇒ original packet is discarded (cannot build frame).
Static ARP entries possible; never age out (rare in practice).
ARP in Remote Communications
When dest-IP is remote, host repeats the same ARP logic but targets the default-gateway’s IP.
Ensures first hop frame reaches the router; routers then forward at Layer-3.
ARP Troubles & Security
Viewing the ARP Table
Routers as Gateways & Network Boundaries
Router interface = boundary between two networks / broadcast domains.
Each interface possesses:
Hosts configure a default gateway equal to the router’s local-LAN IP.
Home / SOHO Wireless Routers
Factory-default: act as DHCP server for the inside network.
Typical addressing:
Router LAN IP = first usable host address (e.g., 192.168.0.1).
DHCP pool allocates within the same /24.
ISP side (WAN interface):
Therefore the wireless router forms the demarcation between:
Internal / private network – protected, non-routable.
External / public internet – routable, potentially untrusted.
Importance of the Gateway
All hosts on a LAN must forward off-net traffic to this gateway ⇒ connectivity to other subnets & Internet.
Loss of correct gateway IP or MAC (e.g., via ARP spoofing) disrupts all external communication.
Key Numbers, Terms, and Commands Summary
Broadcast MAC: FF! -! FF! -! FF! -! FF! -! FF! -! FF</p></li><li><p>Examplehostaddresses:192.168.10.10 \rightarrow aa! -! aa! -! aa,192.168.10.11 \rightarrow 55! -! 55! -! 55</p></li><li><p>EthertypeforARP:0x0806</p></li><li><p>ARPcachelifetime(Windows10):15\text{–}45seconds.</p></li><li><p>CLI:</p><ul><li><p>Cisco:show\ ip\ arp,clear\ arp</p></li><li><p>Windows:arp\ -a,arp\ -d$$
Security mitigation: Dynamic ARP Inspection (DAI).
Conceptual Connections & Real-World Relevance
ARP underpins all IPv4 over Ethernet traffic; failure or compromise affects every upper-layer protocol (HTTP, SSH, etc.).
Broadcast containment via routers/VLANs parallels scalability and security design principles.
Default-gateway logic embodies the hierarchical nature of internetworking (edge → distribution → core).
ARP spoofing illustrates the need for layered defense: switch-level protections + upper-layer encryption (HTTPS, SSH) to guard against MITM attacks.