0% found this document useful (0 votes)
19 views5 pages

CN Solutiuons Midsem

The document discusses various networking concepts including TCP and UDP flow rates, TCP connection establishment, pipelined protocols, checksum calculations, BitTorrent chunk retrieval, socket library calls, DNS commands, IP stack layers, propagation delays, and bandwidth calculations. It provides specific scenarios and calculations related to data transmission, flow management, and network protocols. Additionally, it addresses the implications of different protocols on data transfer efficiency and error detection.

Uploaded by

Raghuram Alur
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)
19 views5 pages

CN Solutiuons Midsem

The document discusses various networking concepts including TCP and UDP flow rates, TCP connection establishment, pipelined protocols, checksum calculations, BitTorrent chunk retrieval, socket library calls, DNS commands, IP stack layers, propagation delays, and bandwidth calculations. It provides specific scenarios and calculations related to data transmission, flow management, and network protocols. Additionally, it addresses the implications of different protocols on data transfer efficiency and error detection.

Uploaded by

Raghuram Alur
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/ 5

● In the following figures, assume the following: (a) TCP long-lived flows A, B, C and D exchange

data in both directions, (b) Endpoints have enough data to transmit continuously and use the
maximum transmission rate they can achieve, (c) These are the only flows in network; not
limited by receiver or congestion window
a) what is the average transmission rate
for each flow (A, B, C,D)? (4 marks)
(b) Now assume that the flow B is replaced
by a UDP flow, where both endpoints are
still using the maximum
transmission rate they can achieve. What
is the average transmission rate for each
flow (A, B, C, D)? (5 marks)

A=C=D = 33.33 Gbps, B = 66.67


Gbps

B=100, A=0, C=0, D = 100

Network Layer 4-1


● Consider a client and a Web server directly connected by one link of rate R. Suppose the client wants to
retrieve an object whose size is exactly equal to 15 S, where S is the maximum segment size (MSS).
Denote the round-trip time between client and server as RTT (assumed to be constant). Ignoring protocol
headers, determine the time to retrieve the object (including TCP connection establishment) when S/R >
RTT. You must consider the TCP handshaking time and always assume that the connection uses TCP
Tahoe, which is working in slow start mode while sending this object with no loss incurred during this
exchange. You must also assume that the client sends the request to retrieve the object while sending the
ACK message in the TCP handshaking (18 marks)

● (3 marks) Slow start 🡺 there will be 4 transfer rounds – 1 MSS, 2 MSS, 4 MSS, 8 MSS
● (3 marks) 1 RTT for SYN and SYN-ACK
● (3 marks) 1 RTT for ACK(with obj request) and response until byte1 of obj
● (3 marks) S/R for receiving the 1st MSS
● 1 RTT for sending the response ack back and requesting next 2 MSS.
● (3 marks) when client receives 2nd MSS completely, it will send an ack to the server. This ack reaching the
server will take less time than the server uploading 3rd MSS (S/R>RTT)
● So server starts sending 3rd packet onwards continuously, until 15th MSS

● (3 marks) Overall delay is sum of all these = 15S/R + 3 RTT

Network Layer 4-2


● Answer the following for pipelined protocols
(a) Consider the Go-back-n and selective repeat protocols. Suppose the sequence number
space is of size k. As discussed in class, what will be the largest allowable window size of
each of these protocols that will avoid sequence number problems? (3 marks) k ≥ 2w
(b) In 1 sentence, and with necessary keyword explain what type of acknowledgements
are provided by selective repeat and go-back-n? (1.5 × 2 = 3 marks)
GBN uses cumulative ack, SR uses individual acks
(c) Suppose in go-back-n, a client sent a packet to the server of size 12 bytes and the
packet’s sequence number is 102, what will be the acknowledgement number that the
server will send to the client? (3 marks) 114.
● Compute the checksum for the following words. The hex equivalent for the binary is
provided for your convenience: 0110111011000111 (0x6EC7), 1011010011101000
(0xB4E8), and 1110011100111000 (0xE738). Modify the values in this example to show
that checksum might miss detecting errors in specific cases. (6 + 6 marks)
0110111011000111 0010001110101111 0000101011101000
1011010011101000 1 1
------------------------------ ------------------------------ ------------------------------
10010001110101111 0010001110110000 0000101011101001
1110011100111000
----------------------------
10000101011101000 1111010100010110
Modify 2 bits to show that the checksum doesn’t change

Network Layer 4-3


● Consider a peer, Alice, who joins a BitTorrent network without possessing any chunks. Without
any chunks, she cannot become a top-four uploader for any of the other peers, since she has
nothing to upload. In no more than 3 sentences explain how will Alice get her first chunk,
providing the technical term for the process? (9 marks)
every 30 seconds, one peer in the network who has chunks picks one additional neighbor at random and sends it
chunks. This peer who receives the chunk might be Alice. In BitTorrent lingo, Bob is said to be optimistically
unchoked.
● Consider the TCP and UDP socket library classes in the Berkeley Socket implementation that
you are familiar with. Tabulate the list of socket library calls in the client and server connection
for both TCP and UDP in two tables, in the form shown below. You may assume that in a
particular timeslot either the client or the server will perform a library call. So ensure that you
place a command X in an earlier timeslot than command Y, if command X must execute before
command Y. You must also assume that the client sends a single packet as data to the server
that the server receives. The server in response also sends a single packet of data that the
client receives. You do not need to provide any arguments in any of these calls. For example, it
is sufficient to write socket() or accept(). You also do not need to handle the returned values.
You must also assume that all calls are successful and there is no packet loss in the network. (2
× 9 = 18 marks)
There can be many ordering. For TCP, student just has to ensure that socket is called first, then bind and listen by
the server. By then there should be a connect from the client followed by an accept from the server. Then send
from the client happens before receive from server, and then send from server happens before receive from the
client. Finally there will be the close. In case of UDP, ensure sendto happens before receivefrom, and client does
this before server.
● What is the purpose of the ‘dig‘ command? State exactly one reason why a single
DNS name can have multiple IP addresses? (6+3 =9 marks)
dig command stands for Domain Information Groper. It is used for retrieving
information
about DNS name servers. Load balancing
● Consider the IP stack and protocol layering that you have studies. In the scenario
below, imagine that you’re sending an http request to another machine somewhere
on the network.(I) In the corresponding figure, what layer corresponds to box (a) 2
(b) 5 (c) 7 (d) 10 (e) 15. (ii) What layer in the IP stack best corresponds to the
phrase: ’handles the delivery of segments from the application layer, may be reliable
or unreliable’? (2 × 6 = 12 marks)
(I) transport, physical layer, link layer, network, application. (II) transport

● Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected
by a direct link of R = 4 Mbps (for simplicity, consider 1Mbits = 1000K and 8
1Kbits=1000bits). Suppose the propagation speed over the link is 2.5 ×10
meters/sec.
(a) What is the propagation delay? (3 marks) 20k/2.5x108 = 0.08 sec
(b) Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is
sent continuously as one large message. What is the maximum number of bits that
will be in the link at any given time? (3 marks) transmission delay = .8 Mb/4Mbps =
0.2sec, prop delay = 0.08 sec. Num of bits = 4Mbpsx0.08 = 320000bits
(c) What information will you get if you take the product of bandwidth and
propagation delay? (3 marks) bit capacity of the link
(d) Assume that every bit spreads out uniformly in the channel, what is the width of
the bit in the channel over which it is traveling? (3 marks) 20000K/320000 = 62.5m

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy