The last logical hop before data becomes a raw electrical signal.
DHCP — getting an address automatically
New device joins LAN → DHCP server (address pool) → Device receives an IP address
MAC Addresses
Within a LAN, devices at the Data Link layer communicate using these MAC addresses, not IP addresses.
ARP — Address Resolution Protocol
Frame anatomy
Before a network-layer packet can hit the physical wire, the Data Link Layer wraps it into a frame containing (at minimum):
The sender's Data Link layer address (MAC)
The IP address of the destination, carried inside the encapsulated packet
Network-layer packet → wrapped into → Data Link frame