[go: up one dir, main page]

0% found this document useful (0 votes)
39 views17 pages

Data Communication Assignment

The document outlines a comparison between the OSI and TCP/IP models, focusing on their application layers and practical examples like SMS exchange. It also discusses issues related to corrupted physical and logical addresses in network communications, including error detection and sender notification mechanisms. Additionally, it highlights the advantages and disadvantages of international standards for network protocols, emphasizing interoperability and innovation versus rigidity and complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views17 pages

Data Communication Assignment

The document outlines a comparison between the OSI and TCP/IP models, focusing on their application layers and practical examples like SMS exchange. It also discusses issues related to corrupted physical and logical addresses in network communications, including error detection and sender notification mechanisms. Additionally, it highlights the advantages and disadvantages of international standards for network protocols, emphasizing interoperability and innovation versus rigidity and complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

INSTITUTE OF FINANCE AND MANAGEMENT

FACULTY OF COMPUTING AND MATHEMATICS

DEPARTMENT OF COMPUTER SCIENCE

BACHELOR DEGREE IN COMPUTER SCIENCE 2024/2025

SEMESTER TWO

DATA COMMUNICATION- CSU07209

GROUP 3: SUB-GROUP 6

SUPERVISOR: DR. KWESIGABO.

S/N NAME REGISTRATION NUMBER

1 MARM YAHYA CHARAHANI IMC/BCS/2411717

2 SWAHIBA JUMA MUSSA IMC/BCS/2411931

3 NANNA MISANGU MALIBATA IMC/BCS/2412608

4 EMMANUEL PAUL MALILO IMC/BCS/2426001

5 FRANK MANYORI GODFREY IMC/BCS/2426695

6 ALI ULISAJA MWANJARA IMC/BCS/2427402


Question 1: Comparison of OSI and TCP/IP Models with Focus on the Application Layer

The OSI (Open Systems Interconnection) and TCP/IP (Transmission Control Protocol/Internet
Protocol) models are frameworks for understanding network communication. Below is a detailed
comparison, emphasizing the application layer and practical examples like SMS exchange between
mobile handsets.

1. Layer Structure Comparison

OSI Model (7 Layers) TCP/IP Model (4 Layers)

7. Application Layer 4. Application Layer

6. Presentation Layer Combined with Application

5. Session Layer Combined with Application

4. Transport Layer 3. Transport Layer

3. Network Layer 2. Internet Layer

2. Data Link Layer 1. Link Layer

1. Physical Layer Part of Link Layer

Key Differences:

-Layer Granularity: OSI separates functions into 7 layers, while TCP/IP merges the top three OSI
layers (Application, Presentation, Session) into a single Application Layer.

-Practicality: TCP/IP is designed around real-world protocols (e.g., HTTP, SMTP), whereas OSI
is a theoretical framework.
2. Application Layer Focus

OSI Application Layer:

-Role: Provides network services directly to user applications (e.g., email, file transfer).

Examples:

-SMS Exchange: In mobile networks, SMS relies on protocols like SMPP (Short Message Peer-
to-Peer), which operate at this layer.

-Email: SMTP (Simple Mail Transfer Protocol) handles email transmission.

TCP/IP Application Layer:


-Role: Combines OSI’s Application, Presentation, and Session layers. It defines how applications
interface with the transport layer.

-Examples:

-HTTP/HTTPS: Web browsers use these protocols to communicate with servers.

-DNS: Translates domain names to IP addresses.

Mobile Handset Example:


When two mobile devices exchange SMS:

1. Application Layer (OSI): The SMS application formats the message (text, recipient number).
2. Presentation Layer (OSI): Encodes the message into a standard format (e.g., Unicode for
emojis).

3. Session Layer (OSI): Manages the connection between sender and recipient devices.

4. TCP/IP Application Layer: Directly handles the entire process using protocols like SMPP.
3. Layered Communication in SMS Exchange
Layer Sender Device Receiver
Device

