Networking Fundamentals

An overview of networking basics including the TCP/IP model layers, connection-oriented vs connectionless communication, unicast/broadcast/multicast, IP addresses, and port numbers.

TCP/IP Model

TCP/IP is a collective term for communication protocol suites used in many networks including the Internet. It is organized as a protocol stack that hierarchically divides communication functions, and is generally divided into the following four layers.

  • Application Layer:
    • Defines the rules for sending and receiving data by applications used by users (web browsers, email clients, etc.). It also handles data representation formats (character encoding, image formats, etc.).
    • Protocol examples: HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS
  • Transport Layer:
    • Defines the rules for reliably or rapidly transferring data between applications. It handles establishing data transmission between communicating programs, error control, flow control, etc.
    • Protocol examples: TCP (Transmission Control Protocol), UDP (User Datagram Protocol)
  • Internet Layer:
    • Identifies the destination of data on the network and determines the optimal path (routing) from source to destination.
    • Protocol examples: IP (Internet Protocol), ICMP (Internet Control Message Protocol)
  • Network Interface Layer:
    • Handles the process of sending data received from the Internet layer onto the physical network medium (Ethernet cables, Wi-Fi, etc.). It handles conversion to electrical signals, communication using MAC addresses, etc.

Connection-Oriented and Connectionless Communication

  • Connection-Oriented Communication:
    • Before communication begins, the sender and receiver establish a connection, and maintain that connection during data transmission.
    • Acknowledgments to confirm data delivery, sequence guarantees, and retransmission control provide high reliability.
    • Example: TCP (web communication, email sending, etc.)
  • Connectionless Communication:
    • Communication begins without establishing a connection, and data is sent unilaterally.
    • Since there are no acknowledgments or sequence guarantees, reliability is lower, but overhead is minimal and speed is high.
    • Example: UDP (video streaming, voice calls, etc.)

Communication Methods

  • Unicast:
    • One-to-one communication. Data is sent from a specific source to a specific single destination.
  • Broadcast:
    • Data is sent to all hosts within the same network.
  • Multicast:
    • Data is sent to multiple hosts belonging to a specific group. Used when sending data to multiple hosts registered with the same IP address.
  • Anycast:
    • Data is sent to the nearest host (in terms of routing) among multiple hosts with a specific IP address. Primarily used for DNS servers, contributing to load balancing and redundancy.

Types of IP Addresses

  • Global IP Address:
    • An IP address uniquely assigned on the Internet. Used by devices directly connected to the Internet.
    • Managed by the international organization IANA (Internet Assigned Numbers Authority), allocated to ISPs (Internet Service Providers) through regional registries (JPNIC in Japan), and provided to users by ISPs.
  • Private IP Address:
    • An IP address usable only within an organization’s local network (LAN). Not directly accessible from the Internet.
    • Specific IP address ranges are reserved as private IP addresses, and each organization can freely assign and use them.

Port Numbers

Port numbers are numbers used in TCP/IP communication to identify the application or service sending and receiving data. While an IP address identifies the destination computer, a port number specifies which application on that computer to communicate with.

  • Well-Known Ports: Port numbers from 0 to 1023, assigned to specific standard services.
    • 20: FTP (data transfer)
    • 21: FTP (control)
    • 22: SSH (Secure Shell)
    • 23: Telnet
    • 25: SMTP (Simple Mail Transfer Protocol)
    • 53: DNS (Domain Name System)
    • 80: HTTP (Hypertext Transfer Protocol)
    • 110: POP3 (Post Office Protocol version 3)
    • 143: IMAP (Internet Message Access Protocol)
    • 443: HTTPS (HTTP Secure)