Advanced Computer Networks

Chapter 1
Network Architecture and Protocol Foundations

Post Graduate Program in Data science
Advanced Computer Networks   •   Post Graduate

Network Architecture and Protocol Foundations

Introduction

Computer networks are organized systems that allow independent computing devices to exchange information, share resources, and coordinate activity. Contemporary networks range from small data-centre fabrics to the global Internet, yet they rely on a relatively small set of foundational ideas: layering, encapsulation, addressing, forwarding, protocol rules, and end-to-end communication.

For postgraduate data-science professionals, networking is not merely an infrastructure concern. Distributed data pipelines, cloud platforms, model-serving systems, stream-processing frameworks, databases, and artificial-intelligence workloads all depend on predictable communication. Network architecture determines where computation occurs, how data is identified, how failures are handled, and how performance and security are measured.

This chapter develops a conceptual and technical foundation for analysing networks. It distinguishes the roles of the OSI reference model and the Internet protocol suite, explains how data is encapsulated and forwarded, and examines the design principles that make the Internet scalable.

Learning Objectives

By the end of this chapter, you should be able to:

  1. Explain the purpose and limitations of layered network models.
  2. Describe encapsulation, decapsulation, multiplexing, and demultiplexing.
  3. Distinguish physical, data-link, network, transport, and application functions.
  4. Explain MAC, IP, and transport-layer addressing.
  5. Analyse how routers forward packets using forwarding tables.
  6. Apply end-to-end principles to reliability, security, and functionality placement.
  7. Calculate basic transmission, propagation, throughput, and delay relationships.
  8. Evaluate Internet architecture and protocol-design trade-offs.

1. Why Networks Use Layers

A network performs many different tasks. Bits must be represented as electrical, optical, or radio signals; neighbouring devices must share a medium; packets must be delivered across interconnected networks; applications must identify conversations; and software must interpret the received data. Combining all of these tasks into one mechanism would produce systems that were difficult to modify and troubleshoot.

Layering divides the overall problem into relatively independent functions. A layer provides a service to the layer above it and uses services from the layer below it. A protocol specifies the rules used by peer entities at the same layer, while an interface describes how one layer invokes the services of another.

Layering offers several advantages:

  • Modularity: a technology can be replaced without redesigning every other function.
  • Abstraction: applications need not understand signal modulation or router hardware.
  • Interoperability: independently developed systems can communicate when they implement common protocols.
  • Fault isolation: failures can often be localized to a layer or boundary.
  • Reuse: a transport protocol can support many applications, and a network protocol can operate over many link technologies.

Layering also has costs. Functions may be duplicated, headers create overhead, and strict boundaries can prevent useful cross-layer optimization. Real systems therefore use layers as architectural abstractions rather than rigid physical compartments.

The OSI Reference Model

The seven-layer Open Systems Interconnection (OSI) model is a conceptual framework:

LayerPrincipal concernTypical examples
7. ApplicationNetwork services visible to applicationsHTTP, DNS, SMTP
6. PresentationRepresentation, encoding, compression, encryptionTLS-related transformations, character encoding
5. SessionDialog management and synchronizationSession coordination mechanisms
4. TransportProcess-to-process deliveryTCP, UDP, QUIC
3. NetworkLogical addressing and packet deliveryIP, routing protocols
2. Data linkLocal delivery and framingEthernet, Wi-Fi, PPP
1. PhysicalSignals and bit transmissionCopper, fibre, radio

The OSI model is valuable for teaching and diagnosis, but the Internet does not implement seven perfectly separate layers. Presentation and session functions are commonly integrated into applications or libraries, and the link layer often combines OSI data-link and physical responsibilities.

The Internet Protocol Suite

The practical Internet architecture is commonly described using four or five layers:

  1. Application layer: application protocols and data formats.
  2. Transport layer: communication between application processes.
  3. Internet or network layer: delivery of datagrams across interconnected networks.
  4. Link layer: communication over a directly connected network.
  5. Physical layer: transmission of signals, when treated separately.

