Computer Networks Cheat Sheet

Overview & Basics

Computer networks consist of many end systems, such as phones and laptops, connected by switches and links. These switches look only at MAC addresses and not IP addresses.

Internet: The Internet ties together different networks using the IP protocol, uniting upper-layer protocols (e.g., HTTP, SMTP) with lower layers (e.g., Ethernet).

Switched Networks

End systems and networks are connected by switches instead of direct connections, allowing scalability.

Shared Networks

Multiple communications use the same path, requiring efficient sharing techniques like statistical multiplexing.

Network Performance Metrics

Key metrics for evaluating network performance include:

Communication Organization

Layered Protocols

Applications are built on reliable (TCP) or unreliable (UDP) transport, which relies on best-effort packet delivery at the network layer.

Basic Queueing Theory

Little's Law: The average number of packets in a queuing system is equal to the arrival rate multiplied by the average waiting time.

Protocol Layers & The Internet Protocol Stack

Application Layer

The application layer enables network applications to communicate over the Internet. Examples include HTTP (for web browsing), SMTP (for email), and FTP (for file transfer).

Transport Layer

The transport layer provides communication services directly to the application processes running on different hosts. Key protocols include TCP (reliable, connection-oriented) and UDP (unreliable, connectionless).

Network Layer

The network layer is responsible for moving packets between any two hosts across multiple networks. It includes the IP protocol, which defines addressing and routing for packets.

Link Layer

The link layer transfers data between adjacent network nodes in a wide area network or between nodes on the same local area network. It includes protocols like Ethernet and Wi-Fi.

Physical Layer

The physical layer is concerned with the transmission of raw data over a physical medium, including electrical signals, light pulses, or radio waves.

Data Link Layer Protocols

MAC Addressing

MAC addresses are unique identifiers assigned to network interfaces for communications at the data link layer. MAC addresses are used for hardware addressing within a network segment.

Ethernet

Ethernet is a widely used link layer protocol in LANs, characterized by its use of MAC addressing and the CSMA/CD (Carrier Sense Multiple Access with Collision Detection) method for managing access to the shared medium.

Wi-Fi

Wi-Fi is a family of wireless networking protocols based on the IEEE 802.11 standards. It enables devices to connect to a network without physical cables, using radio waves for communication.

Network Layer Protocols

IPv4

IPv4 is the fourth version of the Internet Protocol, which is widely used to identify devices on a network through an addressing system. It uses a 32-bit address space, allowing for over 4 billion unique addresses.

IPv6

IPv6 is the most recent version of the Internet Protocol, designed to replace IPv4. It uses a 128-bit address space, greatly expanding the number of possible IP addresses.

Routing

Routing is the process of selecting paths in a network along which to send data packets. Routers use routing tables and algorithms like OSPF (Open Shortest Path First) and BGP (Border Gateway Protocol) to determine the best path for data.

Transport Layer Protocols

TCP (Transmission Control Protocol)

TCP is a connection-oriented protocol that provides reliable, ordered, and error-checked delivery of a stream of data between applications running on hosts in an IP network.

UDP (User Datagram Protocol)

UDP is a connectionless protocol that provides a lightweight, unreliable service for sending messages between applications. It is used when speed is more critical than reliability.

Congestion Control

Congestion control refers to the mechanisms and techniques used to prevent network congestion by controlling the rate of data entering the network.

Application Layer Protocols

HTTP (Hypertext Transfer Protocol)

HTTP is the protocol used for transferring web pages on the Internet. It operates over TCP and follows a request-response model.

DNS (Domain Name System)

DNS is the protocol that translates human-readable domain names (e.g., www.example.com) into IP addresses that computers can understand.

SMTP (Simple Mail Transfer Protocol)

SMTP is the protocol used to send and receive email over the Internet. It operates over TCP and is responsible for the transmission of email messages between servers.

Network Security

Encryption

Encryption is the process of converting data into a code to prevent unauthorized access. It is a key component of network security, ensuring that sensitive information is protected during transmission.

Firewalls

A firewall is a network security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules.

Intrusion Detection Systems (IDS)

IDS is a system that monitors network traffic for suspicious activity and potential threats.

Virtual Private Networks (VPN)

A VPN creates a secure, encrypted connection over a less secure network, such as the internet, allowing remote users to securely access a private network.

Access Control

Access control is the process of determining who is allowed to access and use network resources. It ensures that only authorized users can access sensitive information and systems.

Secure Sockets Layer (SSL) / Transport Layer Security (TLS)

SSL and TLS are cryptographic protocols that provide secure communication over a network. They are widely used to secure HTTP traffic on the Internet (HTTPS).

