EITF45 övning 3 (FL5) Internetprotokoll och adressering uppgifter med lösningar.pdf
Summary
# Comparison of OSI and TCP/IP models
This section details the fundamental differences between the OSI and TCP/IP network models, focusing on their layer structures and functional mappings [2](#page=2).
### 1.1 Overview of the models
The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system in terms of abstraction layers. The TCP/IP (Transmission Control Protocol/Internet Protocol) model is a more practical, widely implemented protocol suite that forms the basis of the internet [2](#page=2).
### 1.2 Layer comparison
A key distinction between the two models lies in their number of layers [2](#page=2).
* **OSI Model:** Consists of seven distinct layers [2](#page=2).
* **TCP/IP Model:** Typically considered to have three or four layers, depending on the interpretation [2](#page=2).
#### 1.2.1 Mapping of functionalities
The functionalities of the upper layers of the OSI model are consolidated into a single layer within the TCP/IP model. Specifically, the Application, Presentation, and Session layers of the OSI model are all encompassed by the Application layer of the TCP/IP model [2](#page=2).
The TCP/IP model does not explicitly define layers 1 (Physical) and 2 (Data Link) as separate entities in the same way the OSI model does. This is because the design allows for each network operator to implement their own network without strict adherence to TCP/IP's specific physical and link layer definitions, unlike early networks like ARPANET which had a unified link-level protocol and addressing system [2](#page=2).
> **Tip:** Understanding how functionalities are grouped differently is crucial for comprehending how data is processed and transmitted across networks using these models.
### 1.3 Internetworking and protocol purpose
The purpose of a network protocol is to ensure that data packets can be reliably sent from host to host across multiple interconnected networks. This is essential for internetworking, which allows data to traverse different networks that may not use the same underlying protocols. For internetworking to function, all participating networks must agree on common rules for addressing and forwarding data, necessitating a shared network protocol. Network equipment, such as routers, is responsible for forwarding data between these different networks [2](#page=2).
> **Example:** Without common network protocols and internetworking principles, each isolated network would be unable to communicate with any other, severely limiting the global reach and utility of data communication.
### 1.4 Address Resolution Protocol (ARP)
ARP (Address Resolution Protocol) is a protocol used within a local network to map known network addresses (like IP addresses) to the link-layer addresses (MAC addresses) of terminals. ARP operates at the boundary between the network layer and the data link layer [2](#page=2).
---
# Network protocols and internetworking
This section details the fundamental role of network protocols in enabling host-to-host data transmission across diverse networks and elucidates the concept of internetworking.
### 2.1 The purpose and necessity of network protocols
The primary purpose of a network protocol is to ensure that data packets can be transmitted from one host to another, even when these hosts are connected through multiple interconnected networks. This is crucial for the scalability and interoperability of global networks. Without standardized protocols, every data network would be forced to use the same link-layer protocol and addressing scheme, similar to the early ARPANET. Protocols provide the common rules and conventions necessary for devices to communicate effectively across different network technologies and physical infrastructures [2](#page=2).
### 2.2 Internetworking: Connecting diverse networks
Internetworking refers to the capability of data to be transmitted across various networks that may not utilize the same underlying protocols. For internetworking to be successful, all participating networks must adhere to common rules for addressing and data forwarding. This requires a shared network protocol that all these diverse networks can understand and implement. Special network equipment, known as routers, is essential for directing data between these different networks. The global Internet is a prime example of a vast internetworked system [2](#page=2).
### 2.3 Key protocols and their functions
Several protocols play critical roles in enabling internetworking and host-to-host communication.
#### 2.3.1 Address Resolution Protocol (ARP)
ARP is a protocol used within a local network to map known network addresses, specifically IP addresses, to the link-layer addresses (MAC addresses) of terminals. ARP operates at a layer between the network layer and the link layer [2](#page=2).
> **Example:** When your computer wants to send data to another device on the same local network, it knows the destination IP address but needs the MAC address to actually send the frame. ARP helps resolve this by broadcasting a request for the MAC address associated with that IP address.
#### 2.3.2 Internet Control Message Protocol (ICMP)
ICMP serves as a helper protocol to IP. It facilitates various queries at the IP level. A common use is for echo requests and replies, which are the foundation of the `ping` utility. ICMP is also used for error reporting when an IP packet cannot be delivered successfully. For instance, the "Time Exceeded" message is sent if an IP packet has undergone too many router hops, indicating a potential routing loop or excessive delay. This is utilized by tools like `traceroute` [3](#page=3).
> **Tip:** Think of ICMP as the "status report" protocol for IP. It doesn't carry user data itself but provides essential feedback and control information about IP packet delivery.
#### 2.3.3 Dynamic Host Configuration Protocol (DHCP)
DHCP is utilized in local networks to automatically assign dynamic IP addresses and distribute other vital network information. This can include IP addresses for the default gateway and DNS servers. When a terminal connects to a local network, it broadcasts a DHCP request. A DHCP server, often integrated into the default gateway, then responds with the requested network configuration details [3](#page=3).
> **Example:** When you connect your laptop to a Wi-Fi network, DHCP is likely responsible for giving your laptop an IP address, a subnet mask, a default gateway address, and the addresses of DNS servers, allowing you to access the internet without manual configuration.
### 2.4 The role of different addresses in internet communication
To access resources like a web page on the internet, a computer requires multiple types of addresses, each serving a distinct purpose at different protocol layers [3](#page=3).
* **MAC Address:** This address belongs to the link layer and identifies your device's specific location within the local network. It is crucial for delivering data frames within the same physical network segment [3](#page=3).
* **IP Address:** This address resides at the network layer and represents your device's unique identity on the global Internet. IP addresses are essential for routing IP packets across different networks to reach their final destination [3](#page=3).
* **Port Address:** This address belongs to the transport layer and specifies which application process on the destination host should receive the IP packets. For example, when browsing the web using HTTP, port addresses ensure that incoming packets are directed to the correct web browser application [3](#page=3).
> **Tip:** Understanding the hierarchy of these addresses (MAC for local delivery, IP for global routing, and Port for application selection) is fundamental to grasping how data travels across the internet.
### 2.5 Transport layer function
The transport layer, as defined in the OSI model, is responsible for transferring data between two application processes. This layer ensures reliable and efficient end-to-end communication, often handling tasks like segmentation, reassembly, flow control, and error correction, depending on the specific transport protocol used (e.g., TCP or UDP) [3](#page=3).
---
# Network addressing and protocols
This section details the fundamental protocols and addressing schemes essential for network communication, focusing on how devices identify and interact with each other across networks.
### 3.1 Network protocols: purpose and internetworking
A network protocol serves to ensure that data packets can be transmitted from one host to another across multiple networks. This is crucial for enabling interoperability, preventing all networks from being forced to use the same link-layer protocol and, consequently, the same link-level addressing system, as was the case with early networks like ARPANET [2](#page=2).
Internetworking, the foundational concept of the Internet, refers to the ability to send data across diverse networks that may not share the same underlying protocols. For this to be possible, all interconnected networks must adhere to common rules for addressing and data forwarding, necessitating a universal network protocol. Network equipment capable of facilitating communication between different networks, known as routers, are essential for this process on the Internet [2](#page=2).
### 3.2 Key network protocols and their functions
#### 3.2.1 Address Resolution Protocol (ARP)
ARP is a protocol used within a local network to map known network addresses (IP addresses) to the link-layer addresses (MAC addresses) of terminals. It operates between the network layer and the link layer [2](#page=2).
#### 3.2.2 Internet Control Message Protocol (ICMP)
ICMP is a supplementary protocol to IP, used for sending various queries at the IP level. A common example is the echo-request and reply used by the `ping` utility. ICMP is also utilized for error reporting when an IP packet fails to reach its destination, such as the "Time Exceeded" message sent when a packet has undergone too many router hops. This is leveraged by tools like `traceroute` [3](#page=3).
#### 3.2.3 Dynamic Host Configuration Protocol (DHCP)
DHCP is employed in local networks to dynamically assign IP addresses and other network configuration information, such as the IP addresses for the Default Gateway and DNS servers. When a device connects to a local network, it broadcasts a DHCP request. A DHCP server, typically the Default Gateway, then responds with the requested information [3](#page=3).
#### 3.2.4 Transport Layer Protocols (TCP and UDP)
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are both transport layer protocols for the Internet. They operate at the transport layer (layer 4) of the OSI model [4](#page=4).
#### 3.2.5 Internet Protocol (IP)
IP is the network protocol for the Internet, operating at the network layer (layer 3) of the OSI model [4](#page=4).
### 3.3 The role of different addresses in network communication
For a device to access a web page when connected to an Ethernet and surfing the Internet, it requires three distinct addresses, each belonging to a different protocol layer [3](#page=3).
* **MAC Address:** Belongs to the link layer and identifies the device's address within the local network. Ethernet is an example of a standard specifying protocols for the physical and link layers [3](#page=3) [4](#page=4).
* **IP Address:** Belongs to the network layer and specifies the device's address on the global Internet, ensuring IP packets take the correct route. IP addresses are classified into different classes, and their structure is fundamental to network routing [3](#page=3) [4](#page=4).
* **Port Address:** Belongs to the transport layer and indicates which application the IP packets are intended for. For instance, when requesting a web page using HTTP, packets must be delivered to the specific web browser application [3](#page=3).
### 3.4 IP address classification and structure
IP addresses are fundamental identifiers in network communication. They are often discussed in terms of their classes, which dictate the division between the network ID and the host ID.
#### 3.4.1 IPv4 address classes
The class of an IPv4 address is determined by the range of its first octet [5](#page=5).
| Class | First octet range |
| :---- | :---------------- |
| A | 0-127 |
| B | 128-191 |
| C | 192-223 |
| D | 224-239 |
| E | 240-255 |
**Example:**
* `208.34.54.12` falls into Class C [5](#page=5).
* `238.34.2.1` falls into Class D [5](#page=5).
* `114.34.2.8` falls into Class A [5](#page=5).
* `129.14.6.8` falls into Class B [5](#page=5).
* `241.34.2.8` falls into Class E [5](#page=5).
#### 3.4.2 Network ID and Host ID in classful addressing
In classful IP addressing, the network ID and host ID are determined by the address class.
* **Class A:** The first 8 bits identify the network ID, and the remaining 24 bits identify the host ID [6](#page=6).
* **Example:** For `114.34.2.8`, Net ID is `114.0.0.0` and Host ID is `0.34.2.8` [6](#page=6).
* **Class B:** The first 16 bits identify the network ID, and the remaining 16 bits identify the host ID [6](#page=6).
* **Example:** For `171.34.14.8`, Net ID is `171.34.0.0` and Host ID is `0.0.14.8` [6](#page=6).
* **Class C:** The first 24 bits identify the network ID, and the remaining 8 bits identify the host ID [6](#page=6).
* **Example:** For `192.8.56.2`, Net ID is `192.8.56.0` and Host ID is `0.0.0.2` [6](#page=6).
#### 3.4.3 Network ID and Host ID in classless addressing (CIDR)
Classless Inter-Domain Routing (CIDR) allows for more flexible IP address allocation, using a subnet mask to define the network and host portions. The mask is often represented in `/n` format, where `n` is the number of bits in the network portion of the address [4](#page=4) [8](#page=8).
* **Example:** An IP address `130.235.185.49` with a mask `255.255.0.0` has a Net ID of `130.235.0.0` and a Host ID of `0.0.185.49` [7](#page=7).
* **Example:** For IP address `130.235.188.247` and mask `255.255.192.0`:
* The Net ID is `130.235.128.0` [7](#page=7).
* The Host ID is `0.0.60.247` [7](#page=7).
* When working with classless addresses, focus on the 2-byte segments where the mask is greater than one and less than 255 [7](#page=7).
* **Example:** For IP address `120.14.22.16` and mask `255.255.128.0`:
* Net ID: `120.14.0.0`
* Host ID: `0.0.22.16` [7](#page=7).
* **Example:** For IP address `141.181.14.16` and mask `255.255.224.0`:
* Net ID: `141.181.0.0`
* Host ID: `0.0.14.16` [7](#page=7).
#### 3.4.4 IPv4 mask notation (/n format)
The `/n` notation represents the length of the subnet mask in bits [8](#page=8).
* `255.255.255.0` corresponds to `/24` (24 bits) [8](#page=8).
* `255.0.0.0` corresponds to `/8` (8 bits) [8](#page=8).
* `255.255.224.0` corresponds to `/19` (19 bits) [8](#page=8).
* `255.255.240.0` corresponds to `/20` (20 bits) [8](#page=8).
#### 3.4.5 Calculating the number of IPv4 addresses in an address block
The number of IPv4 addresses in an address block is determined by the prefix length. The formula is $2^{(32-n)}$, where $n$ is the prefix length.
* **Example:** For `200.17.21.128/27`, the number of addresses is $2^{(32-27)} = 2^5 = 32$ [8](#page=8).
* **Example:** For `17.34.16.0/23`, the number of addresses is $2^{(32-23)} = 2^9 = 512$ [8](#page=8).
* **Example:** For `180.34.64.64/30`, the number of addresses is $2^{(32-30)} = 2^2 = 4$ [8](#page=8).
* **Example:** For `123.56.77.55/29`, the number of addresses is $2^{(32-29)} = 2^3 = 8$ [8](#page=8).
### 3.5 OSI model layer mapping for network concepts
Different network concepts and protocols are associated with specific layers of the OSI model.
* **Physical Layer (Layer 1):** Manchester encoding (method for sending digital data as signals) Noise (disturbance on the transmission medium) [4](#page=4).
* **Link Layer (Layer 2):** CSMA/CD (medium access control method) 802.3 (standard for local networks, Ethernet, specifying protocols for physical and link layers) [4](#page=4).
* **Network Layer (Layer 3):** IP (network protocol for the Internet) ICMP (helper protocol for the Internet, providing error information and queries) Router (path selector that handles network addresses) CIDR (concept for classless IP address allocation) [4](#page=4).
* **Transport Layer (Layer 4):** Port address (address used by the transport protocol to direct data to the correct application) TCP, UDP (transport protocols for the Internet) [4](#page=4).
* **Application Layer (Layer 7):** Port address (also considered here as it directs data to a specific application) URL (addressing within the WWW application) DNS (application protocol for mapping hostnames to IP addresses) HTTP (application protocol for the Internet) [4](#page=4).
* **ARP:** Operates between Layer 2 and Layer 3 (Link and Network) [4](#page=4).
> **Tip:** Understanding how these protocols and concepts map to the OSI model is crucial for troubleshooting and designing networks. Remember that some concepts can have relevance across multiple layers.
---
# OSI layer assignments and IPv6 addressing
This section details the mapping of networking concepts to the OSI model and explores the simplification rules for representing IPv6 addresses.
### 4.1 OSI layer assignments
The OSI model is a conceptual framework used to understand and standardize the functions of a telecommunication or computing system in terms of abstraction layers. Different networking protocols and concepts are assigned to specific layers based on their function.
#### 4.1.1 Physical layer (Layer 1)
The physical layer deals with the physical connection between devices and the transmission of raw bit streams.
* **Manchester encoding**: This is a method for sending digital data as signals, making it a physical layer concept [4](#page=4).
* **Noise**: This refers to disturbances that can occur on transmission media, impacting the physical transmission of signals [4](#page=4).
#### 4.1.2 Data link layer (Layer 2)
The data link layer provides reliable transit of data across a physical link. It handles error detection and correction on the physical link.
* **CSMA/CD (Carrier Sense Multiple Access with Collision Detection)**: This is a media access control method used in Ethernet networks [4](#page=4).
* **802.3**: This is a standard for local area networks, specifically Ethernet, which specifies protocols for both the physical and data link layers [4](#page=4).
* **ARP (Address Resolution Protocol)**: This protocol operates between the data link and network layers. It is used to find the MAC address of a node on a local network when its IP address is known [4](#page=4).
#### 4.1.3 Network layer (Layer 3)
The network layer is responsible for logical addressing and routing of packets across networks.
* **Router**: A router is a device that operates at the network layer, acting as a traffic director that handles network addresses [4](#page=4).
* **CIDR (Classless Inter-Domain Routing)**: This is a concept used for the classless addressing of IP addresses [4](#page=4).
* **IP (Internet Protocol)**: This is the network protocol for the Internet, responsible for addressing and routing packets [4](#page=4).
* **ICMP (Internet Control Message Protocol)**: This is a helper protocol for the Internet that informs the recipient if something has gone wrong and allows for requests [4](#page=4).
#### 4.1.4 Transport layer (Layer 4)
The transport layer provides reliable or unreliable data transfer services to higher-level protocols.
* **Port address**: A port address is used by transport protocols to direct data to the correct application on a host. It can be considered a transport layer concept (Layer 4) and sometimes an application layer concept (Layer 7) [4](#page=4).
* **TCP (Transmission Control Protocol)** and **UDP (User Datagram Protocol)**: These are two transport protocols used for the Internet [4](#page=4).
#### 4.1.5 Application layer (Layer 7)
The application layer provides network services directly to end-user applications.
* **URL (Uniform Resource Locator)**: A URL is an address used within an application, specifically the World Wide Web [4](#page=4).
* **DNS (Domain Name System)**: DNS is an application protocol used to map symbolic hostnames (e.g., www.lth.se) to IP addresses [4](#page=4).
* **HTTP (Hypertext Transfer Protocol)**: This is an application protocol for the Internet [4](#page=4).
### 4.2 IPv6 address simplification
IPv6 addresses are 128 bits long and are typically written as eight groups of four hexadecimal digits, separated by colons. Several rules are applied to shorten these addresses for easier representation.
#### 4.2.1 Rule 1: Omit leading zeros in a group
Leading zeros in any group of four hexadecimal digits can be omitted. For example, `00AA` can be written as `AA`, and `0001` can be written as `1` [10](#page=10) [9](#page=9).
#### 4.2.2 Rule 2: Compress consecutive groups of zeros
One or more consecutive groups of zeros can be replaced by a double colon (`::`). This substitution can only be done once per IPv6 address [10](#page=10) [9](#page=9).
> **Tip:** The `::` can only appear once in an IPv6 address because if it appeared more than once, it would be ambiguous as to how many groups of zeros each `::` represented.
#### 4.2.3 Examples of IPv6 address simplification
* **Address:** `2340:1ABC:119A:A000:0000:0000:0000:0001`
* Applying Rule 1: No leading zeros to omit in the first four groups. `A000` remains `A000`.
* Applying Rule 2: The four consecutive groups of zeros (`0000:0000:0000:0000`) can be replaced by `::`.
* **Shortest form:** `2340:1ABC:119A:A000::1` [9](#page=9).
* **Address:** `0000:00AA:0000:0000:0000:0000:119A:A231`
* Applying Rule 1: `0000` becomes `0`, `00AA` becomes `AA`, `119A` remains `119A`, `A231` remains `A231`.
* Applying Rule 2: The five consecutive groups of zeros (`0:0:0:0:0`) can be replaced by `::`.
* **Shortest form:** `0:AA::119A:A231` [9](#page=9).
* **Address:** `2340:0000:0000:0000:0000:119A:A001:0000`
* Applying Rule 1: `0000` becomes `0`, `119A` remains `119A`, `A001` remains `A001`.
* Applying Rule 2: The four consecutive groups of zeros (`0:0:0:0`) can be replaced by `::`.
* **Shortest form:** `2340::119A:A001:0` [10](#page=10).
* **Address:** `0000:0000:8000:2340:0000:0000:0000:0000`
* Applying Rule 1: `0000` becomes `0`, `8000` remains `8000`, `2340` remains `2340`.
* Applying Rule 2: The four consecutive groups of zeros (`0:0:0:0`) can be replaced by `::`.
* **Shortest form:** `0:0:8000:2340::` [10](#page=10).
#### 4.2.4 Examples of IPv6 address expansion
To expand a compressed IPv6 address to its full form, reverse the simplification rules.
* **Address:** `0::0`
* The `::` indicates a sequence of zero groups. Since the address has two parts (`0` and `0`), and there are eight groups in total, the `::` must represent six groups of zeros.
* **Original form:** `0000:0000:0000:0000:0000:0000:0000:0000` [10](#page=10).
* **Address:** `0:AA::0`
* The `::` represents a sequence of zero groups. We have `0` and `AA` at the beginning, and `0` at the end. This implies the `::` must represent five groups of zeros to make up the total of eight groups.
* **Original form:** `0000:00AA:0000:0000:0000:0000:0000:0000` [10](#page=10).
* **Address:** `0:1234::3`
* The `::` represents a sequence of zero groups. We have `0`, `1234`, and `3`. The `::` must represent six groups of zeros.
* **Original form:** `0000:1234:0000:0000:0000:0000:0000:0003` [10](#page=10).
* **Address:** `123::1:2`
* The `::` represents a sequence of zero groups. We have `123`, `1`, and `2`. The `::` must represent five groups of zeros.
* **Original form:** `0123:0000:0000:0000:0000:0000:0001:0002` [10](#page=10).
---
# TCP session management and file transfer efficiency
This topic delves into the mechanics of TCP session management, focusing on sender windows and acknowledgments, and quantifies the time and efficiency of large file transfers over Ethernet using TCP/IPv6.
### 5.1 TCP session management with acknowledgments
TCP utilizes cumulative acknowledgments to ensure reliable data transmission. An acknowledgment (ACK) message from the receiver informs the sender about the next sequence byte it expects. This mechanism is crucial for tracking the progress of data segments and managing the sender's window [12](#page=12).
#### 5.1.1 Sender window dynamics
The sender's window represents the amount of unacknowledged data that can be in transit. When the sender receives an ACK, it indicates that the data up to the acknowledged sequence number has been successfully received. The sender then advances its window, allowing it to send new data [12](#page=12).
> **Example:**
> Suppose a TCP session has a sender window of 10,000 bytes, and the last acknowledged byte number is 22,001. If the sender then receives an ACK for byte 24,001, it means data up to byte 24,000 has been received. The sender's window will shift forward, and it can now send data starting from byte 24,001. If the sender then sends two segments of 1,500 bytes each, the window will be updated accordingly after these transmissions and subsequent acknowledgments [12](#page=12).
The diagram illustrating the sender's window would show its progression based on received ACKs and transmitted data segments. The "Before" state would show the window up to byte 22,000, and the "After" state would reflect the window advancement due to the ACK for 24,001. Further transmissions would adjust the window's boundaries [12](#page=12).
### 5.2 File transfer efficiency over Ethernet using TCP/IPv6
Analyzing the efficiency of large file transfers involves calculating the time taken and the percentage of useful data transmitted over the network link.
#### 5.2.1 Calculating file transfer time
To determine the transmission time, several factors are considered: the file size, the Maximum Segment Size (MSS) for TCP, and the network link's capacity.
* **File Size:** The total amount of data to be transferred. For example, a 5 GB file is equivalent to $5 \cdot 10^9$ bytes [13](#page=13).
* **Number of Segments:** This is calculated by dividing the total file size by the TCP MSS.
$N_S = \frac{\text{File Size}}{\text{MSS}}$ [13](#page=13).
For a file size of 5 GB and an MSS of 1,460 bytes:
$N_S = \frac{5 \cdot 10^9 \text{ bytes}}{1,460 \text{ bytes}} \approx 3,424,658 \text{ segments}$ [13](#page=13).
* **Frame Size:** Each TCP segment is encapsulated within IP (IPv6) and Ethernet headers. The total size of each frame is the sum of the TCP header, IPv6 header, and Ethernet header, plus the TCP MSS. Standard header sizes are: TCP (20 bytes), IPv6 (40 bytes), and Ethernet (18 bytes), totaling 78 bytes [13](#page=13).
$S_F = \text{MSS} + \text{TCP Header} + \text{IPv6 Header} + \text{Ethernet Header}$ [13](#page=13).
$S_F = 1,460 \text{ bytes} + 78 \text{ bytes} = 1,538 \text{ bytes}$ [13](#page=13).
* **Total Data Sent:** The total amount of data transmitted, including headers, is the frame size multiplied by the number of segments.
Total Data Sent = $S_F \cdot N_S$ [13](#page=13).
Total Data Sent $\approx 1,538 \text{ bytes} \cdot 3,424,658 \approx 5,267,124,004 \text{ bytes} \approx 5.27 \text{ GB}$ [13](#page=13).
* **Transmission Time:** This is the total data sent divided by the link capacity. For a 100 Mbps Ethernet link:
$T_T = \frac{\text{Total Data Sent} \cdot 8 \text{ bits/byte}}{\text{Link Capacity}}$ [13](#page=13).
$T_T = \frac{5,267,124,004 \text{ bytes} \cdot 8 \text{ bits/byte}}{100,000,000 \text{ bits/s}} \approx 421.37 \text{ seconds}$ [13](#page=13).
This translates to approximately 7 minutes for the file transfer [13](#page=13).
#### 5.2.2 Calculating overall transfer efficiency
The efficiency of the entire transfer is defined as the ratio of useful data (payload) to the total data transmitted (payload plus headers).
Efficiency = $\frac{\text{Useful Data}}{\text{Total Data}}$ [13](#page=13).
Efficiency = $\frac{\text{MSS}}{\text{Frame Size}}$ [13](#page=13).
Efficiency = $\frac{1,460 \text{ bytes}}{1,538 \text{ bytes}} \approx 0.9493$ [13](#page=13).
Therefore, the overall transfer efficiency is approximately 94.93%. This calculation assumes no overhead from error handling, congestion control, or flow control mechanisms [12](#page=12) [13](#page=13).
---
## Common mistakes to avoid
- Review all topics thoroughly before exams
- Pay attention to formulas and key definitions
- Practice with examples provided in each section
- Don't memorize without understanding the underlying concepts
Glossary
| Term | Definition |
|------|------------|
| OSI model | A conceptual framework that standardizes the functions of a telecommunication or computing system in terms of abstraction layers. It is divided into seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. |
| TCP/IP model | A conceptual framework that standardizes the functions of a telecommunication or computing system. It is often described as having four layers: Network Interface, Internet, Transport, and Application. |
| Network protocol | A set of rules that governs how data is transmitted and received between devices in a network. These rules ensure interoperability and proper communication flow. |
| Internetworking | The process of connecting multiple distinct computer networks to allow them to function as a single, larger network. This involves using common protocols and routing mechanisms. |
| ARP (Address Resolution Protocol) | A network protocol used to discover the hardware address (MAC address) of a network node, typically in a local area network (LAN), when only its IP address is known. |
| MAC address | A unique identifier assigned to a network interface controller (NIC) for communications at the data link layer of a network segment. It is a physical address burned into the hardware. |
| IP address | A numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. It serves as an identifier for both the host and the network. |
| ICMP (Internet Control Message Protocol) | A network layer protocol used by network devices, like routers, to send error messages and operational information. It is often used by diagnostic tools like ping and traceroute. |
| DHCP (Dynamic Host Configuration Protocol) | A network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other network configuration parameters to devices. |
| Transport layer | In the OSI model, this layer is responsible for providing reliable end-to-end data transfer between applications running on different hosts. TCP and UDP operate at this layer. |
| Port address | A numerical value that identifies a specific application or process on a network device. It is used by the transport layer to direct incoming data to the correct application. |
| Router | A networking device that forwards data packets between computer networks. Routers perform the traffic-directing functions on the Internet. |
| CSMA/CD (Carrier Sense Multiple Access with Collision Detection) | A media access control method used by networked Ethernet technology to share a single communication channel. It detects when two or more devices attempt to transmit at the same time. |
| CIDR (Classless Inter-Domain Routing) | A method for allocating IP addresses and routing IP packets more efficiently. It is a way of defining network prefixes without regard to the traditional classful addressing system. |
| DNS (Domain Name System) | A hierarchical and decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It translates human-readable domain names into machine-readable IP addresses. |
| HTTP (Hypertext Transfer Protocol) | An application protocol for distributed, hypermedia information systems. It is the foundation of data communication for the World Wide Web. |
| TCP (Transmission Control Protocol) | A core protocol of the Internet protocol suite. It provides reliable, ordered, and error-checked delivery of a stream of bytes between applications running on hosts communicating via an IP network. |
| UDP (User Datagram Protocol) | A communication protocol used across the Internet for time-sensitive transmissions such as video playback or DNS lookups. It provides a connectionless communication service. |
| IPv4 | The fourth version of the Internet Protocol, which provides a unique numerical address to every device connected to the Internet. It uses a 32-bit address system. |
| IPv6 | The successor to IPv4, designed to provide a vastly larger address space and other improvements. It uses a 128-bit address system. |
| Net ID | The portion of an IP address that identifies the specific network to which a device is connected. |
| Host ID | The portion of an IP address that uniquely identifies a specific device (host) within a network. |
| Broadcast address | A special IP address used to send data packets to all devices on a network segment simultaneously. |
| MSS (Maximum Segment Size) | The largest amount of data, specified in bytes, that TCP will put into a single segment. It is typically derived from the network's MTU. |
| Sender window | A mechanism in TCP that limits the amount of unacknowledged data a sender can transmit at any given time, helping to manage network congestion and ensure reliable delivery. |
| ACK number (Acknowledgement number) | A field in a TCP segment that indicates the sequence number of the next byte the sender of the ACK expects to receive. It implies that all prior bytes have been successfully received. |
| MTU (Maximum Transmission Unit) | The largest size, in bytes, of a single data packet that can be transmitted over a particular network link. |
| Ethernet frame | A data packet formatted according to the Ethernet protocol, used for transmission over an Ethernet network. It includes headers and trailers for addressing and error checking. |