Semester:
Semester: 5th
4th
Sub & Code: OS & CS - 2009
Subject Name:-
Branch (s): CSE,CN
IT,&CSSE,
Code:-CSCE
CS 30003
Branch (s): -
AUTUMN MID SEMESTER EXAMINATION-2024
Scheme of Evaluation with Model Answers
School of Computer Engineering
Kalinga Institute of Industrial Technology, Deemed to be University
Subject Name: Computer Networks
[CS 30003]
Time: 1 1/2 Hours Full Mark: 20
Answer Any four questions including question No.1 which is compulsory.
The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable and all parts of a
question should be answered at one place only.
1. Answer all the questions. [ 1 Mark X 5 ]
Answering correctly 1 mark. Partial answer 0.5 marks
a) What is the main difference between a Fully Qualified Domain Name (FQDN) and a
Partially Qualified Domain Name (PQDN)? CNAME record are used for which purpose.
A fully qualified domain name (FQDN) is the complete domain name for a specific
computer/ host, on the Internet. It consists of two parts: the hostname and the
domain name. If a label is not terminated by a null string, it is called a partially
qualified domain name (PQDN). A PQDN starts from a node, but it does not reach
the root. It is used when the name to be resolved belongs to the same site as the
client.
Canonical Name or CNAME is a DNS record that maps an alias name to a true or
record that maps an alias name to a true or
canonical domain name.
onical doman name
b) The following is the contents of a UDP header in hexadecimal format.
0045 DF00 0058 0000
Calculate the destination port number and source port number? What is the length of the
data? Has the sender calculated a checksum for this packet.
The destination port number is the second four digits (DF00)16 = 57,088.
The source port number is the first four digits or (0045)16 = 69.
The total length of the datagram is the third four bits (0058) 16 = 88 bytes.
The length of the data is 88 -8 = 80 bytes.
The sender has not calculated the checksum for this packet because the value of
the checksum is all zeros.
c) In Stop and wait protocol every 4th packet is lost and we need to send total 15(fifteen)
packets so how many transmission it took to send all the packets?
Semester:
Semester: 5th
4th
Sub & Code: OS & CS - 2009
Subject Name:-
Branch (s): CSE,CN
IT,&CSSE,
Code:-CSCE
CS 30003
Branch (s): -
After 4 sends, we have a loss. So, packet 4 lost, resent. Packet 7 lost (since 4 was
resent), resent. Packet 10 lost, recent and Packet 13 lost, recent. So, total
transmission took place is 19.
d) Assume there is a server with the domain name www.kiit.ac.in.
Write the HTTP request that needs to retrieve the document /usr/users/doc. The client
accepts MIME version 1, GIF or JPEG images.
A possible request
e) In TCP, how many sequence numbers are consumed by each of the following segments?
(i) SYN, (ii) ACK, (iii) SYN+ACK, (iv) Data
A SYN segment consumes one sequence number.
An ACK segment does not consume any sequence numbers.
A SYN + ACK segment consumes one sequence number because it is a SYN
segment.
For DATA segment, the number of sequence numbers consumed depends on the
amount of data being sent. A DATA segment consumes n sequence numbers, where
n is the number of bytes carried by the segment.
2.(a) A client's browser sends an HTTP request to a website. The website responds with a handshake
and sets up a TCP connection. The connection setup takes 8.4 mili seconds(ms), including the RTT. The
browser then sends the request for the website's index file. The index file references 22(twenty two)
additional images, which are to be requested/downloaded by the client's browser.
Assuming all other conditions are equal, how much longer would non-persistence HTTP take than
persistence HTTP. [ 2.5 Marks ]
Answering correctly 2.5 Marks. Partial answer can be awared based on the label of understanding.
Given that the connection setup takes 2.6 ms (including the RTT), we can calculate the time
difference as follows:
For non-persistent HTTP, a new connection is needed for each file. Therefore, the total time
taken would be:
Number of files * Time per connection
This includes the index file and the 22 images, so:
(1 index file + 22 images) * 8.4 ms = 23 * 8.4 ms = 193.2 ms
For persistent HTTP, only one connection is needed for all files. Therefore, the total time taken
would be:
1 * Time per connection = 1 * 8.4 ms = 8.4 ms
Semester:
Semester: 5th
4th
Sub & Code: OS & CS - 2009
Subject Name:-
Branch (s): CSE,CN
IT,&CSSE,
Code:-CSCE
CS 30003
Branch (s): -
Time Difference
The time difference between non-persistent and persistent HTTP would be:
Time for non-persistent - Time for persistent = 193.2 ms - 8.4 ms = 184.8 ms
So, non-persistent HTTP would take 184.8 ms longer than persistent HTTP under
these conditions.
2.(b) Describe the following terms related to Eletronic mail applications. [ 2.5 Marks ]
(i) Eletronics mail architecture.
(ii) Mail Transfer Phases,
(iii) Message access agent,
(iv) Multipurpose Internet mail extension
Answering correctly Full marks. Partial answer can be awared based on the label of understanding.
Refer. Section 10.3.3 of textbook for description.
3.(a) State how to compute different types of delays in packet data network. Which of these delays are
constant and which are variable?
Answering different types of delays: 1 Mark.
Delays:
Transmission delay - The time taken to transmit a packet from the host to the
transmission medium.
Propagation delay - After the packet is transmitted to the transmission medium, it has to
go through the medium to reach the destination.
Queuing delay - time the packet spends in routing queues.
Processing delay - Time taken to process the data packet by the processor.
Queueing delay is variable other are constant for each pactet.
Calculate the total time required to transfer a 1.5MB file based on following information.
The bandwidth is 10Mbps, but after we finish sending each data packet we must wait one RTT before
sending the next.
Assuming a RTT of 80 ms, a packet size of 1 KB data, and an initial 2×RTT of “handshaking” before
data is sent. [ 2. 5 Marks ]
Solving the numericals correctly 1.5 Marks. Wrong answer Zero mark.
We will count the transfer as completed when the last data bit arrives at its destination
File size of 1.5 MB=12582912bits.
Initial RTTs (160 ms) + 12,582,912/10,000,000 bps (transmit) + RTT/2 (propagation)
≈1.458seconds.
Number of packets required =1.5MB/1KB=1536.
Semester:
Semester: 5th
4th
Sub & Code: OS & CS - 2009
Subject Name:-
Branch (s): CSE,CN
IT,&CSSE,
Code:-CSCE
CS 30003
Branch (s): -
To the above we add the time for 1535 RTTs (the number of RTTs between when packet 1 arrives
and packet 1536 arrives), for a total of 1.458+122.8 = 124.258 seconds.
3(b) Draw the TCP header format with the help of a diagram. Explain briefly each fileld. [2.5 Marks ]
Answering correctly Full marks. Partial answer can be awared based on the label of understanding.
Refer Section 9.4.3 of Textbook for description.
4.(a) Derive the realationship between window size and sequence number in Go Back N(GBN) and
Seletive Repeat (SR) flow control protocol.
Deriveing the realationship between window size and sequence number in Go Back N(GBN) and
Seletive Repeat (SR) flow control protocol: 1 Mark.
By considering sequence number as three bit. Calculate the window size for both GBN and SR. With a
neat diagram show how it will affect if the window is made larger than the calculated value for both
GBN and SR. [ 2. 5 Marks ].
By considering sequence number three bit the maximum window size would be 7 segment for GBN and
4 segment for SR. Proper explanation with diagram 1.5 Marks. Partial answer can be awared based on
the presentation.
4.(b) Sender A needs to send a message consisting of nine packets to Receiver B using a siding window
(window size 3) and Go-Back-N (GBN) strategy. All packets are ready and immediately available for
transmission. If every 5th packet that A transmits gets lost(but no acks from B ever get lost), then what
is the number of packets that A will transmit for sending the message to B? [ 2.5 Marks ]
Solving correctly 2.5 Marks. Wrong answer Zero mark.
Since all packets are ready initially itself, we can assume a timeout is detected after all
possible packets are sent. So, the sending happens as shown as explain below. For 9 packets
answer will be 16.
Let's say we have 9 frames to send
12345678 9
We will send 1 then window will slide and currently 2 3 4 will be frame in the window then we will
send 2 window will slide now currently 3 4 5 will be in window snapshot then we will send 3 and
window will slide again and current snapshot will have 4 5 6 in window then next 4 will be sent
current snapshot will be 5 6 7.
Now point 2 if 5th one is lost then what frames will be sent again well start from 5th and go to
end of window that is 7 as window size is 3 so 5 6 7 will be sent again. Try to work it out by using
above 2 points plus don't forget to slide the window ahead as you go on sending frame and receive
ack. Remember 5 6 7 were sent before as 5 was not received 6 7 were discarded make sure you
count then as well
If you get it right the sequence you will get at the end is
1 2 3 4 5 6 75 6 7 8 97 8 9 9
Semester:
Semester: 5th
4th
Sub & Code: OS & CS - 2009
Subject Name:-
Branch (s): CSE,CN
IT,&CSSE,
Code:-CSCE
CS 30003
Branch (s): -
Above description explain through diagram. Numbering is starting from 0 to 8.
5.(a) In a TCP connection, the initial sequence number is 2171. The clients open the connection, sends
three segments, second of which carries 1000 bytes of data and closes connections. What is the values of
the sequence in each of the following segments sent by clients? [ 2.5 Marks ]
(i) SYN segment
(ii) Data Segment
(iii) FIN segment
Answering correctly Full marks. Partial answer can be awared Proportionally.
The sequence number in the SYN segment is 2171. The SYN segment consumes one
sequence number; the next sequence number to be used is 2172.
The sequence number in the data segment is 2172 (which represents the sequence number
of the first byte). The bytes in the packets are numbered 2172 to 3171. Note that the
client sends the data with the second packet (no separate ACK segment).
The sequence number in the FIN segment is 3172. Note that the FIN segment does
consume a sequence number, but it needs a sequence number to be acknowledged
5. (b) Briefly mention different TCP states and draw TCP state transition diagram. [ 2.5 Marks ]
Mentioning correctly with proper diagram, label and description Full marks. Partial answer can be
awared based on the presentation. Refer Section 9.4.5 of Textbook for description.