Computer Networking Fundamentals: Protocols and Security

Unit 1: Basics and Topology

Computer Network

A computer network is a system of interconnected devices that communicate and share data using communication protocols.


Basic Terms

  • Node: Any device connected in a network.
  • Protocol: Rules for communication (e.g., TCP/IP, HTTP).
  • IP Address: Unique number assigned to each device.
  • DNS: Converts domain names into IP addresses.
  • Firewall: Protects the network from unauthorized access.

Types of Networks

  • PAN: Connects personal devices within a short range.
  • LAN: Small area network with high speed and low cost.
  • MAN: Covers a city or large campus.
  • WAN: Covers large geographical areas (e.g., the Internet).
  • CAN: Used in institutions like universities.
  • VPN: Secure connection over public networks.

Internet vs. Intranet

  • Internet: Public, global, and less secure.
  • Intranet: Private, restricted, and secure.

Network Topologies

  • Bus: Single cable connects all devices. Cheap, but failure affects the entire network.
  • Star: All devices connect to a central switch. Reliable, but expensive.
  • Ring: Devices connected in a circular form. No collision, but failure affects the whole network.
  • Mesh: Every device connects to every other device. Very reliable, but costly.
  • Tree: Hierarchical structure combining star and bus. Scalable, but dependent on the parent node.
  • Hybrid: Combination of multiple topologies. Flexible, but complex.

Unit 2: Data Link Layer

Data Link Layer

The second layer of the OSI model that provides node-to-node communication and ensures error-free transmission.


Functions

  • Framing: Converts data into frames.
  • Error Detection: Finds errors in transmission.
  • Error Correction: Fixes errors using retransmission.
  • Flow Control: Controls the speed of data transfer.
  • Addressing: Uses MAC addresses.

Error Detection Techniques

  • Parity Check: Adds one bit to make the number of 1s even or odd.
  • VRC: Row-wise parity; detects single-bit errors.
  • LRC: Column-wise parity; improves detection.
  • Checksum: Sum of data is calculated and compared.
  • CRC: Uses polynomial division; the most reliable method.

Error Correction

ARQ (Automatic Repeat Request):

  • Stop-and-Wait: Send one frame, wait for ACK.
  • Go-Back-N: Resend multiple frames if an error occurs.
  • Selective Repeat: Resend only error frames.

Hamming Code:

  • Corrects single-bit errors.
  • Detects two-bit errors.
  • Condition: 2^r ≄ k + r + 1.

Flow Control

  • Stop-and-Wait: Simple but slow.
  • Sliding Window: Sends multiple frames; more efficient.

Addressing

  • Uses MAC address (physical address).
  • Main device: Switch.

Unit 3: Network Layer

Networking Devices

  • Repeater: Regenerates weak signals to extend distance.
  • Bridge: Divides network into segments and filters traffic.
  • Router: Finds the best path for data between networks.
  • Gateway: Converts protocols between different networks.

Routing

  • Non-adaptive: Fixed path.
  • Adaptive: Path changes based on network conditions.

IP Addressing

  • IPv4: 32-bit address, limited space.
  • IPv6: 128-bit address, large space.

Classful Addressing

  • Class A: Large networks.
  • Class B: Medium networks.
  • Class C: Small networks.
  • Class D: Multicast.
  • Class E: Reserved.

CIDR and Subnetting

  • CIDR: Uses ā€œ/nā€ notation to represent the network mask.
  • Subnetting: Dividing a large network into smaller networks.
  • Supernetting: Combining multiple smaller networks into a larger one.

Unit 4: Transport and Application

Transport Layer

Provides end-to-end communication between sender and receiver.


Functions

  • Segmentation and reassembly.
  • Error control.
  • Flow control.
  • Congestion control.
  • Multiplexing using port numbers.

Protocols

  • TCP: Reliable, connection-oriented, ensures ordered delivery.
  • UDP: Fast, connectionless, no guarantee of delivery.

Congestion Control

  • Leaky Bucket: Sends data at a fixed rate; drops excess.
  • Token Bucket: Uses tokens; allows burst transmission.

Quality of Service (QoS)

  • Bandwidth: Capacity.
  • Throughput: Actual speed.
  • Latency: Delay.
  • Jitter: Variation in delay.
  • Packet Loss: Lost data.

Application Layer

Provides services directly to users:

  • HTTP: Web browsing.
  • FTP: File transfer.
  • SMTP: Email.
  • DNS: Name resolution.

Remote Login

Access remote systems using Telnet or SSH.


Unit 5: Security and Cryptography

Network Security

Protects data and systems from unauthorized access.


CIA Triangle

  • Confidentiality: Prevents unauthorized access.
  • Integrity: Ensures data accuracy.
  • Availability: Ensures data access.

Security Attacks

Passive Attacks: Eavesdropping, Sniffing.
Active Attacks: Data modification, Masquerade, DoS attack.


Cryptography

Technique to secure data by converting it into an unreadable form.

  • Plaintext: Original message.
  • Ciphertext: Encrypted message.
  • Key: Used for encryption.

Types of Cryptography

  • Symmetric Key: Same key used; fast.
  • Asymmetric Key: Public and private key; more secure.

Ciphers

  • Substitution Cipher: Replaces characters.
  • Transposition Cipher: Rearranges characters.