📡 Core Concepts


🔌 TCP/IP Stack (Internet Protocol Suite)

🏓 Layers

Layer Purpose
Application Handles data for processes/apps
Transport End-to-end socket communication (TCP/UDP)
Network Packet routing via IP
Hardware Converts packets to/from network signals

🧳 Data flows downward at source (chunked and added with headers) and upward at destination (reconstruction).

🌐 TCP vs UDP

🤝 TCP 3-Way Handshake

  1. SYN – Client initiates connection with a TCP segment having SYN flag set (Seq=x).
  2. SYN-ACK – Server replies with segment SYN & ACK set (Ack=x+1) (Seq=y).
  3. ACK – Client sends segment (Ack=y+1) to confirm