Distributed Systems

Networking 101

January 29, 2023

Networking is the backbone of modern technology, and is essential for connecting devices and services. In this article, you will learn about the key concepts, terminology, and protocols that are used in networking.


Before we dive into the concepts, let’s first understand the terminology used in networking. The following are the most common terms used in networking:

  • Connection: In networking, a connection refers to the transfer of related information through a network. A connection is typically established before data transfer and may be dismantled at the end of the transfer, following the protocols set in place.

  • Packet: The smallest unit of data transferred over a network is referred to as a packet. Packets act as envelopes that carry data from one endpoint to another. The header of a packet contains information such as the source and destination, timestamps, network hops, etc. The main portion of a packet, also known as the payload, contains the actual data being transferred.

  • Network Interface: A network interface refers to any software interface that connects to networking hardware. For example, if a computer has two network cards, each network interface associated with them can be controlled and configured individually. A network interface can be associated with a physical device or a virtual interface, such as a “loopback” device.

  • LAN: LAN stands for “local area network” and refers to a network or portion of a network that is not publicly accessible to the internet. A home or office network is an example of a LAN.

  • WAN: WAN stands for “wide area network” and refers to a network that is larger than a LAN. The term is often used to describe the internet as a whole.

  • Protocol: A protocol is a set of rules and standards that define a language for devices to communicate. There are many protocols used in networking, often implemented in different layers. Some low-level protocols include TCP, UDP, IP, and ICMP. Some examples of application-layer protocols built on these lower protocols are HTTP, SSH, and TLS/SSL.

  • Port: A port is an address on a single machine that can be linked to a specific software. It is not a physical interface or location but allows a server to communicate with more than one application. For example, a web server can listen on port 80 for HTTP requests and on port 22 for SSH connections.

  • Firewall: A firewall is a program that controls the incoming and outgoing traffic on a server. It creates rules for what type of traffic is allowed on which ports and generally blocks ports that are not used by a specific application on a server.

  • NAT: NAT stands for “network address translation” and is a way to repackage and send incoming requests to a routing server to the relevant devices or servers on a LAN. This is often used in physical LANs to route requests through one IP address to the necessary backend servers.

  • VPN: VPN stands for “virtual private network” and allows separate LANs to connect through the internet while maintaining privacy. This is often used to connect remote systems as if they were on a local network, for security reasons.

This list is not exhaustive and other terms will be explained as they become relevant. The understanding of these high-level concepts will help in discussing the topics that follow.

Network Layers

Networking communication is structured in layers, with multiple technologies and protocols working together within a computer or network. This layered approach allows for efficient data transfer and the ability to use lower layers for new purposes. The language used to describe the layers may vary, but the path of data remains the same, flowing through the layers from top to bottom for transmission and back up for receiving. Each layer adds a “wrapper” to the data for the next layer to handle.

TCP/IP Model

The TCP/IP model, also known as the Internet protocol suite, is a widely adopted layering model that defines four separate layers:

  • Application: responsible for creating and transmitting user data between applications, allowing communication to appear as if it’s taking place locally between peers.
  • Transport: responsible for communication between processes and uses ports to address different services.
  • Internet: responsible for transporting data from node to node in a network, using IP addresses to reach remote systems.
  • Link: implements the topology of the local network and establishes connections between neighboring nodes to send data.

The TCP/IP model is abstract and fluid, which has made it popular to implement and has become the dominant way of categorizing networking layers.


A network interface refers to a communication point for a computer to connect to a network. Each interface is associated with a physical or virtual networking device.

Typically, a server will have one configurable network interface for each Ethernet or wireless internet card it has. These interfaces are usually identified by names such as “eth0”, “wlan0”, etc.

In addition to these physical interfaces, a server will also have a virtual network interface called the “loopback” or “localhost” interface. This interface is represented by the loopback IP address ( and is used as a means for applications and processes on a single computer to communicate with each other. This interface is identified as “lo” in many tools.

In datacenters, administrators often configure one interface, such as “eth0”, to service traffic to the internet and another interface, such as “eth1”, for a LAN or private network. This allows for a clear separation of traffic and improved security. In some cases, VPS will have two networking interfaces, “eth0” will be configured to handle traffic from the internet, while the “eth1” interface will operate to communicate with a private network.


Networking protocols are sets of rules that govern communication between devices in a network. They define the format of data packets, how they are transmitted, and how devices should respond to different types of traffic. Some examples of common networking protocols include:

  • TCP (Transmission Control Protocol): A transport-layer protocol that provides reliable, ordered delivery of data between devices. It is often used in conjunction with IP (Internet Protocol) to form the TCP/IP suite.

  • UDP (User Datagram Protocol): A simpler transport-layer protocol that does not provide the same level of reliability as TCP. It is often used for real-time applications or situations where data loss is acceptable.

  • IP (Internet Protocol): A network-layer protocol that provides routing and addressing for devices in a network. It is responsible for moving data packets between devices using IP addresses.

  • HTTP (Hypertext Transfer Protocol): An application-layer protocol that is used for transferring data over the web. It is the foundation of the World Wide Web and is used by browsers to request and receive web pages.

  • HTTPS (HTTP Secure): An extension of HTTP that uses Transport Layer Security (TLS) or Secure Sockets Layer (SSL) to encrypt data in transit. It is commonly used for online transactions and other sensitive data transfers.

  • DNS (Domain Name System): An application-layer protocol that translates domain names (e.g. www.example.com) into IP addresses.


By now, you should have a basic understanding of networking terminology and how different components connect and communicate with each other. This knowledge will help you better understand the topics that follow.

© All rights reserved — cs.fyi