IP

  • Each packet consists of a structure header and data.
  • The header helps route, fragment and process packets efficiently.
  • Packet switching ensures interleaved and reliable data transmission.

TCP

  • TCP runs on top of IP, ensuring lost packets are retransmitted.
  • Establishes a connection-oriented communication model.
  • Guarantees ordered, complete, and error-checked data transfer.

TCP Socket

  • A TCP connection is defined by (Destination IP, Destination Port, Source IP, Source Port).
  • The destination port depends on the service :
    • Web (HTTP) β†’ Port 80
    • Secure Shell (SSH) β†’ Port 22
    • DNS β†’ Port 53
  • The source port is usually chosen randomly.

DNS

  • DNS translates names into IP addresses via a hierarchical system.
  • Requests first go to the ISP’s DNS resolver, then higher-level DNS servers.
  • The authoritative DNS server provides the correct IP.