Communication between processes over the network (IPC) is at the heart of distributed systems.

Network protocols are arranged in a stack, each layer builds on the abstraction provided by the layer below and lower layers are closer to the hardware.

Screenshot 2023-11-22 at 10.53.25 AM.png

Link Layer: consists of network protocols that operate on local links (Ethernet or Wi-Fi) and provides an interface to the underlying network hardware.

Switches operate at this layer & forward Ethernet packets based on their destination MAC address.

Internet Layer: uses addresses to route packets from one machine to another across the network. The Internet Protocol(IP) is the core protocol for this layer, it delivers packets on a best-effort basis.

Routers operate at this layer & forward IP packets based on their destination IP address.

Transport Layer: transmits data between two processes using port #s to address the processes on either end. The most important protocol in this layer is the Transmission Control Protocol(TCP).

Application Layer: defines high-lvl communication protocols like HTTP or DNS.