Networking basics (theory)

Basic terms

  • HTTP - Hypertext Transfer Protocol, a protocol used for transmitting hypertext via the Internet. It is the foundation of data communication on the web and allows browsers and web servers to exchange information.
  • HTTPS - Hypertext Transfer Protocol Secure, an extension of HTTP that uses encryption through SSL/TLS to provide secure communication over a computer network. It ensures the integrity and privacy of data between the web browser and server.
  • SSID - Service Set Identifier, a unique name assigned to a Wi-Fi network to distinguish it from other networks. Devices use the SSID to connect to the correct wireless network. It contains up to 32 alphanumerical characters and is case-sensitive. A guest SSID is a separate network identifier (SSID) created on a wireless router to provide internet access for guests. It is isolated from the main network to enhance security, preventing access to internal resources while allowing visitors to connect to the internet. It typically includes its own password and settings for limited access.
  • SSL - Secure Sockets Layer, a cryptographic protocol designed to secure communication over a computer network. SSL encrypts data transmitted between the client and server, protecting it from interception and tampering.
  • SSH (Secure Shell) - A cryptographic network protocol used to securely access and manage devices over an unsecured network. SSH provides a secure channel for remote login and command execution by encrypting the communication between the client and server. It is widely used for managing servers, transferring files, and automating tasks securely.
  • Tethering - The process of sharing a device's internet connection with other devices, typically through a wired connection (e.g., USB) or wirelessly (e.g., Wi-Fi or Bluetooth).
  • Ethernet - A widely used networking technology that defines the standards for communication over wired local area networks (LANs). It specifies the physical and data link layer protocols for transmitting data between devices using cables, typically twisted pair cables, and networking hardware like switches and hubs.
  • DSL (Digital Subscriber Line) - A high-speed internet connection technology that transmits digital data over standard telephone lines. DSL allows simultaneous use of the internet and telephone service by dividing the available frequency spectrum into separate channels for voice and data, often requiring a DSL modem to decode signals.
  • ISP - Internet Service Provider, a company or organization that offers internet access and related services to individuals and businesses. ISPs provide connectivity through various technologies such as DSL, cable, fiber-optic, or satellite, and often bundle additional services like email hosting and security.
  • IP address - A unique identifier assigned to devices on a network that use the Internet Protocol for communication. IP addresses can be either IPv4 (e.g., 192.168.1.1) or IPv6 (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334), and they help in routing data packets to the correct destination.
  • MAC address - A hardware-based address assigned to network interfaces by the manufacturer. A MAC address, typically a 48-bit hexadecimal (e.g., 00:1A:2B:3C:4D:5E), ensures device-level identification on local area networks (LAN).
  • DNS (Domain Name System) - A system that translates human-readable domain names (e.g., www.example.com) into IP addresses, enabling users to access resources using easily remembered names rather than numeric addresses.
  • DNS Server - A server that stores and manages DNS records, responding to client requests by translating domain names into corresponding IP addresses, allowing devices to locate and access websites or resources on the internet.
  • WPA2 (Wi-Fi Protected Access 2) - A security protocol designed to secure wireless networks, based on the IEEE 802.11i standard. WPA2 uses advanced encryption methods, such as AES (Advanced Encryption Standard), to provide strong data protection and network security. It replaces the older WPA and WEP protocols, offering improved resistance to unauthorized access and eavesdropping.
  • Standard - A defined set of rules or guidelines established by a recognized authority to ensure consistency and interoperability across devices, systems, or processes.
  • Protocol - A set of rules or conventions that define how data is transmitted and received between devices over a network, ensuring proper communication and data exchange.
  • TCP (Transmission Control Protocol) - A connection-oriented protocol in the transport layer of the Internet Protocol Suite that ensures reliable, ordered, and error-checked delivery of data between devices over a network.
  • UDP (User Datagram Protocol) - A connectionless protocol in the transport layer that provides fast, but unreliable, data transmission without guaranteeing delivery, order, or error-checking.
  • IPv4 (Internet Protocol version 4) - The fourth version of the Internet Protocol, providing an addressing scheme to identify devices on a network and enabling data routing across networks, using 32-bit addresses.
  • IPv6 (Internet Protocol version 6) - The successor to IPv4, designed to provide a larger addressing space with 128-bit addresses, improved security, and better performance for modern networking needs.
  • DHCP (Dynamic Host Configuration Protocol) - A network management protocol that automatically assigns IP addresses and other network configuration parameters to devices, enabling them to communicate on a network.

