2: Network Layers Overview
University of Nottingham Lecture Notes: Network Layers
Last Lecture Overview
Connected Computers: It is standard for computers to be interconnected via networks.
Protocols: These are defined sets of rules that specify how communication should occur between devices.
Layers of Abstraction: Networks utilize layering to abstract different components of communication, effectively hiding the complexity and details of underlying layers.
Packet Switching: This is a method of network communication in which data is sent in smaller, manageable packets. These packets can be interleaved with packets from other network communications. Additionally, each layer adds its own packet headers as the data traverses through the layers of the protocol stack.
Current Lecture Topics
Network Layer Models in Detail: We will expand on the foundational models, specifically the TCP/IP stack and the OSI (Open Systems Interconnection) model.
Interaction Between Layers: How different layers of the network model communicate and interact with one another will be discussed.
Address Resolution Protocol (ARP): ARP will serve as a case study to illustrate how layers interface with each other.
Network Layer Models
TCP/IP Suite
The Internet is underpinned by the TCP/IP suite of protocols. Each layer operates independently while building upon the services of the layer beneath it.

Internet Layer Model Structure
Layer 5: Application Layer
Layer 4: Transport Layer
Layer 3: Internet Layer
Layer 2: Network Interface Layer
Layer 1: Physical Layer
OSI Network Layer Model
The OSI model provides a conceptual framework consisting of 7 layers. However, actual networks do not strictly adhere to this model.
Comparison of OSI and TCP/IP Layers:
OSI Layer 7: Application Layer
OSI Layer 6: Presentation Layer
OSI Layer 5: Session Layer
OSI Layer 4: Transport Layer
OSI Layer 3: Network Layer
OSI Layer 2: Data Link Layer
OSI Layer 1: Physical Layer
Detailed Breakdown of Layers
OSI Layer 1 – Physical
This layer concerns itself with how data is transmitted over the chosen medium. It defines how bits are converted into electronic, optical, or radio signals.
Types of Physical Layer include Ethernet, Wi-Fi, 5G, and Aloha.
OSI Layer 2 – Data Link
The Data Link Layer is responsible for how data is formatted into frames, ensuring the correct formatting for transmission over a single network.
Key details include packet identification, size, and intended recipient. Examples: Ethernet, Wi-Fi, PPP (Point-to-Point Protocol).
OSI Layer 3 – Network
This layer enables the forwarding of packets between networks. It operates on a connectionless basis, simply sending packets to the destination without establishing a dedicated connection (connectionless service).
Examples include IPv4 and IPv6.
OSI Layer 4 – Transport
The Transport Layer facilitates end-to-end communication between systems. It provides reliability, flow control, and multiplexing capabilities, ensuring data integrity during transmission. Examples include TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
OSI Layers 5 and 6
Layer 5 - Session: This layer manages the session between end-user applications, maintaining context during communication.
Layer 6 - Presentation: It is responsible for the way data is presented to the application layer, such as encoding and formatting.
OSI Layer 7 – Application
The top layer in the OSI model, this layer provides network services directly to end-users and interfaces with software applications. Protocols that function at this layer include HTTP (Hypertext Transfer Protocol), POP3 (Post Office Protocol), and IMAP (Internet Message Access Protocol).
Interaction Between Network Layers
Sending Data
Each network layer provides a service that allows it to transmit data either in a connectionless or a connection-oriented manner.
When sending data, a layer is presented with not just the data but additional information such as the destination address.
The layer then processes this information and communicates with the layer below it to facilitate the data transmission.
Receiving Data
For receiving data, a layer must be capable of processing information from its corresponding layer on a peer device. When data arrives, the layer below signals that the data is available for processing.
Receiving is straightforward for connectionless services as the layer simply extracts the data from the incoming packets.
Connectionless vs. Connection-Oriented Services
Connectionless Service
In a connectionless service model, packets are sent directly to the destination without needing to establish an end-to-end connection first. It merely facilitates packet transfer from one point to another.
Connection-Oriented Service
Conversely, a connection-oriented service requires a connection to be established before any data communication occurs. This process includes three phases:
Connection setup
Data transfer (either transmission or receipt)
Connection release
Each phase necessitates coordination between layers to manage the initiation and acknowledgment of communication successfully.
Addressing in Network Layers
Each layer has distinct addressing needs based on its purpose, such as the difference in identifying machines and networks.
Layer 3 (Internet Protocol) Addressing
IP addresses need to reflect both a device and the specific network to which it belongs. For instance, an example IP address might be 128.243.226.103.
Layer 2 (Data Link) Addressing
At the Data Link Layer, unique addresses identify machines within the local network. Ethernet uses a 48-bit MAC address system, composed of two segments:
Manufacturer Identification: A central control number that uniquely identifies the manufacturer.
Device Identification: This segment is specific to the individual network device produced by the manufacturer.
IP Over Ethernet Communication
When determining if machines are on the same local network:
Yes: Data can be sent directly to the intended machine.
No: The data must be directed to another machine capable of forwarding it, still situated within the same local network.
An essential process involves converting IP addresses into corresponding MAC addresses to facilitate this forwarding.
Translation Table Concept
Computers maintain a translation table that maps IP addresses to their corresponding MAC addresses. This enables the devices to look up and retrieve MAC addresses as necessary.
Address Resolution Protocol (ARP)
ARP defines crucial operational procedures including:
The algorithm utilized for addressing
What packets are sent between machines
The expected response mechanics upon receiving packets
The specifics regarding how these packets are formatted and the structure of the message bits containing IP addresses.
Example Scenario:
When Machine A sends a network packet to Machine B, it needs the MAC address of Machine B to complete the transfer. Machine A only knows Machine B's IP address and must broadcast a request to all devices in the network because it lacks the MAC address.
Broadcast Packets
Ethernet packets can be directed to a specific machine or sent as a broadcast to all machines within the network. Broadcast packets use a special address represented by all binary ones.
ARP Request and Reply Process
ARP Request: Machine A broadcasts a packet querying which machine possesses a specified IP address. All devices in the network receive this query.
ARP Reply: Machines that do not hold the requested address disregard the packet. The machine associated with the specified IP address responds directly to Machine A with its MAC address.
Reducing ARP Requests
In a typical scenario where Machine A sends packets to Machine B:
After the initial address mapping through ARP, subsequent packets can use the stored IP→MAC mapping from the translation table instead of broadcasting a request each time.
Communication is usually bi-directional; hence, responses from Machine B can also update Machine A's translation table, thereby optimizing the process.
Key Takeaways
The OSI model, although conceptual with its seven layers, is not strictly applicable to real-world networks, which often exhibit a mixture of layers.
The Internet layer model simplifies this concept into five functional layers.
Effective interaction between different network layers is crucial for data communication.
Addressing mechanisms must accommodate the varying requirements at different layers, mandating the ability to convert between IP and MAC addresses efficiently.
The ARP protocol plays a vital role in populating translation tables through broadcast requests and replies.