The Internet architecture is sometimes called a “hourglass” architecture. Many applications and link technologies converge on a relatively narrow Internet layer, especially IP. This narrow waist promotes innovation above and below it: new applications can use IP, while new link technologies can carry IP packets.

Layered Internet architecture Application: HTTP, DNS, streaming, data APIs Transport: TCP, UDP, QUIC Internet: IP Link: Ethernet, Wi-Fi Physical: fibre, copper, radio
Layered Internet architecture showing applications, transport, Internet, link and physical layers
Figure: Layered Internet architecture showing applications, transport, Internet, link and physical layers

Figure: The Internet protocol suite as a layered hourglass architecture.

2. Encapsulation and Protocol Data Units

When an application sends information, each layer adds control information needed by its peer. This process is encapsulation. At the receiver, headers are interpreted and removed in reverse order; this is decapsulation.

A message generated by an application becomes a transport-layer segment or datagram. The network layer encapsulates it in an IP packet, and the link layer encapsulates that packet in a frame. The physical layer transmits a sequence of bits or symbols.

The general structure is:

Application data → transport segment → IP packet → link-layer frame → signals.

A protocol data unit (PDU) is the data object associated with a layer. Terminology varies, but common names are message at the application layer, segment for TCP, datagram for UDP or IP, frame at the link layer, and bits at the physical layer.

Encapsulation enables intermediate devices to perform selective processing. A router normally removes the incoming link-layer frame, examines the IP header, selects an outgoing interface, and creates a new link-layer frame. The IP packet generally remains logically intact, although fields such as the time-to-live value change. A switch primarily examines link-layer information and does not normally inspect transport or application content.

Multiplexing and Demultiplexing

A host may run many applications simultaneously. Transport protocols multiplex outgoing data and demultiplex incoming data. TCP and UDP use port numbers, together with IP addresses and protocol identifiers, to associate traffic with sockets.

A TCP connection is identified by a four-tuple:

(source IP address, source port, destination IP address, destination port)

The same destination server can therefore support many clients concurrently. Port numbers identify endpoints at the transport layer; they do not identify machines globally.

3. Addressing and Naming

Networks use several forms of identification because different tasks require different scopes of identity.

Link-Layer Addresses

A MAC address identifies a network interface within a link-layer technology, such as Ethernet or Wi-Fi. Switches use MAC addresses to forward frames within a local broadcast domain. A MAC address is not a universal route to a remote host; routers terminate the local frame and create another frame on the next link.

Network-Layer Addresses

An IP address identifies a network-layer interface and supports routing across interconnected networks. IPv4 addresses contain 32 bits; IPv6 addresses contain 128 bits. An address has both host-interface significance and routing significance through its prefix.

A subnet prefix describes which bits identify the network. In IPv4 CIDR notation, 192.0.2.0/24 means that 24 bits are the prefix and 8 bits are available for host addresses. The total number of addresses in an IPv4 prefix of length n is:

2^(32 − n)

This count includes network and broadcast addresses in traditional IPv4 subnetting, so the number of ordinarily assignable host addresses is often 2^(32 − n) − 2 for prefixes from /1 through /30. Modern practice and special subnet sizes require care; IPv6 does not use the same broadcast-address convention.

Names

Users typically work with names rather than numerical addresses. DNS maps domain names to resource records, including IP addresses. Naming and addressing are distinct: a name can remain stable while an address changes, and one name can map to multiple addresses for resilience or load distribution.

4. Packet Forwarding and Routing

A forwarding table determines the outgoing interface and often the next hop for a packet. A router compares the destination IP address with table prefixes and applies longest-prefix matching: among matching entries, the most specific prefix is selected.

For example, a forwarding table might contain:

Destination prefixNext hop/interface
203.0.113.0/24Interface 1
203.0.113.128/25Interface 2
0.0.0.0/0Interface 3

A packet destined for 203.0.113.140 matches all three entries, but /25 is the longest matching prefix, so Interface 2 is selected. The /0 route is the default route used when no more specific route exists.

Routing and forwarding are related but different. Routing computes or learns paths; forwarding applies the resulting decision to each packet. Routing protocols may be distributed and dynamic, whereas forwarding must be sufficiently fast for every arriving packet.

Packet-Switching Behaviour

The Internet primarily uses packet switching. Resources are shared statistically, and packets from different flows are interleaved. This is efficient for bursty data but introduces queueing, loss, and variable delay.

A simplified store-and-forward router receives enough of a packet to process it before transmitting it onward. If a link has transmission rate R bits per second and a packet has length L bits, the transmission delay is:

dtrans = L / R

This is the time to place all bits onto the link, not the time for the first bit to propagate through the medium. If distance is d metres and signal propagation speed is v metres per second, propagation delay is:

dprop = d / v

For a path, total delay may be approximated as:

dtotal = ∑(dprop,i + dtrans,i + dproc,i + dqueue,i)

Here, dproc,i is processing delay and dqueue,i is queueing delay at network element i. The expression is an approximation: wireless retransmissions, parallel forwarding, and protocol-specific mechanisms can alter the observed delay.

Worked Example: Transmission and Propagation

Suppose a 1,500-byte frame traverses a 100 Mb/s link of length 200 km. Assume 8 bits per byte and a propagation speed of 2 × 10⁸ m/s.

Frame size:

L = 1500 × 8 = 12,000 bits.

Transmission delay:

dtrans = 12,000 / (100 × 106) = 0.00012 seconds = 0.12 ms.

Propagation delay:

dprop = 200,000 / (2 × 108) = 0.001 seconds = 1 ms.

Ignoring processing and queueing, the one-link delay is approximately 1.12 ms. Increasing bandwidth reduces transmission delay, but it does not necessarily reduce propagation delay, which is determined mainly by distance and signal speed.

5. The End-to-End Principle

The end-to-end principle states that some functions are most reliably or flexibly implemented at communicating end systems rather than exclusively inside the network. Examples include application-level integrity checks, complete data reliability, and semantic validation.

A lower layer may detect local corruption, but only the endpoints know whether the complete application message arrived correctly, in order, exactly once where required, and with the intended meaning. For example, a transport checksum can detect many errors, but an application may still need to validate a file hash or transaction identifier.

The principle is not absolute. Networks implement functions such as routing, congestion control assistance, filtering, caching, multicast support, and quality-of-service mechanisms. The design question is where a function should be placed given performance, reliability, visibility, cost, and security requirements.

Reliability and Flow Control

TCP provides a reliable ordered byte stream using sequence numbers, acknowledgements, retransmission, and congestion-control mechanisms. UDP provides a connectionless datagram service with minimal transport-layer functionality. QUIC combines transport features with encryption and operates over UDP, allowing evolution in user space.

Reliability, flow control, and congestion control are different:

  • Reliability concerns loss, duplication, and ordering.
  • Flow control protects a receiver from being overwhelmed by a sender.
  • Congestion control protects the shared network from excessive offered load.

Confusing these functions leads to poor system design. A fast sender may be limited because the receiver is slow, because the path is congested, or because packets have been lost; each condition requires different evidence and treatment.

6. Protocol Design Foundations

A protocol is a set of conventions governing communication. A complete protocol specification usually defines message formats, field meanings, state transitions, timing rules, error handling, and security considerations.

Important design properties include:

  • Syntax: the structure and encoding of messages.
  • Semantics: the meaning of fields and messages.
  • Timing: when messages may be sent and how long endpoints wait.
  • State: the information retained between messages.
  • Failure behaviour: reactions to loss, duplication, corruption, and unreachable peers.
  • Extensibility: mechanisms for adding capabilities without breaking older implementations.
  • Idempotence: whether repeating an operation has the same effect as performing it once.