Application (OSI) User types message, selects recipient. Message displayed to


user.

Presentation(OSI) Encrypts message (if secure SMS). Decrypts message


.

Establishes temporary session with tower

Session(OSI) . Maintains session until


. delivery

TCP/UDP ensures reliable delivery Acknowledges receipt

Transport
(OSI/TCP/IP) .
.

IP routes message via cellular network IP routes message to


recipient’s device
Network (OSI/TCP/IP)
.
.

Data Link/Physical Converts data to radio signals (LTE/5G). Decodes radio


signals into digital
.
data

4. Why Emphasize the Application Layer?


-User Interaction: The application layer is where end-users interact with network services (e.g.,
apps, browsers).
-Protocol Diversity: Supports a wide range of protocols (HTTP, FTP, SMTP) tailored to specific
applications.
-Security: Encryption (TLS/SSL) and authentication (OAuth) are implemented here to protect
data.

5. OSI vs. TCP/IP in Modern Networks

-TCP/IP Dominance: The Internet relies on TCP/IP, making it the de facto standard.

-OSI’s Legacy: Used for troubleshooting and academic understanding (e.g., defining error
detection at the data link layer).

Example:

When sending an SMS via a mobile network:


-TCP/IP Model: Simplifies the process by combining layers, using protocols like SMPP directly.

-OSI Model: Provides a detailed breakdown of encryption (Presentation Layer) and session
management (Session Layer).

Question 2: Corrupted Physical Address in Bus Topology

In a bus topology LAN, devices are connected via a single shared communication medium (the
"bus"). When a frame is transmitted, it propagates to all stations on the bus. If the physical (MAC)
address in the frame header is corrupted:

1. Frame Handling Process:

Broadcast Nature: All stations receive the frame due to the bus’s broadcast design. Each device
checks the destination MAC address in the frame header.

Address Matching:

- Unicast: If the address is meant for a single device (unicast), stations discard the frame unless
the corrupted address accidentally matches their MAC.

- Multicast/Broadcast: If the address is multicast (group) or broadcast (all devices), the frame
is discarded if the corruption invalidates these addresses.

- Error Detection: The data link layer uses a **Cyclic Redundancy Check (CRC)** in the frame
trailer. If the CRC fails, the frame is dropped. If the CRC passes (e.g., address corrupted but data
intact), no error is flagged.
2. Sender Notification Mechanisms:

No Data Link Feedback: Ethernet (a common bus protocol) lacks acknowledgment mechanisms.
Corrupted addresses go undetected unless CRC also fails.

Higher-Layer Reliance:

-Transport Layer (TCP): Uses sequence numbers and ACKs. If no ACK is received, TCP
retransmits after a timeout.

-Application Layer: May implement custom error checks (e.g., checksums in file transfer
protocols).

Example Scenario:

In Figure 1 (bus topology), Station A sends a frame to Station C. Due to noise, the MAC address
is corrupted from `00:1A:2B:3C:4D:5E` to `00:1A:2B:3C:4D:5F`. Both Stations B and C receive
the frame. Station B discards it (address mismatch). Station C also discards it (corrupted address
≠ its MAC). The sender (A) remains unaware until TCP triggers retransmission.

Technical Deep Dive:

-Collision Detection: In legacy bus networks (e.g., 10BASE2), collisions were managed via
**CSMA/CD**. Modern switched networks mitigate this but retain CRC for error detection.

-CRC Mechanics: A polynomial division of the frame data generates a checksum. Mismatch
indicates corruption.

Impact on Network Performance:


- Silent discards increase latency due to retransmissions.

- Persistent errors may indicate physical layer issues (e.g., faulty cables).

Question 3: Corrupted Logical Address in Network Layer

If the logical (IP) address in a network layer packet is corrupted:

1. Routing Implications:
Invalid Addresses: Routers discard packets with non-routable addresses (e.g., `0.0.0.0`, loopback
`127.0.0.0/8`).

