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

Assignment No - 02 Computer Network

Computer network
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)
13 views

Assignment No - 02 Computer Network

Computer network
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/ 4

Name – Braj Kishor

Reg. No. – 21103145946

Q1. Using a sliding window protocol, Station A uses 32-byte packets to transmit messages to Station
B. The round-trip delay between A and B is 80 ms, and the bottleneck bandwidth on the path
between A and B is 128 kbps. What is the optimal window size that A should use? (4 Points)

Ans. Round-Trip propagation delay = 80ms

Round trip time = Tt + 2Tp

Packet size = 32 bytes = 32*8 bits

Bandwidth = 128kbps
Packet size 32 × 8
Transmission Time ( 𝑇𝑡 ) = = ms = 2ms
Bandwidth 128
Round trip time = Tt + 2Tp

80 = 2 + 2Tp

Tp = 39ms

Let N be the window size.

For sliding window protocol,


Tp 39
No. of packets = 1 + 2𝑎 = 1 + 2 × Tt
= 1+2× 2
= 1 + 39 = 40 Ans.

Q2. Consider two hosts, X and Y, connected by a single direct link of rate 𝟏𝟎𝟔 bits/sec. The distance
between the two hosts is 10,000 km, and the propagation speed along the link is 𝟐 × 𝟏𝟎𝟖 m/sec.
Host X continuously sends a file of 50,000 bytes as one large message to host Y. Let the transmission
and propagation delays be p milliseconds and q milliseconds respectively. Then the values of p and
q are? (4 Points)

Ans. Given,

Bandwidth (B) = 106 bits/sec

Packet size (L) = 50,000 bytes = (50,000 X 8) bits

Distance (d) = 10,000 km = 10,000 X 1000 m = 107 m

Velocity of propagation(v)= 2 × 108 m/sec

𝐿 50,000×8
𝑝 = 𝑇𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 𝐷𝑒𝑙𝑎𝑦 (𝑇𝑡 ) = = = 400𝑚𝑠 Ans.
𝐵 106

𝑑 107
𝑞 = 𝑃𝑟𝑜𝑝𝑎𝑔𝑎𝑡𝑖𝑜𝑛 𝐷𝑒𝑙𝑎𝑦 (𝑇𝑝 ) = = 2×108 = 50𝑚𝑠 Ans.
𝑣

Q3. Describe how the sliding window protocol handles lost frames. Include a discussion of the roles
of acknowledgements (ACKs) and timeouts. (4 Points)
Ans. In Stop-and-Wait ARQ (Automatic Repeat Request), the sender assigns sequence numbers to each
data frame it sends. This allows the receiver to identify and acknowledge each frame individually,
ensuring reliable delivery of data packets. After sending a frame, the sender waits for an
acknowledgement before sending the next frame.

Sender Receiver

Data1

Data1 is consumed
and Ack sent
Ack

Time Out
Data1 Receiver sends Ack instead
of negative Ack because of
sequence number
attached to sender packet
Ack

The role of acknowledgement (ACK) is when the receiver successfully receives a data frame, it
sends an ACK back to the sender, including the sequence number of the next expected frame. The
sender uses this ACK to determine whether the transmission was successful and whether it can
proceed to send the next frame.

And, Timeout refers to the duration for which the sender waits for an ACK from the receiver
after transmitting a data packet. If the sender does not receive an ACK within this timeout period, it
assumes that the frame was lost or corrupted and retransmits the frame.

Q4. Explain the concept of “Go-Back-N” ARQ in the context of the sliding window protocol. How
does it differ from “Selective Repeat” ARQ? (6 Points)

Ans. Go-Back-N Protocol: The Go-Back-N protocol is a sliding window protocol used for reliable
data transfer in computer networks. It is a sender-based protocol that allows the sender to transmit
multiple packets without waiting for an acknowledgement for each packet. The receiver sends a
cumulative acknowledgement for a sequence of packets, indicating the last correctly received packet.

If any packet is lost, the receiver sends a negative acknowledgement (NACK) for the lost packet,
and the sender retransmits all the packets in the window starting from the lost packet. The sender also
maintains a timer for each packet, and if an acknowledgement is not received within the timer’s
timeout period, the sender retransmits all packets in the window.

The following points refers to “Go-Back-N” differ from “Selective Repeat”:

• In Selective Repeat Protocol, only those frames are re-transmitted which are found suspected
whereas in Go-Back-N Protocol, if the sent frame are find suspected then all the frames are
retransmitted from the lost packet to the last packet transmitted.
• In Selective Repeat Protocol, type of acknowledgement is individual whereas in Go-Back-N
Protocol, type of acknowledgement is cumulative.
• Selective Protocol is more complex whereas Go-Back-N Protocol is less complex.

Q5. Consider a network using the pure ALOHA medium access control protocol, where each frame
is of length 1,000 bits. The channel transmission rate is 1 Mbps (𝟏𝟎𝟔 bits per second). The aggregate
number of transmissions across all the nodes (including new frame transmissions and retransmitted
frames due to collisions) is modelled as a Poisson process with a rate of 1.000 frames per second.
Throughput is defined as the average number of frames successfully transmitted per second. The
throughput of the network (rounded to the nearest integer) is? (4 Points)

Ans. Given,

Packet size (L) = 1000 bits

Bandwidth (B) = 106 bits per second


L 1000
Average Frame Transmission Time (Tfr ) = = ms = 1ms
B 106
Now, G is defined as average no. of frames generated by the system in one frame transmission
time.

1000 frames per second = 1 frames per millisecond (ms)

Therefore, G = 1

Average no. of successful transmission, 𝑆 = 𝐺 × 𝑒 −2𝐺 = 1 × 𝑒 −2 = 0.135

This means that the throughput is 0.135 X 1000 = 135 frames out of 1000 will probably survive.

Q6. Consider an Ethernet segment with a 𝟏𝟎𝟖 bits/sec transmission speed and a maximum segment
length of 500 meters. If the signal’s propagation speed in the medium is 𝟐 × 𝟏𝟎𝟖 m/sec, then what
is the minimum frame size (in bits) required for collision detection? (3 Points)

Ans. Given,

Bandwidth (B) = 108 bits/sec

Distance (d) = 500m

Propagation speed (v) = 2 × 108 m/sec

For collision detection,

Transmission Time(Tt ) ≥ 2 × Propagation Time(Tp )

Frame size Distance


≥2×
Bandwidth Propagation Speed
Distance
Frame size ≥ 2 × × Bandwidth
Propagation Speed
500
Frame size ≥ 2 × × 108
2 × 108
Frame size ≥ 500 bits

You might also like