A protocol should define behaviour under imperfect conditions, not only the successful case. Distributed systems cannot assume that a missing response means a request was never received. Consequently, retries may create duplicate operations unless requests carry unique identifiers or operations are designed to be idempotent.

Control Plane and Data Plane

The data plane forwards or processes user packets. The control plane computes paths, distributes reachability information, and establishes policy. Separating these planes improves scalability and allows specialized hardware to forward packets while software maintains routing logic.

In software-defined networking, a logically centralized controller may program forwarding behaviour in network devices. Logical centralization does not eliminate distributed failure or latency concerns; controllers, switches, and communication channels still require redundancy and security.

7. Internet Architecture and Governance

The Internet is a network of networks rather than one centrally owned network. Autonomous systems, operated by Internet service providers, enterprises, universities, cloud providers, and other organizations, exchange reachability information using interdomain routing. Within an organization, interior routing protocols select paths according to local topology and policy; between organizations, policy and commercial relationships are central.

The architecture separates technical standards from many operational and governance decisions. Standards bodies such as the Internet Engineering Task Force publish documents through an open process. Address allocation and domain-name coordination involve regional and global institutions. Network operators also establish peering, transit, security, and acceptable-use policies.

The architecture’s strengths include decentralization, interoperability, incremental deployment, and resilience. Its weaknesses include operational complexity, uneven security, dependence on globally shared identifiers, and difficulty coordinating changes across independent administrative domains.

8. Security, Privacy, and Governance

Security should be considered at every layer. Link encryption protects a local hop; network-layer protection can secure IP traffic; transport or application encryption can protect end-to-end content. Encryption in transit does not automatically protect data stored at endpoints or metadata such as timing, volume, and communicating addresses.

Important principles include least privilege, strong authentication, key management, secure defaults, patching, segmentation, and comprehensive logging. Network telemetry should be collected proportionately and governed by access controls, retention limits, and applicable privacy law. Packet inspection may improve security operations but can expose sensitive content and create surveillance risks.

For data-science systems, network governance also concerns model inputs and outputs. Insecure APIs can permit data exfiltration, prompt injection, unauthorized inference, or manipulation of training data. Network architecture must therefore be aligned with identity management, data classification, and incident-response procedures.

9. Contemporary Developments

Several developments are reshaping protocol practice:

  • IPv6: expands address space and supports hierarchical addressing, although transition mechanisms remain important.
  • QUIC and HTTP/3: reduce transport ossification and support multiplexed encrypted streams over UDP.
  • Content delivery networks: place cached content near users, reducing path length and origin load.
  • Edge computing: moves computation closer to data sources or users, which can reduce latency but increases deployment complexity.
  • Network virtualization: abstracts physical resources into programmable logical networks.
  • Zero-trust architecture: treats every access request as requiring explicit authentication and authorization rather than trusting network location.
  • High-speed data-centre networks: use multipath routing, programmable devices, and telemetry to support distributed analytics and machine-learning workloads.

These developments do not invalidate foundational layers. They illustrate how new capabilities are introduced while preserving common addressing, forwarding, and protocol principles.

10. Illustrative Case: Distributed Model-Training Platform

Background

A company trains a recommendation model using data stored across three cloud regions. Training workers exchange parameter updates, while users simultaneously access an online prediction service.

Problem

Training traffic produces bursts that compete with prediction requests. Users report high response-time variability even though average link utilization appears moderate. Engineers initially increase link bandwidth, but the problem persists.

Analysis

The investigation separates layers and planes. At the application layer, training updates are large and bursty, whereas prediction requests are small and latency-sensitive. At the transport layer, long-lived flows compete with short transactions. At the network layer, both classes use shared paths and queues. Queueing delay, not propagation delay, dominates during bursts. Monitoring also reveals that retries amplify traffic when workers interpret delayed acknowledgements as failures.

Approach