Valid but Incorrect Addresses:

- Local Network: If the corrupted IP belongs to the same subnet, ARP fails, and the packet is
dropped.

- Remote Network: Routers forward the packet toward the incorrect destination, consuming
bandwidth.

2. Sender Notification:

ICMP Errors: Routers may send ICMP "Destination Unreachable" (Type 3) messages if the
address is invalid. However, ICMP is often rate-limited or blocked.

Transport Layer:

-TCP: Relies on ACKs. Missing ACKs trigger retransmission.

- UDP: No retransmission; applications must handle loss (e.g., DNS retries).

Example Scenario:

A packet from `192.168.1.10` to `10.0.0.5` has its IP header corrupted to `10.0.0.6`.

-Step 1: Router R1 checks its routing table and forwards the packet toward `10.0.0.6`.

-Step 2: Host `10.0.0.6` receives the packet but discards it if no service listens on the destination
port (see Q4).

-Step 3: Host `10.0.0.6` may send an ICMP "Port Unreachable" error, but the original sender
(`192.168.1.10`) only learns of the error if ICMP is allowed.

Mitigation Strategies:

-Header Checksums: The IP header includes a checksum to detect corruption. If corrupted, routers
discard the packet.

-Secure Protocols: Use TCP for critical data, as it ensures delivery.


Question 4: Transport Layer Packet to Closed Port

When a transport layer packet arrives at a closed port:

1. UDP Protocol:
-Port Check: The destination host’s transport layer checks for processes bound to the port. If
none exist:

-ICMP Error: The host sends an ICMP "Port Unreachable" message (Type 3, Code 3) to the
source.

-Example: A DNS query (UDP port 53) sent to a host without a DNS server triggers this error.

2. TCP Protocol:

- Connection Setup: During the three-way handshake, a SYN packet to a closed port prompts the
host to reply with a **TCP RST (reset)** packet.

-Example: A web request (TCP port 80) to a host without a web server results in an RST.

Impact on Source:

-UDP: Applications must handle ICMP errors explicitly. For instance, `ping` or `traceroute` tools
report these errors.

-TCP: The OS kernel processes RST packets, closing the socket and notifying the application (e.g.,
"Connection refused").

Debugging Tools:

- Wireshark: Captures ICMP errors or RST packets for analysis.

- Netstat: Lists open ports to diagnose service availability.

Security Implications:

-Port Scanning: Attackers probe closed ports to map network services. Firewalls can block
unsolicited traffic.
-Stealth Hosts: Systems ignoring probes (e.g., not sending RST) appear "stealthed" but violate
RFC standards.

Question 5: Error Checking at Both Layers

Data Link Layer (L2):

-Function: Detects physical transmission errors (e.g., noise, signal distortion) using CRC.
-Scope: Hop-to-hop (between adjacent nodes).

-Limitation: Cannot detect errors introduced by routers during packet processing.

Transport Layer (L4):

-Function: Ensures end-to-end integrity via checksums (TCP/UDP).

-Scope: Entire communication path (source to destination).

-Example: A router corrupting payload data (undetected by L2 CRC) is caught by TCP’s


checksum.

Why Both Are Necessary:

1. Layering Principle: Each layer addresses specific error types.

2. Redundancy: Errors can occur at any layer (e.g., router software bugs).

Question 6: Packet/Frame Contents for Communication (D to K)

In a network where Computer D communicates with Computer K via intermediate routers, the
contents of packets and frames evolve at each layer as they traverse hops.

1. Transport Layer (End-to-End):


-Role: Ensures data reaches the correct application process.
-Contents: The segment includes **source port (i)** and **destination port (j)**, a checksum
for integrity, and payload data. Ports identify the sending/receiving applications (e.g., HTTP uses
port 80).

2. Network Layer (Logical Addressing):

- Role: Routes packets across networks using IP addresses.