Types of networks

  • LAN - Local Area Network, a network that connects devices in a limited geographical area, such as a home, office, or building, enabling communication and resource sharing between connected devices.
  • WLAN - Wireless Local Area Network, a type of LAN that uses wireless technology (e.g., Wi-Fi) to connect devices within a limited area without physical cables.
  • WAN - Wide Area Network, a network that spans a large geographical area and connects smaller networks (e.g., LANs), enabling communication and data exchange over long distances, typically via the internet or private connections.
  • VPN - Virtual Private Network, a secure connection that encrypts data and masks the user's IP address, ensuring privacy and security online.
  • VLAN (Virtual Local Area Network) - A technology that creates logically segmented networks within a physical network infrastructure. VLANs enable devices on separate VLANs to act as though they are on different physical networks, even when they share the same physical switches and cabling.
  • P2P - Peer-to-peer network, a type of decentralized network architecture where all devices, or "peers," are equal participants. Unlike traditional client-server models, peers in a peer-to-peer network share resources directly with each other, such as files, processing power, or bandwidth, without relying on a central server. This model is commonly used for file sharing, cryptocurrency networks, and collaborative applications.
  • Internetwork - A collection of interconnected networks that function as a single large network. Internetworking allows communication and data exchange between different networks, often using routing devices and protocols like TCP/IP to bridge various local and wide area networks.

Types of connections

  • Bluetooth - A short-range wireless communication technology that allows devices to exchange data over distances of up to 10 meters. It is widely used for connecting peripherals like headphones, keyboards, and smartwatches to smartphones and computers.
  • Wi-Fi - A wireless networking technology based on the IEEE 802.11 standards (Institute of Electrical and Electronics Engineers). Wi-Fi enables devices to connect to a network and the internet without cables, offering high-speed communication over medium distances (up to several hundred meters). It operates on the 2.4 GHz and 5 GHz frequency bands, with newer standards also utilizing the 6 GHz band for enhanced performance and reduced interference.
  • NFC (Near Field Communication) - A short-range wireless technology that enables devices to exchange data when brought within proximity (typically less than 4 cm). NFC is commonly used for contactless payments, secure authentication, and quick data sharing.
  • GPS (Global Positioning System) - A satellite-based navigation system that provides location, velocity, and time information to GPS receivers. It is widely used in navigation systems, smartphones, and applications like mapping, tracking, and geofencing.

Network devices

  • Router - A networking device that forwards data packets between computer networks. Routers connect devices within a home network to the internet or other networks and determine the best path for data to travel. They often provide features like DHCP (for assigning IP addresses), NAT (Network Address Translation - to allow multiple devices to share a single public IP), and Wi-Fi capabilities. For a secure home network, routers should use strong encryption methods like WPA2/WPA3, and implement firewall protection.
  • Switch - A networking device used to connect multiple wired devices within a local area network (LAN), such as computers, printers, and smart home hubs. Unlike a hub, a switch intelligently directs data to the specific device it is intended for, enhancing speed and reducing congestion. To secure a home network, switches can segment the network into VLANs, isolating devices to reduce the risk of unauthorized access.
  • Modem - A device that modulates and demodulates signals for data transmission over different media, such as telephone lines, cables, or fiber optics. The modem connects the home network to the internet service provider (ISP) and should ideally be connected to a router for additional security features. Using a modem-router combo can simplify setup but may limit advanced configurations.
  • Access point - A device that extends the wireless coverage of a network by creating additional Wi-Fi access points. Access points connect to the router via Ethernet and provide seamless wireless connectivity in areas with weak signals. To maintain security, configure access points with the same encryption standard as the router, use separate SSIDs for guests and main users, and regularly update firmware to protect against vulnerabilities.

A secure home network should connect from the end devices, through an integrated router (firewall, NAT, encryption, guest network), to the modem, and through the ISP to the internetwork.

Types of media

  • Wireless media - Communication technologies that use electromagnetic waves (e.g., radio, infrared, microwave) to transmit data without physical cables. Examples include Wi-Fi (WLAN), cellular networks, and satellite communication, allowing devices to communicate over short and long distances.

  • LAN media - The physical and data transmission methods used in Local Area Networks (LANs). Examples include twisted-pair cables (Ethernet), coaxial cables, and fiber-optic cables for wired communication. LAN media enable fast and reliable data transmission within a small area, such as homes or offices.
    • Category 5e cable - A twisted-pair cable used in networking, supporting high-speed data transmission for LANs. The twist in the pairs reduces electromagnetic interference, ensuring reliable and stable data communication.
    • Coaxial cable - A cable with an inner conductor surrounded by insulation, a metallic shield, and an outer jacket, used for cable TV and internet connections.
    • Fiber-optic cable - A cable that transmits data as light pulses through thin strands of glass or plastic, offering high-speed and long-distance communication with minimal signal loss.

  • WLAN media - The wireless communication technologies used in Wireless Local Area Networks (WLANs). WLAN media primarily rely on radio frequency (RF) waves, such as those used in Wi-Fi (802.11 standards), enabling high-speed, cable-free communication within a limited area.

Throughput VS Bandwidth

Bandwidth refers to the maximum theoretical capacity of a network link to transmit data, often expressed in bits per second (bps). It represents the upper limit of data transfer speed that a network can handle. Throughput, on the other hand, is the actual rate at which data is successfully transmitted over the network. While bandwidth is the potential capacity, throughput reflects real-world performance, which can be influenced by factors such as network congestion, signal interference, and protocol overhead. Therefore, while a network may have high bandwidth, its throughput may be lower due to these limiting factors.

Intermediary VS end devices

End devices are the final recipients or senders of data in a network. These devices, such as smartphones, computers, and printers, interact directly with users or applications. Intermediary devices, on the other hand, help route, manage, or secure data as it travels through the network. These include routers, switches, firewalls, and gateways, which ensure that data is correctly directed and securely transmitted between end devices. While end devices facilitate user interaction, intermediary devices ensure data reaches its destination efficiently and securely.

Cellular VS Wi-Fi

Cellular and Wi-Fi are two different methods for providing wireless internet connectivity. Cellular networks use mobile towers and base stations to provide internet access over long distances, often through data plans provided by telecom companies. Cellular networks support mobility and allow devices to stay connected while moving. Wi-Fi, on the other hand, is a short-range wireless network typically set up in homes, offices, and public places using routers and access points. It provides high-speed internet within a local area but requires the device to be within the coverage area of a Wi-Fi access point. While cellular is more mobile, Wi-Fi tends to offer higher speeds and lower latency in stationary setups.

Localhost VS 127.0.0.1

Both localhost and 127.0.0.1 refer to the loopback address used for testing network services on the local machine. The key difference lies in their resolution: localhost is a hostname that resolves to the loopback address (typically 127.0.0.1) via the system's DNS or host's file, while 127.0.0.1 is the numeric IP address directly associated with the loopback interface. Though functionally similar, localhost depends on the correct hostname resolution, whereas 127.0.0.1 directly bypasses this, making it more reliable in certain misconfigured environments.

Standards organizations

  • IEEE (Institute of Electrical and Electronics Engineers) - Develops global standards for technologies such as networking, telecommunications, and electronics, including the widely used IEEE 802 standards for LANs and wireless networks.
  • IETF (Internet Engineering Task Force) - Focuses on the development and promotion of voluntary Internet standards, including protocols like HTTP, TCP/IP, and DNS, to ensure interoperability across the Internet.
  • ISO (International Organization for Standardization) - Establishes international standards across various industries to ensure quality, safety, efficiency, and interoperability, including the OSI model for networking.

The OSI model

The OSI (Open Systems Interconnection) model is a conceptual framework used to understand and implement networking protocols in seven layers. Each layer has a distinct function and interacts with the layers above and below it, ensuring standardization in communication across diverse systems.

  • Layer 7: Application Layer - The topmost layer that provides user interfaces and directly interacts with software applications. Examples include HTTP (web browsing), SMTP (email), and FTP (file transfer).
  • Layer 6: Presentation Layer - Handles data translation, encryption, and compression, ensuring data is in a readable format for the application layer. Examples include JPEG (image formatting) and SSL/TLS (encryption).
  • Layer 5: Session Layer - Manages sessions between applications by establishing, maintaining, and terminating communication sessions. Protocols include NetBIOS and PPTP.
  • Layer 4: Transport Layer - Ensures reliable data transfer, error recovery, and flow control between devices. Key protocols are TCP (reliable) and UDP (fast but unreliable).
  • Layer 3: Network Layer - Determines how data packets are routed between devices using logical addressing (e.g., IP addresses). Key protocols include IPv4, IPv6, and ICMP.
  • Layer 2: Data Link Layer - Facilitates node-to-node data transfer and handles physical addressing (MAC addresses) and error detection. Technologies include Ethernet, PPP, and Wi-Fi (MAC layer).
  • Layer 1: Physical Layer - The foundation of the model, defining the physical medium, hardware, and signals for data transmission. Examples include twisted-pair cables, fiber optics, and radio frequencies.

The OSI model standardizes networking protocols, simplifies troubleshooting, and enhances interoperability across diverse hardware and software systems. Modern networks use protocols from the OSI model, such as TCP/IP, which correspond to specific layers, ensuring efficient communication and data exchange.

The TCP/IP model, also known as the Internet Protocol Suite, is a widely used framework for networking that emphasizes real-world protocol implementation. Unlike the OSI model's seven layers, the TCP/IP model consists of four layers: Application, Transport, Internet, and Network Access. The TCP/IP model focuses on real-world protocol implementation and combines certain OSI layers, such as Presentation and Session, into the Application layer. While the OSI model is ideal for understanding networking concepts, the TCP/IP model is the foundation of modern Internet communication, emphasizing simplicity and efficiency in real-world applications.

The layers of the OSI model correspond to those in the TCP/IP model as follows:

  • Application Layer (TCP/IP) - This layer combines the OSI model's Application, Presentation, and Session layers, handling high-level protocols, data formatting, encryption, and session management. Protocols like HTTP, FTP, SMTP, and DNS operate at this layer.
  • Transport Layer (TCP/IP) - Corresponding to the OSI's Transport Layer, this layer ensures reliable or fast data delivery through protocols like TCP (reliable) and UDP (unreliable but fast).
  • Internet Layer (TCP/IP) - Equivalent to the OSI's Network Layer, this layer is responsible for logical addressing, routing, and packet forwarding. Protocols such as IPv4, IPv6, and ICMP function here.
  • Network Access Layer (TCP/IP) - This layer combines the OSI's Data Link and Physical layers. It manages hardware addressing, error detection, and the physical transmission of data over the network medium, utilizing technologies like Ethernet, Wi-Fi, and PPP.

The Access Layer

The access layer is the foundational layer in a hierarchical network design, responsible for connecting end devices such as computers, printers, and IoT devices to the network. It provides wired and wireless connectivity using technologies like Ethernet cables and Wi-Fi while managing traffic through features like VLANs (Virtual LANs) to enhance performance and security. This layer enforces access control mechanisms, such as authentication protocols (e.g., 802.1X) and access control lists (ACLs), to ensure secure and controlled network access. Common devices in the access layer include switches, which facilitate device connectivity and support features like QoS (Quality of Service), and wireless access points (APs) that provide cable-free connectivity for mobile and stationary devices. The access layer plays a crucial role in delivering secure, efficient, and reliable network access, forming the backbone of user connectivity in modern network designs.

  • 802.1 - A set of IEEE standards that define network architecture and protocols for Local Area Networks (LANs) and Virtual LANs (VLANs), focusing on network access and management.
  • CRC (Cyclic Redundancy Check) - A method used to detect errors in data by applying a polynomial division algorithm, ensuring data integrity during transmission.
  • Ethernet frame - A data packet used in Ethernet networks to transmit data between devices. It consists of several fields, including the destination and source MAC addresses, the Ethertype field (indicating the protocol used in the payload, such as IPv4 or ARP), the payload (the actual data being transmitted), and the Frame Check Sequence (FCS) for error detection. The frame's structure ensures that data is delivered accurately and efficiently across a network, with error checking and addressing mechanisms that allow devices to communicate within a Local Area Network (LAN).
  • FCS (Frame Check Sequence) - A field in Ethernet frames that contains a CRC value used for error detection, verifying the integrity of the transmitted data frame.