The company implements workload-aware traffic classes, limits training concurrency, and places prediction services closer to users. It adds request identifiers so retries are safely deduplicated, measures queue occupancy, and uses explicit service-level objectives. Training traffic is scheduled during lower-demand periods where possible. Encryption and identity-based access controls protect model data and APIs.

Outcome

Prediction-tail latency decreases without requiring a proportional increase in bandwidth. Training throughput becomes more stable because congestion-related retransmissions and uncontrolled bursts are reduced.

Learning Points

The case demonstrates that bandwidth is only one performance variable. Architecture must distinguish application semantics, transport behaviour, routing, queueing, and governance. Layered diagnosis prevents an application problem from being misclassified as a physical-link problem.

Challenges and Limitations of Layered Thinking

Layered models can conceal interactions. Wireless link conditions influence transport congestion control; encryption affects observability; application message size affects packetization; and route changes affect distributed-system timeouts. Excessive abstraction can therefore produce incorrect diagnoses.

Another limitation is that protocol boundaries may not match organizational boundaries. A cloud service may control its application and transport settings but depend on an ISP for routing and a wireless operator for the final link. Reliability commitments must account for these dependencies.

Best practice is to use layers as a starting point, then examine cross-layer evidence. Capture packet traces where permitted, correlate application logs with transport metrics, inspect routing changes, and distinguish measured facts from assumptions.

Chapter Summary

Network architecture decomposes communication into layers that provide services to one another and communicate with peer layers through protocols. The OSI model is a useful reference framework, while the Internet protocol suite is the practical architecture built around application, transport, Internet, link, and physical functions.

Encapsulation adds headers and sometimes trailers as data moves downward through the stack; decapsulation reverses the process. MAC addresses support local delivery, IP addresses support internetwork routing, port numbers identify processes, and DNS provides human-oriented naming. Routers use forwarding tables and longest-prefix matching to select next hops, while routing protocols compute or distribute reachability information.

Transmission, propagation, processing, and queueing contribute to end-to-end delay. Bandwidth affects transmission delay but not propagation delay. The end-to-end principle places complete semantic functions at endpoints when they cannot be reliably achieved by intermediate systems alone, although practical networks also implement caching, filtering, congestion control, and other intermediate functions.

Effective protocol design specifies syntax, semantics, timing, state, failure handling, security, and extensibility. Internet architecture depends on interoperability among independently operated networks, making governance, privacy, security, and policy as important as technical mechanisms. For distributed data-science systems, layered analysis provides a disciplined way to understand latency, reliability, scalability, and risk.

Key Terms

Layer: A modular functional level in a network architecture.

Protocol: Rules governing message format, meaning, timing, and behaviour.

Interface: The service boundary through which adjacent layers interact.

Encapsulation: Addition of layer-specific control information to data.

Decapsulation: Removal and interpretation of encapsulation information.

PDU: Protocol data unit associated with a particular layer.

Frame: A data-link-layer PDU.

Packet: A network-layer PDU, commonly an IP datagram.

Port number: Transport-layer identifier for an application endpoint.

MAC address: Link-layer identifier used for local delivery.

IP address: Network-layer address used for internetwork communication.

CIDR: Classless Inter-Domain Routing notation for variable-length prefixes.

Forwarding: Selection of an outgoing interface for a packet.

Routing: Computation or learning of reachable paths.

Longest-prefix matching: Selection of the most specific matching forwarding entry.

Multiplexing: Combining traffic from multiple applications for transmission.

Demultiplexing: Delivering received traffic to the appropriate application.

End-to-end principle: Guidance to place complete functions at communicating endpoints when appropriate.

Congestion control: Regulation of sending to protect shared network capacity.

Control plane: Functions that compute paths and configure forwarding behaviour.

Review Questions

Short Answer Questions

  1. What is the principal purpose of layering in network architecture?
  2. Distinguish a protocol from an interface.
  3. Why does a router normally replace the incoming link-layer frame?
  4. What information does a transport port number identify?
  5. Distinguish transmission delay from propagation delay.

