Computer Networks Cheatsheet - Part 1

Computer Networks Cheatsheet - Part 1

1. Introduction to Computer Networks

1.1 Definition

A computer network is a collection of interconnected devices (computers, servers, network devices) that communicate and share resources.

1.2 Importance

  • Resource Sharing: Enables sharing of resources such as printers, files, and internet connections.
  • Communication: Facilitates communication through emails, instant messaging, and video conferencing.
  • Data Exchange: Allows for the exchange of data and information between devices.

1.3 Types of Networks

  • LAN (Local Area Network): Covers a small geographic area like a home, office, or building. Example: Office network.
  • WAN (Wide Area Network): Covers a large geographic area and often connects multiple LANs. Example: The internet.
  • MAN (Metropolitan Area Network): Spans a city or a large campus. Example: City-wide Wi-Fi.
  • PAN (Personal Area Network): Covers a very small area, typically a few meters. Example: Bluetooth devices.

2. Network Topologies

2.1 Bus Topology

All devices are connected to a single central cable, called the bus. Data sent from one device travels to all devices on the network.

2.2 Star Topology

All devices are connected to a central hub or switch. Data sent from one device is forwarded to the destination device by the central hub.

2.3 Ring Topology

Each device is connected to two other devices, forming a circular data path. Data travels in one direction around the ring.

2.4 Mesh Topology

Every device is connected to every other device. Provides high redundancy and reliability but is expensive and complex to install.

2.5 Hybrid Topology

Combines two or more different topologies. Example: A large network that uses star topology within individual departments and connects these stars using a bus topology.

3. Network Models

3.1 OSI Model

The Open Systems Interconnection (OSI) model is a conceptual framework used to understand and implement network protocols in seven layers.

Layers:

  1. Physical Layer: Deals with the physical connection between devices and the transmission of binary data.
  2. Data Link Layer: Provides node-to-node data transfer and handles error correction from the physical layer.
  3. Network Layer: Manages data routing, packet forwarding, and addressing. Example: IP.
  4. Transport Layer: Ensures complete data transfer and error recovery. Example: TCP, UDP.
  5. Session Layer: Manages sessions and connections between applications.
  6. Presentation Layer: Ensures that data is in a usable format and is where data encryption occurs.
  7. Application Layer: Provides network services directly to end-users. Example: HTTP, FTP.

3.2 TCP/IP Model

The TCP/IP model is a simpler four-layer model used as the foundation for the internet.

Layers:

  1. Link Layer: Corresponds to the OSI physical and data link layers.
  2. Internet Layer: Corresponds to the OSI network layer.
  3. Transport Layer: Corresponds to the OSI transport layer.
  4. Application Layer: Corresponds to the OSI session, presentation, and application layers.

4. Networking Devices

4.1 Router

A router is a device that forwards data packets between computer networks, directing the data along the most efficient routes.

4.2 Switch

A switch connects devices within a single network, using MAC addresses to forward data to the correct device.

4.3 Hub

A hub is a basic networking device that connects multiple devices in a network and broadcasts data to all devices.

4.4 Modem

A modem modulates and demodulates signals for data transmission over telephone lines or cable.

4.5 Access Point

An access point is a device that allows wireless devices to connect to a wired network using Wi-Fi.

5. Network Protocols

5.1 HTTP/HTTPS

  • HTTP (HyperText Transfer Protocol): Used for transmitting web pages over the internet.
  • HTTPS (HTTP Secure): A secure version of HTTP that uses SSL/TLS to encrypt data.

5.2 FTP

FTP (File Transfer Protocol): Used for transferring files between computers on a network.

5.3 SMTP

SMTP (Simple Mail Transfer Protocol): Used for sending emails.

5.4 DNS

DNS (Domain Name System): Translates domain names to IP addresses.

5.5 DHCP

DHCP (Dynamic Host Configuration Protocol): Assigns IP addresses to devices on a network.

6. IP Addressing

6.1 IPv4

IPv4 uses a 32-bit address scheme allowing for 4.3 billion unique addresses, formatted as four decimal numbers separated by periods (e.g., 192.168.0.1).

6.2 IPv6

IPv6 uses a 128-bit address scheme allowing for a vastly larger number of unique addresses, formatted as eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

6.3 Subnetting

Subnetting divides a large network into smaller, more efficient subnetworks. It helps in better IP address management and improves security.

Comments (0)