10 packets are continuously sent over a 1 Mbps link. Each packet is of 1,000 bits long and RTT is 10 ms. What is the throughput of the link (i.e. on average, how many bits transmitted per second)?
A. 511.856 bps
B. 511.856 Kbps
C. 500 bps
D. 500 Kbps
E. 666.667 Kbps
E
We only consider one way transmission for this question.
Throughput =
Transmission delay = = 10ms
Propagation delay = RTT / 2 = 5ms
Throughput = = 666.667 Kbps
Which of the following statement about IP datagram is FALSE?
A. Routing protocols determine the routes that datagrams take between sources and destinations.
B. TTL field of IP header prevents a datagram from circulating in the network forever.
C. When a big datagram is fragmented into a series of smaller fragments, transport layer header will be replicated in each fragment.
D. On the Internet, datagrams from the same source may take different routes towards the destination.
E. MTU of the link-layer protocol places a limit on the length of a datagram.
C
A device (D) is used to connect a sender (S) and a receiver (R). Transmission rates of the links between sender and the device and between the device and receiver are and respectively. Ignore other types of delay, what is the end-to-end delay to send a packet of length ?
A. , if this device is a store-and-forward packet switch.
B. , if this device is a store-and-forward packet switch.
C. , if this device acts on individual bits and repeats every bit to receiver once receives it from sender.
D. , if this device acts on individual bits and repeats every bit to receiver once receives it from sender.
E. , if this device acts on individual bits and repeats every bit to receiver once receives it from sender.
E
A file is transferred over an existing TCP connection (i.e., 3-way handshake is already done). The connection is still open after transmission. The first and last TCP segments have the sequence numbers 12345 and 2345 respectively. The last TCP segment carries 1000 bytes of data. What could be the size of the file transferred?
A. 10,000 bytes
B. 4,294,957,296 bytes
C. 4,294,966,296 bytes
D. 4,294,958,296 bytes
E. None of the above
D
Similar to Midterm Practice 2 Q15, but use approximation.
The distance from a sender to a receiver is 10,000 km and the propagation speed is 2*10^8 m/s. Go-back-N protocol is used and window size is set to 10. Each packet is 2,000 bits long and the size of packet header is negligible. Assume that no packet is lost or corrupted during transmission. Ignore transmission, queueing and processing delays. How long does it take to send 1 million bits from the sender to the receiver?
A. 5 s
B. 50 s
C. 2.5 s
D. 0.005 s
E. None of the above
A
Propagation delay = = 50ms
Sender can send maximum of bits and need to wait for ACK
So, each time the delay = packet delay + ACK delay = 100ms
Each time is 20,000 bits, so 1,000,000 bits will be 50 times.
Total time = 50 * 100ms = 5s
Consider a sender and a receiver communicating using Selective Repeat protocol. Senderโs window size is 5. Sender just receives an ACK packet with sequence number 23. This ACK number falls within the senderโ window. Which of the following could possibly be the sequence number for the next packet transmitted by the sender?
A. 17
B. 18
C. 28
D. 30
E. None of the above
C
A Go-Back-N sender just receives an ACK packet with ACK number 14. This ACK number falls within sender window which has the window size 6. Every data packet embeds a k-bit sequence number field (k is a constant unknown to you).
Which of the following definitely CANNOT be the sequence number of the next packet transmitted by the sender?
A. 4
B. 9
C. 15
D. 19
E. 20
B
C,D,E are possible.
In the question, the ACK number can be 14, this means the minimum for k is 4.
If k = 4, largest seq number will be = 15. Then the window can be [14,15,0,1,2,3].
When sender receives ACK 14, the window can become [15,0,1,2,3,4]. So 4 is possible.
Consider sending a packet over a path from node , through nodes , till node . The links, from node to node , for each has the same link transmission rate (in bits/s) and propagation delay (in seconds). The packet has header bits and data bits.
The delay of a packet from node to node is defined to be the duration from when the last bit of the packet leaves node to when the last bit of the packet arrives at node . Suppose the delay also includes a processing time of seconds in each of the nodes . The processing time includes the waiting time in the queue.
Which of the following formula correctly gives the delay of a packet travelled from node to node ?
A.
B.
C.
D.
E. None of the above
A
Processing delay for nodes
Propagation delay for link
Notes: link 0 means link connecting node 0 and node 1
Transmission delay for nodes
Notes: transmission delay for node 0 is not included, because of how delay is defined in the question.
Two hosts A and B are separated by a router R in between. The bandwidth of the links between A and R and between R and B are 1 Kbps and 2 Kbps respectively. Ignore all other kind of delays. Suppose A sends 8*10^4 bits to B as a series of consecutive packets of 1,000 bits each, when (in seconds) will B receive all the data?
A. 40
B. 80
C. 80.5
D. 161
E. None of the above
C
We can visualised as follows
seq # | reach R at | reach B at |
---|---|---|
1 | t = 1 | t = 1.5 |
2 | t = 2 | t = 2.5 |
3 | t = 3 | t = 3.5 |
โฆ | โฆ | โฆ |
80 | t = 80 | t = 80.5 |
A huge file is transferred over an existing TCP connection (i.e., 3-way handshake is already done). The connection is still open after transmission. The first and last TCP segments have the sequence numbers 12,345 and 2,105 respectively. MSS is 1,024 bytes and TCP sends as much data as possible in a segment.
How many TCP segments are used to transfer the file (i.e. carries file data), assuming the communication channel is perfectly reliable?
(Hint: TCP sequence number will wrap up and restart from 0 after reaching the biggest sequence number)
Note: Remember sequence number is the "byte number" of the first byte of data in a segment. Doesn't include TCP header length.
Packets before wrap around:
Packet with wrap around sequence number
Packets after wrap around:
Total packets =
Consider a sender and a receiver communicating using Selective Repeat protocol. Every packet embeds a 3-bit sequence number field. Sender just sends a packet with sequence number 6. Sender window size is 3.
Which of the following CANNOT possibly be the sequence number of the next packet transmitted by sender?
A. 0
B. 2
C. 4
D. 5
E. 6
B
Two hosts A and B are connected by a router R as shown in the following diagram.
For link 1, link transmission rate is 1 Kbps and propagation delay is 100 milliseconds. For link 2, link transmission rate is 250 bps and propagation delay is 150 milliseconds. Suppose Host A sends 2000 packets to Host B continuously and each packet is 500 bits long. Host A starts sending the 1st packet at time = 0.
When (in seconds) will host B receive the packet (1 2000)?
A. 0.75 + 2
B. 2.75
C. 0.6 + 2
D. 0.6 + 2.15
E. None of the above
0.75 + 2k
Suppose two hosts are connected by a direct link of 1 Mbps. A stop-and-wait protocol is used to transfer 10 packets from the sending host to the receiving host. Each packet is 1000 bytes long. RTT is 24 milliseconds. No packet is lost or corrupted during transmission and ACK packets are of negligible size.
What is the throughput (in Kbps) of the transmission?
A. 40
B. 250
C. 770
D. 870
E. 1000
B
Similar to Mock Midterm Paper 1 Q1.3, but here stop-and-wait protocol is used, so we need to consider full RTT.
A Web server supports both HTTP/1.0 and HTTP/1.1. So far 100 clients have downloaded a web page from the server, which contains 1 HTML file and 2 images. Half of the clients run HTTP/1.0 and the other half run HTTP/1.1.
How many sockets has the Web server ever created?
A. 201
B. 200
C. 100
D. 101
E. None of the above
A
HTTP/1.0: 50 * 3 = 150
HTTP/1.1: 50
Also, HTTP runs on TCP, TCP server has a listening socket and is always present.
Total = 201
Which of the following statement is FALSE?
A. When a router receives an IP datagram with destination address 255.255.255.255, it must broadcast this IP datagram on all the interfaces except the interface this datagram is received.
B. One of the benefits of segmenting a big chunk of data into smaller packets for transmission in the Internet is to lower end-to-end delay.
C. MSS specifies the maximum size of a TCP segment, exclusive of the size of TCP header.
D. Hosts in the same subnet communicate with each other without intervening a router.
E. The maximum size of an IP datagram that can be transmitted over a link is restricted by the link MTU.
A
255.255.255.255 is a limited broadcast address used to reach all devices on the same local network.
Routers do not forward limited broadcast packets to other interfaces.
Knowing that you have taken CS2105, a friend comes to you for help with his laptop. He says that he cannot access the Web page hosted at www.example.com. Using the tools you have learned in CS2105, you run the following commands on his laptop to troubleshoot what could be the reason.
Which of the following is NOT the correct use of the corresponding tool?
A. You run telnet to check if www.example.com is listening on port 80.
B. You run traceroute to check if there is a route from the laptop to www.example.com.
C. You run dig to check if his DNS server is able to resolve the IP address of host name www.example.com.
D. You run ping to check if you can establish a TCP connection to www.example.com.
E. You run curl to check if www.example.com is responding to a HTTP request correctly.
D
ping uses ICMP
A Go-back-N sender just receives an ACK packet with sequence number . Before this ACK is received, sender's window is where is the window size. Suppose , packets may be lost or corrupted but will not be reordered. What is the smallest possible value of ?
A.
B.
C.
D.
E. None of the above
A
sender send packet with seq k, the packet is corrupted, so receiver send ack k - 1
Two hosts A and B are connected via a router. The link rate is 1 Mbps and propagation delay is 40 ms per link. The maximum size of a packet is 1 Kb and packet header is 80 bits. Suppose sender sends as much data as possible in a packet, packets are sent continuously and no packet is corrupted or lost during transmission.
How long (in milliseconds) does it take to send a 400 Kb file from A to B (from when the first bit of the first packet leaves A to when last bit of the last packet arrives at B)?
515.8ms (I got 515.6ms, dk what when wrong :/)
The file will be split in 434 packets with 1000 bits and 1 packets with 800 bits
Transmission delay for each first 434 packets = = 1ms
Transmission delay for last packet = = 0.8ms
We can visualise in table:
packet # | arrives at router | arrives at B |
---|---|---|
1 | 1 + 40 = 41ms | 41 + 1 + 40 = 82ms |
2 | 1(wait for packet #1) + 1 + 40 = 42ms | 42 + 1 + 40 = 83ms |
3 | 2(wait for packet #2) + 1 + 40 = 43ms | 43 + 1 + 40 = 84ms |
โฆ | โฆ | โฆ |
434 | 433 + 1 + 40 = 474ms | 474 + 1 + 40 = 515ms |
435 | 434 + 0.8 + 40 = 474.8ms | 474.8 + 0.8 + 40 = 515.6ms |
Notes: Subsequent packet will be pushed onto the link before previous packets reach router.
Sample solution given:
Number of packets =
Total number of bits send =
Length of first 434 packets: 1000 Length of last packet: 800
End-to-end delay = = 515.8ms
Two hosts A and B are km apart and are connected directly using a link with propagation delay of bit times and propagation speed of m/s. A is sending a sequence of packets, each is bytes in size, to B.
a) How long does it take for B to receive a packet?
b) A is using a sliding window protocol to communicate with B. What is the minimum window size A should use for the link to be fully utilized?
a) 16ms
Total delay = propagation delay + transmission delay
Propagation delay =
Transmission delay =
We are not given bandwidth or transmission rate, but are given link with propagation delay of bit times.
bit times refers to the time it takes to transmit 800 bits on the link.
propagation delay of bit times means the propagation delay is the same as the time it takes to transmit 800 bits on the link. So, bandwidth =
So, transmission delay =
Total delay =
b) 3
It takes 8ms to push 1 packet onto the link, and another 8ms to propagate to B. During the 8ms of propagating, A can send another packet. It takes 16ms for the ACK from B to reach A, so during this 16ms, A can also send packets.
Total free time = 8ms + 16ms = 24ms.
1 seconds can send 100k bits. So, 24ms can send 2400 bits = 300 bytes = 3 packets.
The diagram below shows a small network with five entities: hosts A and B are connected to a router R through a switch S. Host C connects to R directly. There is no other host, switch, or router in the network.
a) What is the maximum number of entries that could be in the switching table of S?
b) What is the maximum number of entries that could be in the ARP table of A?
c) What is the maximum number of entries that could be in the ARP table of C?
d) How many IP addresses are used in this network?
a) 3 {A,B,C}
b) 2 {R,B}
c) 1 {R}
d) 5 {A,B,C,R have 2 for 2 subnet}
A node is part of a network running distance vector routing protocol. has three entries in its routing table:
Destination | Cost | Next Hop |
---|---|---|
4 | ||
and are two unknown values (unknown to you, but known to ). Assume that the distance vector routing protocol has converged and the minimum cost from to every other node has been found. We denote as the link cost between and , and as the cost of the minimum cost path from to . The link cost is a positive integer.
We know that is 4, and is 10.
a) What is the minimum possible value for ?
b) What is the value for ?
a) 11
b) 6
We can visualise as follows
Then , so the minimum value of will be 11.
Notice that when the destination is , the router choose to go through , this means .
But at the same time, when the destination is , router choose to go through instead of first. So, .
Combining, both conditions, must be equal to . So .
Host A and B are connected by a NAT-enabled router R as shown in the following diagram. Suppose A sends a packet to host B and B replies with a packet. What is the destination IP address and MAC address in the packet replied by B?
A. Dest IP address: 102.33.17.1; dest MAC address: E6-E9-00-17-BB-4B
B. Dest IP address: 102.33.17.1; dest MAC address: CC-49-DE-D0-AB-7D
C. Dest IP address: 192.168.2.3; dest MAC address: E6-E9-00-17-BB-4B
D. Dest IP address: 192.168.2.3; dest MAC address: CC-49-DE-D0-AB-7D
E. Dest IP address: 192.168.2.1; dest MAC address: CC-49-DE-D0-AB-7D
B
Since this is through a NAT-enabled router, Router R translates A's private IP address (192.168.2.3) into its public IP (102.33.17.1) when forwarding the packet to B. Therefore: