computer-network-mid
computer-network-mid
Computer Network-Mid
Problem solution
Saturday, March 16, 2024 9:07 AM
Chapter 1:
1. CIRCUIT SWITCHING
Q1:
Consider the circuit-switched network shown in the figure below, with circuit switches A, B, C, and D.
Suppose there are 15 circuits between A and B, 11 circuits between B and C, 11 circuits between C and
D, and 18 circuits between D and A.
a. Suppose that every connection requires 2 consecutive hops, and calls are connected clockwise. For
example, a connection can go from A to C, from B to D, from C to A, and from D to B. With these
constraints, what is the is the maximum number of connections that can be ongoing in the network at
any one time?
- Solution: Find the max between the sum of the bottleneck links for cases A->C and B->D, but don't
forget about bottleneck links
A to C =min(15,11)=11
B to D =min(11,18)=11
C to A =min(11,18)=11
D to B =min(28,15)=15
a=(A to C)+(C to A)=22
b=(B to D)+(D to B)=26
Max(a,b)=26
b. Suppose that 15 connections are needed from A to C, and 16 connections are needed from B to D. Can
we route these calls through the four links to accommodate all 31 connections? Answer Yes or No
- Solution: Taking from the previous question, is the sum of the two connections greater than the value
we calculated in question a?
- No
Q2:
Consider the circuit-switched network shown in the figure below, with circuit switches A, B, C, and D.
Suppose there are 12 circuits between A and B, 19 circuits between B and C, 12 circuits between C and
D, and 12 circuits between D and A.
What is the maximum number of connections that can be ongoing in the network at any one time?
- Solution:
12+19+12+12=55
Q3:
Suppose that these maximum number of connections are all ongoing. What happens when another call
connection request arrives to the network, will it be accepted? Answer Yes or No
- Solution: If all connections are full, the request will be blocked
- No
2. Which of the characteristics below are associated with the technique of packet switching?
Select all correct answers. [Hint: more than one of the answers is correct].
- This technique is used in the Internet.
- Data may be queued before being transmitted due to other user’s data that’s also
queueing for transmission.
- Resources are used on demand, not reserved in advance.
- Congestion loss and variable end-end delays are possible with this technique.
3. Which of the characteristics below are associated with the technique of circuit switching?
Select all correct answers. [Hint: more than one of the answers is correct].
- This technique was the basis for the telephone call switching during the 20th century and
into the beginning of this current century.
- Reserves resources needed for a call from source to destination.
- Frequency Division Multiplexing (FDM) and Time Division Multiplexing (TDM) are two
approaches for implementing this technique.
4.
Consider the circuit-switched network shown in the figure below, with four circuit
switches A, B, C, and D. Suppose there are 20 circuits between A and B, 19 circuits
between B and C, 15 circuits between C and D, and 16 circuits between D and A.
What is the maximum number of connections that can be ongoing in the network at any
one time?
- 20+19+15+16=70
5. When we say that the Internet is a “network of networks,” we mean? Check all that apply
(hint: check two or more).
- The Internet is made up of a lot of different networks that are interconnected to each
other.
- The Internet is made up of access networks at the edge, tier-1 networks at the core, and
- The Internet is made up of access networks at the edge, tier-1 networks at the core, and
interconnected regional and content provider networks as well.
6. Consider a scenario in which 5 users are being multiplexed over a channel of 10 Mbps.
Under the various scenarios below, match the scenario to whether circuit switching or
packet switching is better.
- Neither works well in this overload scenario:
Each user generates traffic at an average rate of 2.1 Mbps, generating traffic at a rate of
15 Mbps when transmitting
- Packet switching:
Each user generates traffic at an average rate of 0.21 Mbps, generating traffic at a rate of
15 Mbps when transmitting
- Circuit switching:
Each user generates traffic at an average rate of 2 Mbps, generating traffic at a rate of 2
Mbps when transmitting
- 0.000012 secs
- Transmission delay = L/R = (1500*8)/1 000 000 000 = 1.2*10^-5
Suppose a packet is L = 1200 bytes long (one byte = 8 bits), and link transmits at R = 100 Mbps (i.e., a
link can transmit bits 100,000,000 bits per second). What is the transmission delay for this packet?
- Packet transmission delay Tt = length of the packet/Bandwidth of the link = L/B = 8*10^3/10^8 = 8
*10^-5 secs
- Solution: 0.0033
- Length of the packet (L) = 8000 bits=8*10^3 bits
At link 2, we know that, Link length (d) = 1000 Km = 1000*10^3 m = 10^6 m
The speed of light propagation delay on each link is 3x10^8 m/sec
4. What is the maximum throughput achievable between sender and receiver in the scenario shown
below?
lower when copying a big file on a busy network than when copying the same file on a quiet
network. There are several techniques to assess throughput, but bits per second is the most
popular (bps). By choosing a faster connection type, bringing the two locations closer together, or
lessening network traffic, throughput can be boosted. For applications that demand fast data
transfer, such streaming video or online gaming, increasing throughput is crucial. Because
transmission delays are produced by links with low transmission speeds, the throughput is
dependent on such speeds, and the highest throughput is 1.5 Mbits/sec.
5. COMPUTING THROUGHPUT
Consider the scenario shown below, with four different servers connected to four different clients
over four three-hop paths. The four pairs share a common middle hop with a transmission
capacity of R = 300 Mbps. The four links from the servers to the shared link have a transmission
capacity of RS = 50 Mbps. Each of the four links from the shared middle link to a client has a
transmission capacity of RC = 90 Mbps.
What is the maximum achievable end-end throughput (an integer value, in Mbps) for each of four
client-to-server pairs, assuming that the middle link is fairly shared (divides its transmission rate
equally) and all servers are trying to send at their maximum rate?
- Solution: 50 Mbps
Assuming that the servers are all sending at their maximum rate possible, what are the link
utilizations for the server links (with transmission capacity RS)?
- Solution: Link Utilization = Data Rate / Link Capacity = RS / RS = 50 Mbps / 50 Mbps = 1.00
Assuming that the servers are all sending at their maximum rate possible, what are the link
utilizations of the shared link (with transmission capacity R)? Enter your answer in a decimal form
of 1.00 (if the utilization is 1) or 0.xx (if the utilization is less than 1, rounded to the closest xx).
- Solution:
Server Data Rate: We know each server transmits at its maximum rate (RS) of 50 Mbps.
Total Server Traffic: Since there are four servers, the total data rate leaving the servers towards
the shared link is:
Shared Link Utilization: The shared link utilization is the ratio of the total data rate it carries to its
maximum capacity (R).
Assuming that the servers are all sending at their maximum rate possible, what are the link
utilizations of the client links (with transmission capacity RC)? Enter your answer in a decimal form
of 1.00 (if the utilization is 1) or 0.xx (if the utilization is less than 1, rounded to the closest xx).
- Solution:
Client Link Utilization Calculation:
Therefore, to determine the client link utilization, we simply compare the effective data rate each
client receives to the capacity of each client link (RC).
(typically).
Link layer Transfer of data between Frame
neighboring network devices.
2. Which of the definitions below describe what is meant by the term "encapsulation"?
Taking data from the layer above, adding header fields appropriate for this layer, and then placing the
data in the payload field of the “packet” for that layer.
NETWORKING HISTORY
Early 1960's: Early studies of packet switching by Baran, Davies, Kleinrock.
Late 1960's: First ARPAnet node operational.
1970's: Internetting: DARPA researchers connect three networks together.
Early 1980's: The Internet Protocol (IP) is standardized in RFC 791.
Late 1980's: Congestion control is added to the TCP protocol.
1990's: The WWW starts up (note: the WWW design started at the end of previous decade).
2000-2010: Software-defined networking begins.
2010 - 2020: The number wireless Internet-connected devices surpasses the number of connected wired
devices.
HTTP/1.0 200 OK
Date: Wed, 09 Sep 2020 23:46:21 +0000
Server: Apache/2.2.3 (CentOS)
Last-Modified: Wed, 09 Sep 2020 23:51:41 +0000
ETag:17dc6-a5c-bf716880.
Content-Length: 418
Connection: Close
Content-type: image/html
Will the web server close the TCP connection after sending this message?
- Yes, the server will close this connection because version 1.0 of HTTP is being used, and TCP
connections do not stay open persistently.
7. Which of the following are advantages of using a web cache? Select one or more answers.
- Caching uses less bandwidth coming into an institutional network where the client is located, if
the cache is also located in that institutional network.
- Caching generally provides for a faster page load time at the client, if the web cache is in the
client’s institutional network, because the page is loaded from the nearby cache rather than from
the distant server.
8. Which of the following are changes between HTTP 1.1 and HTTP/2? Note: select one or more
answers.
- HTTP/2 allows a large object to be broken down into smaller pieces, and the transmission of those
pieces to be interleaved with transmission other smaller objects, thus preventing a large object
from forcing many smaller objects to wait their turn for transmission.
- HTTP/2 allows objects in a persistent connection to be sent in a client-specified priority order.
9. Which of the following pieces of information will appear in a server’s application-level HTTP reply
message? (Check all that apply.)
- A response code
- A response phrase associated with a response code.
10. What is the purpose of the If-Modified-Since field in a HTTP GET request message
- To indicate to the server that the client has cached this object from a previous GET, and the time it
was cached.
11. What is the purpose of a cookie value in the HTTP GET request?
- The cookie value itself doesn't mean anything. It is just a value that was returned by a web server
to this client during an earlier interaction.
12.
Suppose a client is sending an HTTP GET message to a web server, gaia.cs.umass.edu. Suppose the
client-to-server HTTP GET message is the following:
Does the client have a cached copy of the object being requested?
- Yes, because this is a conditional GET.
13.
Suppose an HTTP server sends the following HTTP response message a client:
HTTP/1.0 200 OK
Date: Wed, 09 Sep 2020 23:46:21 +0000
Server: Apache/2.2.3 (CentOS)
Last-Modified: Wed, 09 Sep 2020 23:51:41 +0000
ETag:17dc6-a5c-bf716880.
Content-Length: 418
Connection: Close
Content-type: image/html
Will the web server close the TCP connection after sending this message?
- Yes, because this is HTTP 1.0
Email
1. How many RTTs are there from when a client first contacts an email server (by initiating a TCP
session) to when the client can begin sending the email message itself – that is following all initial
TCP or SMTP handshaking required?
Recall the figure below from our class notes:
- Solution: 3
2. Which of the following characteristics apply to HTTP only (and do not apply to SMTP)? Note:
check one or more of the characteristics below.
- Operates mostly as a “client pull” protocol.
- Uses server port 80.
- Uses a blank line (CRLF) to indicate end of request header.
3. Which of the following characteristics apply to SMTP only (and do not apply to HTTP)? Note:
check one or more of the characteristics below.
- Uses server port 25.
- Uses CRLF.CRLF to indicate end of message.
- Operates mostly as a “client push” protocol.
4. Which of the following characteristics apply to both HTTP and SMTP? Note: check one or more of
the characteristics below.
- Has ASCII command/response interaction, status codes.
- Is able to use a persistent TCP connection to transfer multiple objects.
5. Match the functionality of a protocol with the name of a the email protocol (if any) that
implements that functionality.
- SMTP: Pushes email from a mail client to a mail server.
- Neither SMTP nor IMAP does this: Pulls mail from one mail server to another mail server.
- IMAP: Pulls email to a mail client from a mail server.
2. What is the value of caching in the local DNS name server? Check all that apply.
- DNS caching results in less load elsewhere in DNS, when the reply to a query is found in the local
cache.
- DNS caching provides for faster replies, if the reply to the query is found in the cache.
3. What information does the type “A” resource record hold in the DNS database? Check all that
apply.
- A hostname and an IP address.
4. Check all of the phrases below that state a true property of a local DNS server.
- The local DNS server can decrease the name-to-IP-address resolution time experienced by a
querying local host over the case when a DNS is resolved via querying into the DNS hierarchy.
- The local DNS server record for a remote host is sometimes different from that of the
authoritative server for that host.
5. What is the role of an authoritative name server in the DNS? (Check all that apply)
- It provides the definitive answer to the query with respect to a name in the authoritative name
server's domain.
6. We learned that in HTTP web browser caching, HTTP local web server caching, and in local DNS
caching, that a user benefits (e.g., shorter delays over the case of no caching) from finding a
local/nearby copy of a requested item. In which of the following forms of caching does a user
benefit from its not only from its own recent requests (and cached replies) but also from recent
requests made from other users?
- Local DNS server caching
4. In DASH (Dynamic, Adaptive Streaming over HTTP), a server divides a video file into chunks that ...
(pick best completion from below)
... are stored, each encoded at multiple rates (video quality). The client plays the video chunk-by-
chunk, with each chunk requested at encoding rate that fits the available bandwidth at the time.
2. Which of the following characteristics below are associated with a TCP socket? Check one or more
that apply.
- when contacted, the server will create a new server-side socket to communicate with that client.
- socket(AF_INET, SOCK_STREAM) creates this type of socket.
- a server can perform an accept() on this type of socket.
- provides reliable, in-order byte-stream transfer (a “pipe”), from client to server.
3. How does the networked application running on a server know the client IP address and the port
number to reply to in response to a received datagram?
- The application code at the server determines client IP address and port # from the initial
segment sent by client, and must explicitly specify these values when sending into a socket back to
that client.
4. Suppose a Web server has five ongoing connections that use TCP receiver port 80, and assume
there are no other TCP connections (open or being opened or closed) at that server. How many
TCP sockets are in use at this server?
- 6
2. True or False: The transport layer provides for host-to-host delivery service?
- True.
3. Check all of the services below that are provided by the TCP protocol.
- A flow-control service that ensures that a sender will not send at such a high rate so as to
overflow receiving host buffers.
- A congestion control service to ensure that multiple senders do not overload network
links.
- A byte stream abstraction, that does not preserve boundaries between message data sent
in different socket send calls at the sender.
- Reliable data delivery.
- In-order data delivery.
4. Check all of the services below that are provided by the UDP protocol.
- A message abstraction, that preserves boundaries between message data sent in different
socket send calls at the sender.
5. The transport layer sits on top of the network layer, and provides its services using the
services provided to it by the network layer. Thus it’s important that we know what is
meant by the network layer’s “best effort” delivery service. True or False:
The network layer’s best-effort delivery service means that IP makes its “best effort” to
deliver segments between communicating hosts, but it makes no guarantees. In particular,
it does not guarantee segment delivery, it does not guarantee orderly delivery of
segments, and it does not guarantee the integrity of the data in the segments.
- Correct! The network layer’s best effort service doesn’t really provide much service at all,
does it?
3. True or False: When multiple UDP clients send UDP segments to the same destination
port number at a receiving host, those segments (from different senders) will always be
directed to the same socket at the receiving host.
- True
4. True or False: When multiple TCP clients send TCP segments to the same destination port
number at a receiving host, those segments (from different senders) will always be
number at a receiving host, those segments (from different senders) will always be
directed to the same socket at the receiving host.
- False
5. True or False: It is possible for two UDP segments to be sent from the same socket with
source port 5723 at a server to two different clients.
- True
6. True or False: It is possible for two TCP segments with source port 80 to be sent by the
sending host to different clients.
- True
2. Which of the fields below are in a UDP segment header? [Hint: note the use of the word
"header" in this question statement.]
- Source port number
- Length (of UDP header plus payload)
- Internet checksum
- Destination port number
4. Over what set of bytes is the checksum field in the UDP header computed over?
- The entire UDP segment, except the checksum field itself, and the IP sender and receive
address fields
5. Which of the following statements are true about a checksum? Hint: more than one
statement is true.
- The receiver of a packet with a checksum field will add up the received bytes, just as the
sender did, and compare this locally-computed checksum with the checksum value in the
packet header. If these two values are different then the receiver knows that one of the
bits in the received packet has been changed during transmission from sender to receiver.
- A checksum is computed at a sender by considering each byte within a packet as a
number, and then adding these numbers (each number representing a bytes) together to
compute a sum (which is known as a checksum).
- The sender-computed checksum value is often included in a checksum field within a
packet header.
6. Compute the Internet checksum value for these two 16-bit words: 11110101 11010011
and 10110011 01000100
- 01010110 11100111
7. Compute the Internet checksum value for these two 16-bit words: 01000001 11000100
and 00100000 00101011
- 10011110 00010000
- 10011110 00010000
8. True or False: When computing the Internet checksum for two numbers, a single flipped
bit (i.e., in just one of the two numbers) will always result in a changed checksum.
- True
9. True or False: When computing the Internet checksum for two numbers, a single flipped
bit in each of the two numbers will always result in a changed checksum.
- False
3. Suppose a packet is 10K bits long, the channel transmission rate connecting a sender and
receiver is 10 Mbps, and the round-trip propagation delay is 10 ms. What is the maximum
channel utilization of a stop-and-wait protocol for this channel?
- .1
4. Suppose a packet is 10K bits long, the channel transmission rate connecting a sender and
receiver is 10 Mbps, and the round-trip propagation delay is 10 ms. What is the channel
utilization of a pipelined protocol with an arbitrarily high level of pipelining for this
channel?
- 1.0
5. Suppose a packet is 10K bits long, the channel transmission rate connecting a sender and
receiver is 10 Mbps, and the round-trip propagation delay is 10 ms. How many packets
can the sender transmit before it starts receiving acknowledgments back?
- 10
6. Which of the following statements about pipelining are true? One or more statements
may be true.
- With a pipelined sender, there may be transmitted packets “in flight” – propagating
through the channel – packets that the sender has sent but that the receiver has not yet
received.
- A pipelined sender can have transmitted multiple packets for which the sender has yet to
receive an ACK from the receiver.
Downloaded by Gia Hung ([email protected])
Computer Network Page 19
lOMoARcPSD|33719933
7. What are some reasons for discarding received-but- out-of-sequence packets at the
receiver in GBN? Indicate one or more of the following statements that are correct.
- The implementation at the receiver is simpler.
- The sender will resend that packet in any case.
8. What are some reasons for not discarding received-but- out-of-sequence packets at the
receiver in GBN? Indicate one or more of the following statements that are correct.
- Even though that packet will be retransmitted, its next retransmission could be corrupted,
so don’t discard a perfectly well-received packet, silly!
2. For the given function of a field in the TCP segment, select the name of that field from the
pull-down list.
Source port This field contains the port number associated with the sending socket for
number this TCP segment.
Sequence number This field contains the index in the sender-to-receiver byte stream of the
first byte of that data in the payload carried in this segment.
Checksum This field contains the Internet checksum of the TCP segment and selected
fields in the IP datagram header.
ACK bit If set, this segment cumulatively ACKs all data bytes up to, but not
including, the byte index in the ACK value field of this segment.
Header length This field contains the number of bytes in the TCP header.
field
Data (or payload) This field contains application data that was written into a socket by the
sender of this TCP segment.
ACK number field This field contains the index in the byte stream of the next in-order byte
expected at the receiver
Receiver This field contains the number of available bytes in the TCP receiver’s
advertised window buffer.
3. True or False: with TCP’s flow control mechanism, where the receiver tells the sender how
much free buffer space it has (and the sender always limits the amount of outstanding,
unACKed, in-flight data to less than this amount), it is not possible for the sender to send
more data than the receiver has room to buffer.
- True
4. Match the description of a TCP connection management message with the name of the
message used to accomplish that function.
FIN message A message indicating that the sending side is initiating the protocol to terminate
a connection.
a connection.
FINACK A message sent in response to a request to terminate a connection, ACKing that
message the side receiving this message is also willing to terminate the connection.
SYN A message from client to server initiating a connection request.
message
SYNACK A message from server to client ACKing receipt of a SYN message and indicating
message the willingness of the server to establish a TCP connection with the client.
RESET A general purpose error message used during connection set up or tear down to
message let the other side know that an error has occurred, and that the referenced
connection should be shut down.
3. Which of the following actions are used in network-assisted congestion control (say versus
end-end congestion control) to signal congestion. Check all that apply.
- A router marks a field in the datagram header at a congested router.
- A router sends an ICMP message to a host telling it to slow down its sending rate.
4. Which of the following actions are associated with end-end congestion control (say versus
network-assisted congestion control). Check all that apply.
- A datagram experiences delay at a congested network router, which is then measured by
the sender and used to decrease the sending rate.
- The transport-layer sender decreases its sending rate in response to a measured increase
in the RTT.
in the RTT.
- A router drops a packet at a congested router, which causes the transport-layer sender to
infer that there is congestion due to the missing ACK for the lost packet.
- A sender decreases its sending rate in response to packet loss detected via its transport-
layer ACKing.
5. Use the pulldown menu to match a congestion control approach to how the sender
detects congestion.
network- Bits are set at a congested router in a sender-to-receiver datagram, and bits are in
assisted the returned to the sender in a receiver-to sender ACK, to indicate congestion to
the sender.
delay-based The sender measures RTTs and uses the current RTT measurement to infer the
level of congestion.
end-end The sender infers segment loss from the absence of an ACK from the receiver.
3. Which of the following best completes this sentence: "In the absence of loss, TCP slow
start increases the sending rate ... "
- " ... faster than AIMD. In fact, slowstart increases the sending rate exponentially fast per
RTT."
4. Consider the transport-layer flows interacting at a congested link. In the face of such
congestion, what happens at this link to a transport-layer flow that does not cut back on
its sending rate?
- Nothing different from the other flows crossing the congested link.
5. Assuming that the congestion window size,cwnd, has not yet reached Wmax, TCP CUBIC
will ... (check all that apply)
- ... always have a window size, cwnd, and hence a sending rate, higher than that of AIMD
(assuming a given window size, Wmax, at which loss would occur).
- ... increase its sending rate faster than AIMD when cwnd is far away from Wmax, but
increase slower than AIMD when cwnd is closer to Wmax
6. For delay-based congestion control, match the sender action to the relationship of the
currently measured throughput to the value of cwnd/RTTmin
The currently measured throughput is greater than cwnd/RTTmin This should never
happen.
The currently measured throughput is equal to or a bit less than than increase the sending
cwnd/RTTmin rate
Downloaded by Gia Hung ([email protected])
Computer Network Page 22
lOMoARcPSD|33719933
cwnd/RTTmin rate
The currently measured throughput is much less that than decrease the sending
cwnd/RTTmin rate