Public Key Infrastructure (PKI)

PKI is a framework used to create, manage, distribute, and revoke digital certificates, which are used to secure communications and authenticate identities in a network.

Wireless Networking

Wi-Fi (802.11)

Wi-Fi is a family of wireless networking technologies based on the IEEE 802.11 standards. It allows devices to connect to a network wirelessly within a limited range.

Bluetooth

Bluetooth is a short-range wireless communication technology used for exchanging data between devices over short distances.

Cellular Networks

Cellular networks provide wireless communication over large geographic areas through a network of base stations (cell towers).

Zigbee and Z-Wave

Zigbee and Z-Wave are low-power, low-data-rate wireless communication protocols commonly used in home automation and IoT (Internet of Things) devices.

Routing Protocols

Distance Vector Routing

Distance vector routing protocols determine the best path to a destination based on distance metrics, typically the number of hops. Routers share information with their immediate neighbors.

Link State Routing

Link state routing protocols build a complete map of the network by sharing link state information with all routers in the network. Routers independently calculate the shortest path to each destination using algorithms like Dijkstra's algorithm.

Path Vector Routing

Path vector routing protocols are used in inter-domain routing to manage routing between different autonomous systems (ASes). They maintain the path information that gets updated as it passes through the network.

Network Address Translation (NAT)

Basic NAT

Network Address Translation (NAT) allows multiple devices on a local network to share a single public IP address. NAT modifies the IP address information in packet headers as they pass through a router.

NAT Traversal

NAT traversal techniques are used to allow communication between devices behind NAT routers and external devices. Common techniques include STUN (Session Traversal Utilities for NAT) and TURN (Traversal Using Relays around NAT).

Quality of Service (QoS)

QoS Mechanisms

Quality of Service (QoS) refers to the techniques used to manage network resources and ensure the performance of critical applications. QoS mechanisms include:

Common QoS Models

There are two primary models for implementing QoS in networks:

Peer-to-Peer (P2P) Networking

P2P Architecture

In a Peer-to-Peer (P2P) network, nodes (peers) act as both clients and servers, sharing resources directly with each other without relying on a central server.

P2P Protocols

P2P protocols enable peers to discover each other, exchange data, and manage resources. Key P2P protocols include:

Mobile and Wireless Networking

Mobile IP

Mobile IP is a protocol that allows mobile devices to move across different networks while maintaining a permanent IP address.

Handoff

Handoff refers to the process of transferring an active call or data session from one cell to another as a user moves through a cellular network.

Ad Hoc Networks

An ad hoc network is a decentralized wireless network where each node can communicate directly with other nodes without relying on a fixed infrastructure like routers or access points.

WiMAX

WiMAX (Worldwide Interoperability for Microwave Access) is a wireless communication standard designed to provide high-speed data over long distances, typically as an alternative to cable or DSL for broadband Internet access.

LTE (Long Term Evolution)

LTE is a standard for wireless broadband communication, offering high-speed data for mobile phones and data terminals.

Internet of Things (IoT)

IoT Architecture

The Internet of Things (IoT) refers to the network of physical objects embedded with sensors, software, and connectivity, enabling them to collect and exchange data.

IoT Protocols

IoT protocols enable communication between IoT devices and cloud services. Key protocols include:

IoT Security

Security is a critical concern in IoT networks due to the vast number of connected devices and the sensitivity of the data they collect.

Cloud Computing

Cloud Service Models

Cloud computing provides on-demand availability of computer system resources, including data storage and computing power, without direct active management by the user.

Cloud Deployment Models

Cloud deployment models describe the specific environment and configuration of cloud infrastructure.

Virtualization

Virtualization is the process of creating a virtual version of something, such as an operating system, a server, a storage device, or network resources.

Cloud Storage

Cloud storage allows data to be stored and accessed over the internet, eliminating the need for physical storage devices on-site.

Cloud Networking

Cloud networking involves the use of cloud resources to manage, store, and deliver network services and resources, such as virtual routers, firewalls, and load balancers.

Software-Defined Networking (SDN)

SDN Architecture

Software-Defined Networking (SDN) is an approach to networking that uses software-based controllers or APIs to direct traffic on the network and manage network resources.

SDN Protocols

SDN protocols are used to communicate between the control plane and the data plane.

SDN Use Cases

SDN is used in various scenarios to improve network management and operations.

Network Management

Network Monitoring

Network monitoring is the process of observing and analyzing the performance and availability of network components to ensure optimal operation.

Configuration Management

Configuration management involves maintaining and managing the configuration of network devices, including routers, switches, and firewalls, to ensure they operate efficiently.

Fault Management

Fault management is the process of detecting, isolating, and resolving faults in the network to minimize downtime and maintain network availability.

Performance Management

Performance management involves monitoring and analyzing the performance of network components to ensure they meet the required service levels.

Security Management

Security management involves protecting the network from unauthorized access, attacks, and breaches to maintain the confidentiality, integrity, and availability of network resources.

Network Virtualization

Virtual LANs (VLANs)

VLANs are used to segment a physical network into multiple logical networks, allowing devices to communicate as if they were on the same physical network while being separated from other VLANs.

Virtual Private Networks (VPNs)

VPNs extend a private network across a public network, enabling users to securely connect to the private network from remote locations.

Software-Defined WAN (SD-WAN)

SD-WAN is an application of software-defined networking (SDN) that optimizes the management and operation of a wide area network (WAN) by decoupling the networking hardware from its control mechanism.

Network Design and Architecture

Hierarchical Network Design

Hierarchical network design is a model that divides the network into three layers: core, distribution, and access. Each layer has a specific role and responsibilities.

Flat Network Design

Flat network design is a simple design where all devices are connected to a single network segment. There is no hierarchical structure, and all devices share the same broadcast domain.

Network Topologies

Network topology refers to the arrangement of different elements (links, nodes, etc.) in a computer network. The most common topologies include:

Redundant Network Design

Redundant network design involves creating multiple pathways for data to travel through the network, ensuring that the network remains operational even if one path fails.

Network Troubleshooting

Basic Troubleshooting Steps

Effective network troubleshooting involves a systematic approach to identify and resolve network issues. Basic troubleshooting steps include:

Common Network Issues

Network issues can arise from a variety of sources. Some common network issues include:

Network Diagnostic Tools

There are several tools available to assist with network troubleshooting:

Network Protocols

TCP/IP Protocol Suite

The TCP/IP protocol suite is the foundation of the Internet and includes several key protocols that work together to enable communication across networks.

HTTP/HTTPS

HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) are protocols used for transmitting web pages and data over the Internet.

DNS (Domain Name System)

DNS is the protocol that translates human-readable domain names (e.g., www.example.com) into IP addresses that computers can understand.

FTP (File Transfer Protocol)

FTP is a standard network protocol used for transferring files between a client and a server on a computer network.

SMTP/POP3/IMAP

These protocols are used for sending and receiving email over the Internet.

DHCP (Dynamic Host Configuration Protocol)

DHCP is a network management protocol used to dynamically assign IP addresses and other network configuration parameters to devices on a network.

NTP (Network Time Protocol)

NTP is a protocol used to synchronize the clocks of computers on a network to a common time source.

Wireless Security

WEP (Wired Equivalent Privacy)

WEP is an outdated wireless security protocol that was designed to provide a level of security comparable to a wired network. It uses a static key for encryption, which has been found to be vulnerable to several types of attacks.

WPA/WPA2 (Wi-Fi Protected Access)

WPA and WPA2 are security protocols developed to address the weaknesses of WEP. They provide stronger encryption and better authentication methods for wireless networks.

Wireless Access Control

Wireless access control measures help secure a wireless network by restricting access to authorized users and devices.

Wireless Intrusion Detection Systems (WIDS)

WIDS are systems specifically designed to detect unauthorized access to a wireless network and monitor wireless traffic for suspicious activities.

Best Practices for Securing Wireless Networks

Securing a wireless network involves implementing a combination of security protocols, encryption, and access control measures.

Emerging Network Technologies

5G Networks

5G is the fifth generation of mobile networks, offering faster speeds, lower latency, and more reliable connections compared to previous generations. It is designed to connect not just smartphones but also a wide range of devices in the IoT ecosystem.

Software-Defined Networking (SDN)

SDN is an approach to networking that uses software-based controllers or application programming interfaces (APIs) to direct traffic on the network and manage network resources. It decouples the control plane from the data plane, allowing for more flexible and efficient network management.

Network Function Virtualization (NFV)

NFV is a network architecture concept that uses virtualization technologies to manage and deploy network functions, such as firewalls, load balancers, and routers, as software-based applications running on standard hardware.

Edge Computing

Edge computing is a distributed computing paradigm that brings computation and data storage closer to the location where it is needed, reducing latency and bandwidth use.

Blockchain for Networking

Blockchain technology, known for its use in cryptocurrencies, is being explored for various networking applications, particularly for enhancing security, transparency, and trust in decentralized networks.

Quantum Networking

Quantum networking is an emerging field that applies the principles of quantum mechanics to networking and communication, offering unprecedented levels of security and computational power.