-Contents: The packet header contains source IP (P_D) and destination IP (P_K) TTL (prevents
infinite loops), and protocol type (TCP/UDP).

-Hop Behavior: Routers examine the destination IP to forward the packet. The TTL decreases by
1 at each hop.

3. Data Link Layer (Physical Addressing):

-Role: Transfers frames between adjacent nodes (e.g., computer to router).

-Contents: The frame header includes source MAC (Q_D) and destination MAC (Q_Router) for
the first hop. At the router, the frame is stripped, and a new frame is created with **source MAC
(Q_Router)** and **destination MAC (Q_K)** for the final hop.

Example:

-Computer D → Router:
-Transport: `Port i → Port j`

-Network: `IP P_D → IP P_K`

-Data Link: `MAC Q_D → MAC Q_Router`

-Router → Computer K**:

-Transport/Network: Unchanged (end-to-end).

- Data Link: `MAC Q_Router → MAC Q_K`

Key Insight:

-Encapsulation: Each layer adds its header to the payload from the layer above.
-Decapsulation: At each hop, the data link layer removes its header, and the network layer
determines the next hop.

Question 7: OSI/TCP Layers Handling Tasks

1. Dividing Transmitted Bitstream into Frames:

-OSI Layer**: **Data Link Layer (Layer 2).


-TCP/IP Layer: Link Layer.

Process:
- Frames are created by adding headers (source/destination MAC) and trailers (CRC).

- Protocols like Ethernet use **preamble bits** to synchronize devices.

Example: Ethernet frames start with a `0xAAAA` preamble to signal the start of a frame.

2. Determining Route Through Subnet:


-OSI Layer: Network Layer (Layer 3).

-TCP/IP Layer: Internet Layer.

Process:

- Routers use routing tables and protocols (e.g., OSPF, BGP) to select optimal paths.

- IP addresses guide packet forwarding.

Example: BGP routes traffic between autonomous systems (AS) on the Internet.

Question 8: Encapsulation Relationship

Frames Encapsulate Packets:

Process:
1. Transport Layer: Data is packaged into a segment (e.g., TCP/UDP).
2. Network Layer: The segment is wrapped in a packet with IP addresses.

3. Data Link Layer: The packet is encapsulated in a frame with MAC addresses.

Key Points:

-Hop-by-Hop Rewriting: At each router, the frame header (MAC) is replaced, but the packet (IP)
remains unchanged.

-End-to-End Integrity: The transport layer header (ports) and network layer header (IP) persist
from source to destination.

Example:

A web request from a laptop to a server involves:


- TCP segment (ports) → IP packet (IP addresses) → Ethernet frame (MAC addresses).

Question 9: OSI vs. TCP/IP Model Similarities and Differences

Similarities:

1. Layered Architecture: Both models divide networking tasks into layers for modular design.

2. Transport and Network Layers: Both define equivalent functions for end-to-end communication
(TCP/OSI L4) and routing (IP/OSI L3).
Differences:

Feature OSI Model** TCP/IP Model

Layers 7 layers (strict 4 layers (simplified)


separation)
Merged into the Application layer

Session/Presentation Merged into the


Layers Application layer
Explicit layers (L5, L6) for session
management and data formatting

Adoption Practical implementation (Internet basis)

Theoretical
framework

Question 10: Advantages and Disadvantages of International Standards for Network Protocols

Advantages:

1. Interoperability: International standards like TCP/IP, HTTP, and IEEE 802.11 (Wi-Fi) ensure
seamless communication between devices from diverse manufacturers. For example, a smartphone
can connect to any Wi-Fi router globally because both adhere to the same IEEE 802.11 protocols.

2. Innovation and Competition: Standards provide a common framework, allowing companies to


innovate on top of existing protocols. For instance, HTTPS evolved from HTTP by adding TLS
encryption, enabling secure web transactions without redesigning the entire protocol stack.

3. Cost Efficiency: Standardization reduces the need for proprietary solutions, lowering
development and production costs. Ethernet (IEEE 802.3) is a prime example; its ubiquity drives
down hardware prices.

4. Scalability: Standards like IPv6 were designed to address limitations in IPv4, ensuring the
internet can scale to accommodate billions of devices.

Disadvantages:
1. Rigidity and Slow Evolution: Standards bodies (e.g., IETF, IEEE) require consensus, delaying
updates. For example, IPv6 adoption has been sluggish despite IPv4 address exhaustion.

2. Complexity: Implementing all OSI layers (e.g., session, presentation) increases system
complexity. TCP/IP simplifies this but still requires intricate configurations for advanced features
like QoS.

3. Compliance Costs: Meeting standards (e.g., GDPR for data privacy) imposes financial burdens
on organizations, especially small businesses.
4. Fragmentation: Competing standards (e.g., 5G NR vs. legacy 4G) can create compatibility
issues, complicating global deployment.

Example:

The transition from HTTP/1.1 to HTTP/2 improved web performance through multiplexing but
required significant backend upgrades, illustrating both innovation and implementation
challenges.

Question 11: Fraction of Network Bandwidth Filled with Headers

Formula:

Fraction ={n x h}/{M + n xh}


n: Number of layers.

h: Header size per layer (bytes).

M: Application message size (bytes).

Implications:

-Small Messages: High overhead. For example, a 64-byte VoIP packet with 5 layers (each h =
20)bytes) has headers consuming {100}/{164} approx 61% of bandwidth.

-Large Messages: Lower overhead. A 1500-byte file transfer with the same headers uses
{100}/{1600} = 6.25% .
Real-World Impact:

-Efficiency Trade-offs: Applications like video streaming (large payloads) tolerate header
overhead better than IoT sensors (small payloads).

-Protocol Optimization: Techniques like header compression (e.g., RoHC in 4G/5G) mitigate
overhead for latency-sensitive applications.

Calculation Example:

If M = 1000 B, h = 20B, n = 5: Fraction = {5 x 20}/{1000 + 100} = {100}/{1100} approx


9.09%.

Question 12: Impact of Changing Layer k’s Algorithm

Key Principle: Layered architectures decouple functions, allowing changes at one layer without
affecting others *if the service interface remains unchanged*.

Scenario:

- Layer k: Transport layer (TCP).

- Algorithm Change: Switching congestion control from Reno to Cubic.

Impact Analysis:

-Layer k-1 (Network): Unaffected, as it only handles IP routing and does not interact with TCP’s
congestion logic.

-Layer k+1 (Application): Unaffected, as applications use standard socket APIs (e.g., `send()`,
`receive()`).

Example:
Google’s QUIC protocol replaces TCP at the transport layer but maintains compatibility with
HTTP/3 at the application layer by emulating TCP’s service interface.

Exception:

If the algorithm change alters the service interface (e.g., introducing new error codes), adjacent
layers must adapt.

Question 13: Impact of Changing Layer k’s Service

Key Principle: Service changes disrupt the contract between layers, necessitating adjustments in
adjacent layers.

Scenario:

-Layer k: Network layer transitions from IPv4 to IPv6.

Impact Analysis:

-Layer k-1 (Data Link): Unchanged, as MAC addressing (e.g., Ethernet) remains independent of
IP.

-Layer k+1 (Transport): Requires updates to handle 128-bit IPv6 addresses instead of 32-bit IPv4
addresses. For example, TCP/UDP checksums now include IPv6 headers.

Example:

Migrating to IPv6 required updates to DHCP (Dynamic Host Configuration Protocol) and DNS to
support larger address spaces, illustrating cross-layer dependencies.

Broader Implications:

-Compatibility Challenges: Dual-stack implementations (supporting IPv4 and IPv6) add


complexity but ensure backward compatibility.
-Security Updates: New services (e.g., IPsec in IPv6) may require changes in firewall
configurations (Layer 3/4).

You might also like