CN Final Ques
CN Final Ques
CN Final Ques
Discuss how to determine that the packets are fragmented parts of an IP packet
(started at some source host). Compute the payload size of the original source IP
packet. Can these fragmented packets be reassembled to reconstruct the original
source packet? If not, determine how many bytes of the original payload is still
missing?
1.4 PP#4
1. Determine the maximum size of a TCP segment.
2. In a host, a TCP segment of 2100 bytes is given to the network layer for its delivery
across two networks. The first network carries a maximum payload of 1200-bytes
per link layer frame and the second network carries a maximum payload of 400-bytes
per frame. Assume that all TCP and IP headers are 20 bytes. If IP overhead for
a transmission in a network refers to the sum of ip header sizes of all fragmented
ip packets resulted out of source transmission, then the total IP over head in the
second network for this transmission is
4. Consider an internetwork whose gateway router is NAT enabled and the IP address
of this router’s internet side interface is 132.89.23.145. A (with IP 10.0.12.13) and B
(10.1.2.1) are on this internetwork and both make a connection with a host C which
is off this internetwork. Provide valid entries in the NAT table of the gateway router
for these two connections.
5. Let R be a NAT enabled gateway router of a certain internetwork and the IP address
of its internet side interface is 124.56.34.17. Consider the NAT table of R shown
15
WAN Side LAN Side
10.0.1.2, 1245
10.0.1.23, 2450
10.0.1.2, 4523
10.0.1.17, 2450
below. The entries in the right side column of the table got added in response to
the outgoing connections that R had received from this internetwork.
(a) Fill up the left side of this table with valid entries.
(b) Suppose a host at 10.0.1.2 connects to a server application (based on TCP),
running at a server that is off this internetwork. As a result, a TCP session
will be established between this host and the destination server. All the IP
packets (carrying TCP segments) of this session will be manipulated by NAT.
To destination, the connection will appear to be generated from NAT as a source
host. Do you think, NAT will establish two TCP sessions, one with the host
and one with the destination, to ensure TCP connection between destination
and host? Justify your answer.
6. Let a host A initiates a TCP connection with another host B. Provide valid entries
to the table below that Host A and B might choose during the three-way handshake
protocol.
7. Consider a TCP segment with the minimum size header. Most header fields will
always carry valid entries except one/two. Give an example of one such field that
might not carry any valid entry. Though the entry is not valid, it will still carry
some value (fields can’t go blank). This means the receiver needs to be confirmed of
the validity of the entry of this field. How is that ensured?
8. In the IP packet, the checksum field computed only over the header fields, excluding
the IP payload. Why do you suppose this design was chosen?
9. Suppose the network layer at a host has just received an IP packet from its link-layer
below. The IP packet has UDP segments as a payload. How does the network layer
finds out of the same so that it can directly handover the segment to UDP protocol?
10. Why does the Offset field in the IP header measure the offset in 8-byte units?
Hint: Recall that the offset field is 13 bit long
16
11. Suppose a TCP message that contains 2048 bytes of data and 20 bytes of TCP
header is passed to IP for delivery across two networks of the Internet (i.e., from the
source host to a router to the destination host). Each network’s MTU (maximum
transmission unit) gives the size of the largest IP datagram that can be carried in a
link-layer frame. The first network uses 14-byte headers (link-layer frame headers)
and has an of 1024 bytes; the second uses 8-byte headers with an MTU of 512 bytes.
Give the sizes and offsets of the sequence of fragments delivered to the network layer
at the destination host. Assume all IP headers are 20 bytes.
12. Determine the positive integer x such that the ports < x are reserved for well-known
applications.
14. Two hosts in two different networks have just established a TCP connection. During
the handshake phased, ip packets carrying tcp connection request and connection
granted segments were passed through an intermediate router R1 somewhere in
the Internet. Would you say that all subsequent data packets (as part of this tcp
connection) between these two hosts will also pass through R1? Justify your answer.
15. Consider a direct link with 1-Mbps bandwidth and RTT of 100 milliseconds. Show
that it takes 80 RTT times to completely transmit an 1-MB file over this link.
16. Suppose a link between A and B has bandwidth 10 Mbps and the latency of a 10000-
bits frame on this link is given as 50 milliseconds. Assuming there is no queuing
delay, the propagation delay of the link is
(a) 25
(b) 51
(c) 50
(d) 48
(e) None of the above
17. (GATE-15) A link has a transmission speed of 106 bits/sec. It uses frames of size 1000
bytes each. Assume that the acknowledgment has negligible transmission delay, and
that its propagation delay is the same as the data propagation delay. Also assume
that the processing delay at nodes are negligible (i.e., the queuing time is zero). The
17
efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of
the one-way propagation delay (in milliseconds) is . . ..
Proof: Given 1+2T 1(M/L) = 1+2T (1016 /8000) = 1
1+0.25T ×103
is equal to 41 . Thus 1
1+0.25T ×103 )
=
1
4
. This implies T = 12 milliseconds.
18. (GATE-15) Suppose that the stop-and-wait protocol is used on a link with a bit
rate of 64 kilobits/sec and 20 milliseconds propagation delay. Assume that the
transmission time for the acknowledgment and the processing time at nodes are
negligible. Then the minimum frame size in bytes to achieve a link utilization of at
least 50% is . . ..
Proof: Given requirement 1+2T 1(M/L) ≥ 12 , where T = 20/103 and M = 64 × 103 .
Solving for L, we get L ≥ 2560 bits = 320 bytes.
19. Consider a direct link with 10 Mbps bandwidth. It uses frames of size 20Kb each.
The one-way propagation delay of the link is 19 milliseconds. Assume that the
acknowledgment has negligible transmission delay, and also processing delay at nodes
are negligible. Then the efficiency of the stop-and-wait protocol in this setup is
exactly
(a) 2%
(b) 10%
(c) 5%
(d) 12%
(e) None of the above
20. (GATE-16) A sender uses the stop-and-wait protocol for reliable transmission of
frames. Frames are of size 1000 bytes and the transmission rate at the sender is
80 Kbps. Size of an acknowledgment is 100 bytes and the transmission rate at the
receiver is 8 Kbps. The one-way propagation delay is 100 milliseconds. Assuming
no frame is lost, show that the sender throughput is 2500 bytes/second.
1
Hint: It took the sender 10 seconds to transmit 1000 bytes frames completely into
1 1 1 1 4
the medium. The total time out it 10 + 10 + 10 + 10 = 10 seconds. The sender
4
therefore transmits 1000 bytes in 10 seconds. In one second it transmits 2500 bytes
- its throughput.
21. (GATE-14) Consider the GBN that uses a frame size of 1 KB to send data on a 1.5
Mbps link with a one-way propagation delay of 50 msec. To achieve a link utilization
of 60%, the minimum number of bits required to represent the sequence number field
is . . ..
Proof: The efficiency of the simple Stop-and-Wait would be 1+2T 1(M/L) = 19.75 1
,
−3 6
where T = 50 × 10 , M = 1.5 , and L = 8000. Sending one packet of size 1KB in
1
the simple Stop-and-Wait protocol gives efficiency of 19.75 . To increase the efficiency
to 60%, the sender therefore needs to send about 19.75 × 60% = 11.85 packets
consecutively before starts waiting for the acknowledgment. Thus Sender window
18
size is at least 11. Thus M axSeqN um ≥ SW S + 1 = 12. Thus it needs at least 4
bits of header to implement sequence numbers.
22. Consider the protocol rdtC. Describe the reason behind introducing sequence num-
bers 0, 1 into this protocol. Given a time line diagram instance in support of your
reason.
24. In GBN protocol, the sequence numbers used are 0, 1, . . . , k. Show that k ≥ N ,
where N is the sender window size. Describe an instance in which GBN will fail if
k is set to N − 1.
25. Yes/No
(a) Suppose hosts S and R are running a rdt protocol in between them. The
rdt.send() is run by S only.
(b) The stop-and-wait protocol allows sender to buffer at most one frame.
(c) The stop-and-wait protocol allows sender to buffer more than one frames.
(d) WithGBN,it is possible for the sender to receive an ACK for a packet that falls
outside of its current window.
(e) Stop-and-wait protocol is the same as the GBN protocol with a sender and
receiver window size of 1.
26. Consider a GBN protocol instance when sender’s timer goes off and at this time base
is set to 5 and nextseqnum is set to 10. Determine the number of frames that sender
will retransmit immediately.
27. Consider a GBN protocol instance when sender’s timer goes off and at this time
base is set to 5 and nextseqnum is set to 2. It is given that N = 7. Determine the
number of frames that sender will retransmit immediately.
1.5 PP#5
1. A host received an Ethernet frame. The first 12 bytes of its payload are given below
(see Figure 10). Assuming ip headers of length 20 bytes, determine the type of the
data field containing 27th and 28th bytes of the payload.
19
2. A host received an Ethernet frame. The payload is an ip packet whose complete
header is given below. Determine the type of the data field containing 23rd and
24th bytes of the payload.
3. Determine the authoritative DNS server (name server) details for https://www.berkeley.edu/.
Determine the ip address of one-of-the mail server for https://www.berkeley.edu/.
5. Consider an IP packet whose header-field values (selected few) are given below:
6. Suppose that you are given three IP packets - pkt1, pkt2, and pkt3 such that exactly
one of these is a fragment packet (not the last-fragment), one is a last-fragment
packet, and one is an un-fragmented packet. Note that the identification numbers of
these three packets are all different. What fields in these three packets can be used
to identify their respective categories?
7. Consider a network, N , in which there exists five routers R1, . . . , R5. For intra-
domain routing in N , all routers are running the OSPF routing algorithm. The
link-state advertisements received by R2 are given below:
20
R4 70.130.252.0/22 133.248.0.0/13 80.80.70.224/27
R1 80.75.192.0/18 60.22.22.240/28
R5 133.248.0.0/13 21.25.75.252/30 60.72.35.240/28
R3 80.75.192.0/18 60.72.35.240/28 35.20.254.0/23
where each row-entry is the link state information of a router, i.e., a list of networks
that are directly connected to the router. The R2 serves as the gateway router
for the following hosts A, B, C with IP addresses 21.25.75.254, 35.20.254.128, and
80.80.70.230 respectively. Also, E, D with ip addresses 60.22.22.250 and 70.130.254.167
respectively are also present in N . Give a drawing of N satisfying these constraints.
8. An autonomous system AS1 has two gateway routers R1 and R2. The following
BGP-advertisements received by R1 and R2 respectively:
• R1 ← 120.23.12.0/18 | AS3, AS2 | 110.25.12.5
• R1 ← 125.23.12.0/18 | A, AS4 | B
• R1 ← 140.23.12.0/18 | AS3, AS2, C | 110.25.12.5
• R2 ← 140.23.12.0/18 | AS5, AS2, AS6 | 110.28.12.5
Determine A, B, and C.
9. Let N 1, N 2 be two networks. Consider the following BGP-routes received by the
gateway router R1 of N 1:
• R1 ← N 2 | AS3 | 111.25.13.1
• R1 ← N 2 | AS3, AS2 | 111.25.13.1
• R1 ← N 2 | AS3, AS1, AS2 | 111.25.13.1
Based on this information give a drawing of how N 1, N 2 and AS1, AS2, AS3 are
connected to each other?
10. Consider the following network consisting of stub networks SN1, SN2, SN3, and
service provider networks AS1, AS2. Network addresses for all subnetworks have
been assigned.
21
(a) Describe the BGP advertisement that Router1 will receive (over eBGP) from
Router6 for the network 10.0.0.0/8. You must assign router interfaces with
appropriate IP addresses so that the exact details are included in the BGP
advertisements. Describe the BGP advertisement that Router3 will receive
(over eBGP) from Router2 for the network 10.0.0.0/8.
(b) Describe the BGP advertisement that Router2 will receive (over iBGP) from
Router1 for the network 10.0.0.0/8.
(c) Consider the forwarding table at Router2 and determine the next-hop entry
against target network 10.0.0.0/8. Consider the forwarding table at Router0
and determine the next-hop entry against target network 10.0.0.0/8. It is given
that all links in AS2 are of bandwidth 100MB/sec, except the link between
Router0 and Router8 having bandwidth of 5MB/sec.
11. Consider the following network (see Figure 12) consisting of stub network SN3 and
service provider networks AS1, AS2, and AS3.
Figure 12
Laptop1 has received from the DHCP server in SN3 the following information: gate-
way router IP = 212.152.173.125, and subnet mask = 255.255.240.0.
22
Byte Number Binary Value
1st 01000101
10th 00010001
21st 00000000
22nd 01000011
Determine the 18th byte value in the above IP packet. Based on these values H
decides to drop the packet as it realises that the packet payload is meant for a
different host - say K. Discuss if it is possible for H to determine a possible IP
address that K would admit.
13. A server application, which is listening at port number 3456, has just received a SYN
segment. If the server decides to accept the connection, then it will create a socket
for this connection and send back a SYNACK segment to the client. The socket will
be identified by the tuple - (client IP, source-port number, server ip, 3456).
In the following, we propose a different way to handle the incoming TCP connec-
tion. Assume that the server has a secret number a. Suppose the incoming SYN
segment has a source-port number equal to x. Suppose the server decides to ac-
cept the connection. The socket for this connection, if created, will be identified
by the tuple - (source-IP, x, server-IP, 3456). In this new approach, the server
doesn’t immediately create the socket, but it sends back a SYNACK segment to
the client nonetheless. In the SYNACK segment, the sequence number s is set to
s = Hash(aksource-IPkserver-IPkxk3456) (where Hash denotes a hash-function, and
k denotes concatenation).
Suppose the client acknowledges the server’s connection granted SYNACK segment
and returns an ACK segment (syn=0). Determine the value in the acknowledg-
ment number field of this ACK segment returning from the client. How is the
server going to determine if this ACK corresponds to an earlier SYN and SYNACK
sequence of segments given that the server didn’t create the necessary socket before
it sent back the SYNACK segment?
23