Unit 1: Introduction and Network Models

CSE306 — Computer Networks 10 min read

I. Foundations of Computer Networking

A computer network is a collection of autonomous computing devices connected through communication links so that they can exchange data and share resources. Modern networking developed from packet-switching research in the 1960s; ARPANET began operation in 1969, and the Internet adopted TCP/IP on 1 January 1983.

  • Core purpose: Networks support communication, resource sharing, remote access, distributed processing, reliability, and centralized administration.
  • Communicating entities: Hosts such as computers, phones, servers, sensors, and printers exchange data through intermediary devices such as switches and routers.
  • Transmission media: Data travels through guided media—twisted-pair cable, coaxial cable, and optical fiber—or unguided media such as radio, microwave, and infrared.
  • Packet switching: A message is divided into smaller units called packets, which may share communication links with packets from other users.
  • Addressing: Identifiers locate communication endpoints; examples include a 48-bit Ethernet MAC address, a 32-bit IPv4 address, and a 16-bit TCP or UDP port number.
  • Performance measures:
    • Bandwidth: Maximum link capacity, commonly measured in bit/s.
    • Throughput: Actual rate of successful data transfer.
    • Latency: Total delay, including transmission, propagation, processing, and queuing delays.
  • Standards: Organizations such as IEEE, ISO, IETF, and ITU-T define interoperable technologies and protocols.

II. Network Fundamentals — Scope, Structure, and Physical Form

A. Introduction to Computer Networks

Computer networking enables independent devices to communicate according to agreed rules over a shared or dedicated medium.

  • Data communication components: A communication system requires a sender, receiver, message, transmission medium, and protocol; for example, a browser sends an HTTP request to a web server through an IP network.
  • Resource sharing: Multiple users may access a file server, network printer, database, or Internet connection.
  • Communication services: Networks provide email, web access, video conferencing, voice over IP, instant messaging, and cloud computing.
  • Reliability: Alternative routes and replicated servers can preserve service after a link or system failure.
  • Network criteria:
    • Performance: Assessed through throughput, delay, response time, and packet loss.
    • Reliability: Measured by failure frequency, recovery time, and resilience.
    • Security: Requires confidentiality, integrity, authentication, and availability.
  • Basic communication modes: Simplex is one-way, half-duplex alternates direction, and full-duplex permits simultaneous two-way transfer.

B. Networks and Types

Networks are commonly classified by geographical coverage, ownership, purpose, and method of access.

  • Personal Area Network (PAN): Covers a few metres around an individual; Bluetooth communication between a phone and wireless earphones is a typical example.
  • Local Area Network (LAN): Connects devices within a home, office, laboratory, or building, commonly using Ethernet or Wi-Fi.
  • Campus Area Network (CAN): Interconnects several LANs across an institution such as a university or industrial site.
  • Metropolitan Area Network (MAN): Extends across a city; a municipal fiber network is an example.
  • Wide Area Network (WAN): Covers countries or continents through leased lines, carrier infrastructure, microwave, satellite, or fiber links.
  • Internet: A global “network of networks” that communicates through the TCP/IP protocol suite.
  • Intranet and extranet:
    1. Intranet: A private organizational network available to authorized internal users.
    2. Extranet: Provides controlled intranet access to external partners or customers.
  • Peer-to-peer and client-server:
    1. Peer-to-peer: Hosts can supply and consume resources directly; it is simple but difficult to manage at scale.
    2. Client-server: Dedicated servers provide services to requesting clients, enabling centralized security and administration.

C. Network hardware architecture

Network hardware architecture describes how hosts, communication links, interfaces, and intermediary devices are physically organized.

  • End systems: Clients and servers run user applications; a laptop with an Ethernet or Wi-Fi network interface card is an end system.
  • Intermediary systems: Repeaters regenerate signals, bridges and switches connect LAN segments, and routers connect different IP networks.
  • Links:
    • Point-to-point: A dedicated connection joins exactly two devices.
    • Broadcast: Multiple devices share one communication channel.
  • Wired media: Cat 6 twisted-pair Ethernet commonly supports 1 Gbit/s, while optical fiber provides greater capacity and resistance to electromagnetic interference.
  • Wireless media: IEEE 802.11 Wi-Fi uses radio waves, allowing mobility but introducing interference and shared-medium contention.
  • Packet path: A typical Internet path is:
TEXT
Host → Access switch → Default router → ISP routers → Destination network → Server
  • Design concerns: Cost, port density, distance, fault tolerance, capacity, scalability, and physical security influence hardware selection.

D. Network topologies

A network topology defines the physical or logical arrangement of nodes and communication links.

  • Bus topology: All devices share a backbone cable; it uses little cable, but a backbone fault can disrupt the entire network.
  • Star topology: Every node connects to a central switch or hub; one link failure affects one node, while central-device failure affects all nodes.
  • Ring topology: Each node connects to two neighbours, forming a loop; data may circulate in one direction or both directions.
  • Mesh topology: Nodes have multiple interconnections, providing alternative paths and strong fault tolerance at high cost.
  • Tree topology: Hierarchical stars connect through a backbone, matching the access–distribution–core structure used in larger LANs.
  • Hybrid topology: Combines forms, such as several star LANs connected through a partial mesh.
  • Full-mesh link count: For (n) nodes, the required number of bidirectional links is:
TEXT
L = n(n − 1) / 2

Here, (L) is the number of links and (n) is the number of nodes; five nodes require (5(4)/2 = 10) links.

III. Internetworking Devices — Forwarding Traffic

A. Hub

