Understanding Computer Networks: Communication Structures, Protocols, and Design

Communication Structures

Key Elements:

  • Naming and Name Resolution: Identifies processes with host and process IDs, utilizing DNS.
  • Routing Strategies:
    • Fixed Routing: Predefined path from source to destination.
    • Virtual Circuit: Fixed path for a single session.
    • Dynamic Routing: Path determined at the time of message sending.
  • Connection Strategies:
    • Circuit Switching: Dedicated physical link for the duration of communication (e.g., mobile phones).
    • Message Switching: Temporary link for a single message transfer (e.g., post office).
    • Packet Switching: Messages divided into fixed-length packets for transmission.
  • Contention: Techniques to manage simultaneous transmission requests:
    • CSMA/CD (Collision Detection): Used in Ethernet to avoid collisions.
    • Token Passing: A unique token circulates, granting transmission rights.
    • Message Slots: Fixed-length slots circulate for message transmission.

OSI Protocol Layers

  • Physical Layer: Handles mechanical and electrical aspects of bit stream transmission (e.g., IEEE 802.11, Bluetooth).
  • Data Link Layer: Manages frames, including error detection and recovery (e.g., Ethernet).
  • Network Layer: Provides connections, routes packets, and maintains routing information.
  • Transport Layer: Responsible for low-level network access, message transfer, packet partitioning, order maintenance, flow control, and address generation.
  • Session Layer: Implements session and process-to-process communication protocols.
  • Presentation Layer: Resolves format differences among network sites (e.g., character conversions).
  • Application Layer: Interacts directly with users, handling file transfer, remote login, and email.

Failure Detection and Reconfiguration

Failure Detection:

Detecting hardware failures can be challenging. Handshaking protocols can be used to identify link failures. Types of failures include site outages, link failures, and message loss. Determining the exact cause of failure can be difficult.

Reconfiguration:

Upon link failure, a broadcast is sent to all nodes. If a site is down, all nodes are notified about the unavailable services.

Design Issues

  • Transparency: The distributed system should appear as a centralized system to users.
  • Fault Tolerance: The system should continue functioning despite failures.
  • Scalability: The system should accommodate the addition of resources to meet increasing demands.
  • Clusters: Collections of semi-autonomous machines acting as a single system.

Ethernet Packet Structure

  • Preamble: Synchronizes transmission rate.
  • MAC Addresses: Unique identifiers for source and destination.
  • Frame Type: Indicates the protocol carried (e.g., IPv4, IPv6).
  • Message Data: Payload of the packet.

Internet Architecture

Composed of LANs and routers/gateways. Each host has a unique IP address.

Internet Addresses

  • IP Addresses: Consist of network and host parts (Classless Inter-Domain Routing).
  • Special Addresses:
    • Network Address: Host part is 0.
    • Broadcast Address: Host part is all 1s.
    • Loopback Address: 127.0.0.1
    • Private Addresses: Ranges reserved for private networks.
    • Multicast Addresses: Used for group communication.
  • IPv4 vs. IPv6: IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses for greater address space.

IP Datagram

The internet provides a best-effort delivery system for datagrams. Each datagram has a header with fields such as version, header length, total length, source and destination IP addresses, protocol, flags, fragment offset, time to live (TTL), and service type.

Datagram Fragmentation

When a datagram exceeds the Maximum Transmission Unit (MTU) of a network, it is fragmented. Fragmentation can occur at any point during transmission. The destination host reassembles the fragments using the total length and fragment offset fields. The “more fragments” flag indicates if additional fragments are expected.