0% found this document useful (0 votes)
3 views

Assignment 2 Solution

The document provides a detailed solution to an assignment on computer networks, covering IP addressing and subnetting, network delays calculation, packet switching, flow control methods, error control techniques, and HTTP response times. It emphasizes the importance of subnetting for efficient address allocation, the impact of delays on communication, and the advantages of persistent HTTP in reducing latency. The conclusion highlights the need for efficient IP management, reduced delays, effective flow/error control, and improved web performance for an optimized network.

Uploaded by

thorodinson7838
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Assignment 2 Solution

The document provides a detailed solution to an assignment on computer networks, covering IP addressing and subnetting, network delays calculation, packet switching, flow control methods, error control techniques, and HTTP response times. It emphasizes the importance of subnetting for efficient address allocation, the impact of delays on communication, and the advantages of persistent HTTP in reducing latency. The conclusion highlights the need for efficient IP management, reduced delays, effective flow/error control, and improved web performance for an optimized network.

Uploaded by

thorodinson7838
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Here is the detailed solution to the assignment:

Solution to Assignment on Computer Networks


1. IP Addressing and Subnetting
We are given a network 192.168.10.0/24 and need to divide it into four equal subnets.
• Default Subnet Mask: 255.255.255.0 (/24)
• New Subnet Mask: Since we need 4 subnets, we borrow 2 bits from the host portion:
o New subnet mask = /26 (255.255.255.192)
o Each subnet will have 2⁶ = 64 IP addresses (62 usable).
Subnet No. Network ID First Usable IP Last Usable IP Broadcast Address
1 192.168.10.0/26 192.168.10.1 192.168.10.62 192.168.10.63
2 192.168.10.64/26 192.168.10.65 192.168.10.126 192.168.10.127
3 192.168.10.128/26 192.168.10.129 192.168.10.190 192.168.10.191
4 192.168.10.192/26 192.168.10.193 192.168.10.254 192.168.10.255

2. Network Delays Calculation


We are given:
• Packet Size = 5 KB = 5000 Bytes = 40000 bits
• Link Bandwidth = 100 Mbps
• Distance = 2000 km = 2 × 10⁶ m
• Propagation Speed = 2 × 10⁸ m/s
(a) Transmission Delay
Packet Size (bits) !""""
Transmission Delay = Bandwidth (bps)
= #""×#"! = 0.0004 sec = 0.4 ms

(b) Propagation Delay


Distance %×#"!
Propagation Delay = Propagation Speed = %×#"" = 0.01 sec = 10 ms

Total Delay = Transmission Delay + Propagation Delay


= 0.4 ms + 10 ms = 10.4 ms

3. Packet Switching
• Packet switching divides data into small packets, each routed independently.
• Unlike circuit switching, it is more efficient as it does not require a dedicated path.
• Delays like transmission delay, propagation delay, queuing delay, and processing
delay impact performance.
• Since packets can take different routes, reassembly delays can occur.
4. Flow Control Methods
(a) Stop-and-Wait
• Sender sends one packet, waits for an acknowledgment (ACK).
• Inefficient when delay is high since it waits for each packet’s acknowledgment.
(b) Sliding Window (Go-Back-N and Selective Repeat)
• Go-Back-N: Sender transmits N frames before needing an ACK. If an error occurs,
retransmit from the last unacknowledged frame.
• Selective Repeat: Only retransmits the erroneous frame, increasing efficiency.
Example Calculation:
Assume a window size of 4 and RTT = 50 ms.
• Stop-and-Wait Throughput:
Frame Size
Throughput = RTT&Transmission Delay

o If frame size = 5 KB, RTT = 50 ms,


o Throughput is low since only one frame per RTT.
• Sliding Window Throughput:

o Allows multiple frames in transit before needing an ACK.


o Improves efficiency by sending more frames before waiting.
5. Error Control: CRC and Checksum
Given data 1011010, divisor 1011, we calculate CRC:
1. Append three 0s: 1011010000
2. Perform binary division using 1011
3. Remainder is the CRC
Checksum:
• Simple addition of binary data blocks, with overflow wrapped around.
• Less effective than CRC for burst errors but used in simpler protocols (UDP, TCP).
6. Persistent vs. Non-Persistent HTTP Response Time
Given Data:
• 6 objects per page
• RTT = 100 ms
• Server processing time = 0
(a) Non-Persistent HTTP (1.0)
• Each object requires a separate connection
• Total response time:
Total Time = RTT + 6 × (𝑅𝑇𝑇 + Transmission Time) = 100 + 6 × 100 = 700 ms
(b) Persistent HTTP (1.1)
• Single connection for all objects
• Response time:
= RTT + Transmission Time + Object Transfer Time = 100 + 100 = 200 ms
Conclusion: HTTP 1.1 reduces response time significantly by eliminating multiple connection
setups.

Final Analysis: Integration of Topics


• Subnetting optimizes address allocation and avoids wastage.
• Packet switching ensures efficient data transfer across subnetted networks.
• Delays impact real-time communication; minimizing them improves performance.
• Flow control enhances transmission efficiency by reducing retransmissions.
• Error control guarantees data integrity, preventing corruption.
• Persistent HTTP improves web performance, reducing latency.
Conclusion:
For a well-optimized network, we need efficient IP management, reduced delay, effective
flow/error control, and improved web response time. Subnets, error control, and HTTP
mechanisms work together to enhance overall performance.

You might also like