A hub is a physical-layer multiport repeater that copies an incoming signal to every other port.

  • Operation: A frame arriving on port 1 is repeated to all active ports; the hub does not inspect MAC or IP addresses.
  • Collision domain: All attached devices share one collision domain and available bandwidth.
  • Duplex mode: Traditional hub-based Ethernet uses half-duplex communication and may require CSMA/CD collision handling.
  • Limitations: Unnecessary traffic reaches every node, collisions increase with load, and traffic isolation is absent.
  • Current role: Hubs are largely obsolete because switches offer dedicated bandwidth, full-duplex links, and selective forwarding.

B. Switch

A switch connects devices within a LAN and normally forwards Ethernet frames using destination MAC addresses.

  • Learning: The switch records the source MAC address and incoming port in its MAC address table.
  • Forwarding: A known unicast frame is sent only through the associated port; unknown unicasts and broadcasts are flooded within the VLAN.
  • Collision control: Each switch port forms a separate collision domain, and full-duplex links eliminate collisions.
  • Broadcast scope: A basic Layer 2 switch does not separate broadcast domains; VLANs create distinct logical broadcast domains.
  • Loop prevention: Spanning Tree Protocol disables redundant Layer 2 paths temporarily to prevent broadcast storms.
  • Switching methods: Store-and-forward verifies the complete frame and its error check, whereas cut-through begins forwarding after reading the destination address.

C. Routers

A router is a network-layer device that forwards packets between distinct IP networks.

  • Routing decision: The router compares the destination IP address with its routing table and applies longest-prefix matching.
  • Routing table entries: Entries contain a destination prefix, next hop, outgoing interface, and route metric.
  • Route acquisition: Routes may be directly connected, manually configured, or learned through protocols such as OSPF and BGP.
  • Broadcast separation: Router interfaces define separate broadcast domains and normally do not forward Ethernet broadcasts.
  • Additional functions: Routers may perform Network Address Translation, packet filtering, quality-of-service classification, and inter-VLAN routing.
  • Default route: The prefix 0.0.0.0/0 matches IPv4 destinations for which no more specific route exists.

IV. Software Organization — Layered Communication

A. Network software architecture

Network software architecture organizes communication functions into cooperating programs, services, interfaces, and layers.

  • Protocol stack: Each layer provides services to the layer above and uses services from the layer below.
  • Application roles: Client software initiates requests, while server software listens for and processes them; a web server commonly listens on TCP port 80 or 443.
  • Socket interface: Applications commonly identify an endpoint using an IP address and port number, such as 192.0.2.10:443.
  • Modularity: A browser can use Ethernet, Wi-Fi, or another link technology without redesigning HTTP because lower-layer details are hidden.
  • Control and data planes: The control plane determines forwarding information, while the data plane processes packets according to that information.
  • Architectural forms: Centralized client-server systems simplify management; distributed peer-to-peer systems distribute workload but complicate coordination.

B. Network layers and protocols

Layering divides complex communication into manageable functions, while protocols define communication rules between corresponding entities.

  • Protocol elements:
    • Syntax: Message format and field arrangement.
    • Semantics: Meaning of fields and required actions.
    • Timing: Transmission order, rate, and synchronization.
  • Peer communication: Equivalent layers appear to communicate logically, although actual data moves down the sender’s stack, across the medium, and up the receiver’s stack.
  • Encapsulation: Each layer adds control information:
TEXT
Application data → TCP segment → IP packet → Ethernet frame → Bits
  • Decapsulation: The receiver removes headers in reverse order and delivers the application data to the correct process.
  • Service and protocol distinction: A service states what a layer offers; a protocol states how peer entities cooperate to provide it.
  • Layering limitation: Headers add overhead, and strict separation may duplicate functions or prevent useful cross-layer optimization.

V. Standard Network Models — OSI and TCP/IP

A. OSI Model

The ISO Open Systems Interconnection model is a seven-layer reference framework that standardizes network functions conceptually.

  • Layer 7—Application: Supplies network services to applications; examples include web, email, and file-transfer services.
  • Layer 6—Presentation: Handles data representation, translation, compression, and encryption, such as character encoding.
  • Layer 5—Session: Establishes, manages, synchronizes, and terminates communication sessions.
  • Layer 4—Transport: Provides end-to-end delivery, segmentation, flow control, and error recovery.
  • Layer 3—Network: Handles logical addressing and route selection; IP-style packets and routers belong conceptually here.
  • Layer 2—Data Link: Provides framing, MAC addressing, media access, and local error detection; Ethernet uses a frame check sequence.
  • Layer 1—Physical: Transmits raw bits through electrical, optical, or radio signals.
  • Value and limitation: The model provides precise terminology and troubleshooting boundaries, but the Internet does not implement it as a strict seven-layer protocol stack.

B. TCP/IP protocol suite

The TCP/IP suite is the practical architecture used by the Internet, built around interoperable packet delivery across heterogeneous networks.

  • Application layer: Combines OSI application, presentation, and session functions; protocols include HTTP, DNS, SMTP, DHCP, and SSH.
  • Transport layer:
    1. TCP: Connection-oriented and reliable, using sequence numbers, acknowledgements, retransmission, and flow control.
    2. UDP: Connectionless and low-overhead, providing datagrams without guaranteed delivery or ordering.
  • Internet layer: IP provides logical addressing and best-effort packet delivery; ICMP reports errors and supports diagnostics.
  • Link layer: Technologies such as Ethernet and Wi-Fi deliver frames across the local link and carry IP packets.
  • Address resolution: ARP maps IPv4 addresses to link-layer addresses on a local network; IPv6 uses Neighbor Discovery.
  • Model correspondence: TCP/IP application maps to OSI Layers 5–7, transport to Layer 4, Internet to Layer 3, and link to Layers 1–2.
  • Central principle: IP offers connectionless best-effort delivery, while reliability—when required—is supplied by TCP or the application itself.