Long Answer Questions

  1. Compare the OSI reference model with the Internet protocol suite, including the practical limitations of a strict seven-layer interpretation.
  2. Explain encapsulation and decapsulation using the path of an application message from a source host to a destination host.
  3. Describe how IP forwarding and longest-prefix matching operate, and distinguish forwarding from routing.
  4. Discuss the end-to-end principle and evaluate its relevance to reliability, security, and caching.
  5. Analyse the strengths and weaknesses of the Internet’s decentralized architecture.

Analytical / Application Questions

  1. A 4,000-byte message is transmitted over a 20 Mb/s link. Calculate its transmission delay, assuming 8 bits per byte. Explain why the result does not include propagation or queueing delay.
  2. A forwarding table contains routes 10.0.0.0/8, 10.20.0.0/16, and 10.20.4.0/24. Which route is selected for destination 10.20.4.17, and why?
  3. Design a network-performance investigation for a distributed data-science workload experiencing high tail latency. Identify measurements at the application, transport, network, and link layers, and explain how you would distinguish congestion from slow application processing.

Multiple Choice Questions with Answers

Question 1

Which statement best describes encapsulation?

A. Adding layer-specific control information as data moves down the protocol stack

B. Selecting the shortest physical cable between two hosts

C. Converting every IP address into a MAC address permanently

D. Removing all headers before transmission

Correct Answer: A. Adding layer-specific control information as data moves down the protocol stack

Question 2

A router receives a packet matching routes 192.0.2.0/24 and 192.0.2.128/25. The destination is 192.0.2.140. Which route is selected?

A. The /24 route because it is listed first

B. The /25 route because it is more specific

C. Both routes simultaneously

D. The default route only

Correct Answer: B. The /25 route because it is more specific

Question 3

Which identifier primarily distinguishes application processes sharing one host?

A. MAC address

B. Subnet mask

C. Transport port number

D. Optical wavelength

Correct Answer: C. Transport port number

Question 4

A 1,000-byte packet crosses a 10 Mb/s link. Ignoring other delays, what is its transmission delay?

A. 0.08 ms

B. 0.8 ms

C. 8 ms

D. 80 ms

Correct Answer: B. 0.8 ms

Question 5

Which statement correctly distinguishes routing from forwarding?

A. Routing computes or learns paths; forwarding applies a next-hop decision to packets

B. Routing occurs only at the physical layer; forwarding occurs only in applications

C. Routing encrypts packets; forwarding decrypts them

D. Routing identifies processes; forwarding identifies users

Correct Answer: A. Routing computes or learns paths; forwarding applies a next-hop decision to packets

Question 6

Which function is most closely associated with the transport layer?

A. Modulating a radio signal

B. Delivering data between application processes

C. Learning switch MAC tables only

D. Selecting fibre-optic wavelength

Correct Answer: B. Delivering data between application processes

Question 7

Why can increasing bandwidth fail to eliminate high network response time?

A. Bandwidth has no relationship to transmission delay

B. Propagation and queueing delays may dominate

C. Higher bandwidth always increases packet loss

D. IP packets cannot use links above 1 Mb/s

Correct Answer: B. Propagation and queueing delays may dominate

Question 8

What does the end-to-end principle generally suggest?

A. All application functions must be implemented in routers

B. Complete semantic functions may be most reliably implemented at endpoints

C. Link-layer checks are never useful

D. Applications should not perform validation

Correct Answer: B. Complete semantic functions may be most reliably implemented at endpoints

Question 9

Which statement about MAC addresses is correct?

A. They provide global routing across the Internet

B. They identify a local link-layer interface

C. They replace DNS names in all applications

D. They identify transport-layer conversations

Correct Answer: B. They identify a local link-layer interface

Question 10

Which mechanism primarily protects a receiver from being overwhelmed by a sender?

A. Flow control

B. DNS resolution

C. Longest-prefix matching

D. Propagation delay

Correct Answer: A. Flow control

Advanced Computer Networks
Chapter 1 of 15