0% found this document useful (0 votes)
5 views24 pages

computer-network-mid

The document discusses various concepts in computer networking, including circuit switching, packet switching, and the Internet's structure. It provides problem solutions related to maximum connections in circuit-switched networks, access network speeds, and performance metrics such as delay and throughput. Additionally, it covers the definitions and characteristics of routing and forwarding, as well as practical calculations for transmission and propagation delays.

Uploaded by

Gia Hung
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)
5 views24 pages

computer-network-mid

The document discusses various concepts in computer networking, including circuit switching, packet switching, and the Internet's structure. It provides problem solutions related to maximum connections in circuit-switched networks, access network speeds, and performance metrics such as delay and throughput. Additionally, it covers the definitions and characteristics of routing and forwarding, as well as practical calculations for transmission and propagation delays.

Uploaded by

Gia Hung
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/ 24

lOMoARcPSD|33719933

Computer Network-Mid

Computer Network (International University - VNU-HCM)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Gia Hung ([email protected])
lOMoARcPSD|33719933

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.

Downloaded by Gia Hung ([email protected])


Computer Network Page 1
lOMoARcPSD|33719933

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

Downloaded by Gia Hung ([email protected])


Computer Network Page 2
lOMoARcPSD|33719933

Chapter 1: Computer Network and the Internet


Saturday, March 16, 2024 9:06 AM

WHAT IS THE INTERNET?


1. Which of the following descriptions below correspond to a "nuts-and-bolts" view of the
Internet? Select one or more of the answers below that are correct. [Hint: more than one
of answers below are correct].
- A collection of billions of computing devices, and packet switches interconnected by links.
- A collection of hardware and software components executing protocols that define the
format and the order of messages exchanged between two or more communicating
entities, as well as the actions taken on the transmission and/or receipt of a message or
other event.
- A "network of networks".
2. Which of the following descriptions below correspond to a "services" view of the Internet?
Select one or more of the answers below that are correct below that are correct. [Hint:
more than one of answers below are correct].
- A place I go for information, entertainment, and to communicate with people.
- A platform for building network applications.
3. Which of the following human scenarios involve a protocol (recall: "Protocols define the
format, order of messages sent and received among network entities, and actions taken
on message transmission, receipt")? Select one or more answers below that are correct.
Hint: more than one of answers below are correct.
- One person asking, and getting, the time to/from another person.
- Two people introducing themselves to each other.
- A student raising her/his hand to ask a really insightful question, followed by the teaching
acknowledging the student, listening carefully to the question, and responding with a
clear, insightful answer. And then thanking the student for the question, since teachers
love to get questions.

The Network Edge

1. ACCESS NETWORK PER-SUBSCRIBER SPEEDS.


Match the access network with the approximate speeds that a subscriber might
experience. (Note: if you look these up, do so in the 8E textbook, slides,or video -- not in
the 7E or earlier versions, since link access speeds are always increasing over the years).

Ethernet Wired. Up to 100's Gbps


per link. (F)
802.11 WiFi Wireless. 10’s to 100’s of
Mbps per device. (B)
Cable access network Wired. Up to 10’s to 100’s
of Mbps downstream per
user. (D)
Digital Subscriber Line Wired. Up to 10’s of Mbps
downstream per user. (A)

Downloaded by Gia Hung ([email protected])


Computer Network Page 3
lOMoARcPSD|33719933

4G cellular LTE Wireless. Up to 10’s Mbps


per device. (B)

2. LINK TRANSMISSION CHARACTERISTICS.


Which of the following physical layer technologies has the highest transmission rate and
lowest bit error rate in practice?
- Fiber optic cable

The Network Core


1. Choose one the following two definitions that makes the correct distinction between
routing versus forwarding.
- Forwarding is the local action of moving arriving packets from router’s input link to
appropriate router output link, while routing is the global action of determining the
source-destination paths taken by packets.

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

Downloaded by Gia Hung ([email protected])


Computer Network Page 4
lOMoARcPSD|33719933

- 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

Performance: Delay, Loss and Throughput in Computer


Networks
1. COMPONENTS OF PACKET DELAY
Processing Time needed to perform an integrity check, lookup packet information in a local table
delay and move the packet from an input link to an output link in a router.
Queueing Time spent waiting in packet buffers for link transmission.
delay
Transmission Time spent transmitting packets bits into the link.
delay
Propagation Time need for bits to physically propagate through the transmission medium from end
delay one of a link to the other.

2. COMPUTING PACKET TRANSMISSION DELAY


Suppose a packet is L = 1500 bytes long (one byte = 8 bits), and link transmits at R = 1 Gbps (i.e., a link
can transmit bits 1,000,000,000 bits per second). What is the transmission delay for this packet?

Downloaded by Gia Hung ([email protected])


Computer Network Page 5
lOMoARcPSD|33719933

- 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?

- Solution: 0.000096 secs


- Transmission delay = L/R = (1200*8)/100 000 000 =9.6*10^-5
Consider the network shown in the figure below, with three links, each with the specified transmission
rate and link length. Assume the length of a packet is 8000 bits.

What is the transmission delay at link 2?

- Solution: 8 x 10^(-5) secs


- Length of the packet (L) = 8000 bits=8*10^3 bits

Downloaded by Gia Hung ([email protected])


Computer Network Page 6
lOMoARcPSD|33719933

- 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
transmission rate or Bandwidth (B) = 100 Mbps = 100*10^6 bps = 10^8 bps

- Packet transmission delay Tt = length of the packet/Bandwidth of the link = L/B = 8*10^3/10^8 = 8
*10^-5 secs

So, the answer is 8*10^-5 secs.

3. COMPUTING PROPAGATION DELAY.


Consider the network shown in the figure below, with three links, each with the specified transmission
rate and link length. Assume the length of a packet is 8000 bits. The speed of light propagation delay on
each link is 3x10^8 m/sec

What is the propagation delay at (along) link 2?

- 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

- The propagation delay at (along) link 2= d/s = 10^6/3*10^8 = 0.0033 secs

So, the answer is 0.0033 secs.

4. What is the maximum throughput achievable between sender and receiver in the scenario shown
below?

- Solution: 1.5 Mbits/sec


The quantity of work that can be completed in a given length of time is measured by computing
throughput. The number of processes that may be completed in a certain amount of time, such as
seconds, minutes, or hours, is often used to represent it. It may be used to assess the efficiency of
a processor, memory, or network connections since it weighs the quantity of work performed
against the amount of time expended. The kind of connection, the speed of the connection, and
the volume of traffic on the network all have an impact on throughput. The throughput will be
lower when copying a big file on a busy network than when copying the same file on a quiet

Downloaded by Gia Hung ([email protected])


Computer Network Page 7
lOMoARcPSD|33719933

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.

Downloaded by Gia Hung ([email protected])


Computer Network Page 8
lOMoARcPSD|33719933

Total Server Traffic: Since there are four servers, the total data rate leaving the servers towards
the shared link is:

Total Server Traffic = Number of Servers * Server Rate per Server


Total Server Traffic = 4 servers * 50 Mbps/server = 200 Mbps

Shared Link Utilization: The shared link utilization is the ratio of the total data rate it carries to its
maximum capacity (R).

Shared Link Utilization = Total Server Traffic / Shared Link Capacity


Shared Link Utilization = 200 Mbps / 300 Mbps

Utilization in Decimal Form: Rounding to two decimal places:

Shared Link Utilization = 0.67

Therefore, the utilization of the shared link (R) is 0.67.

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).

Effective Data Rate per Client:


The shared link can handle a maximum of 300 Mbps, but due to the server traffic being limited to
200 Mbps, this is the effective total data rate that can be distributed among the four client links.
Effective Data Rate per Client = Total Server Traffic / Number of Clients Effective Data Rate per
Client = 200 Mbps / 4 clients = 50 Mbps

Client Link Utilization:


Client Link Utilization = Effective Data Rate per Client / Client Link Capacity Client Link Utilization =
50 Mbps / 90 Mbps Client Link Utilization = 0.56

Protocol layers and Their Service Models


1. LAYERS IN THE INTERNET PROTOCOL STACK
Layer Function PDU
(Protocol
Data Unit)
Application Layer Protocols that are part of a Message
distributed network application.

Transport layer Transfer of data between one Segment


process and another process
(typically on different hosts).
Network layer Delivery of datagrams from a Datagram
source host to a destination host
(typically).

Downloaded by Gia Hung ([email protected])


Computer Network Page 9
lOMoARcPSD|33719933

(typically).
Link layer Transfer of data between Frame
neighboring network devices.

Physical layer Transfer of a bit into and out of a Bit


transmission media.

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.

Networks under attack


Access control Limiting use of resources or capabilities to given users.
Authentication Proving you are who you say you are.
Firewall Specialized “middleboxes” filtering or blocking traffic, inspecting packet contents
inspections
Digital Used to detect tampering/changing of message contents, and to identify the
signatures originator of a message.
Encryption Provides confidentiality by encoding contents

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.

Downloaded by Gia Hung ([email protected])


Computer Network Page 10
lOMoARcPSD|33719933

Chapter 2: The Application Layer


Saturday, March 16, 2024 11:10 AM

Principles of Network Applications


1. Which of the characteristics below are associated with a client-server approach to structuring
network applications (as opposed to a P2P approach)?
- There is a server with a well known server IP address.
- There is a server that is always on.
- HTTP uses this application structure.
2. Which of the characteristics below are associated with a P2P approach to structuring network
applications (as opposed to a client-server approach)?
- There is not a server that is always on.
- A process requests service from those it contacts and will provide service to processes that
contact it.
3. When an application uses a UDP socket, what transport services are provided to the application by
UDP? Check all that apply.
- Best effort service. The service will make a best effort to deliver data to the destination but makes
no guarantees that any particular segment of data will actually get there.
4. When an application uses a TCP socket, what transport services are provided to the application by
TCP? Check all that apply.
- Flow Control. The provided service will ensure that the sender does not send so fast as to overflow
receiver buffers.
- Congestion control. The service will control senders so that the senders do not collectively send
more data than links in the network can handle.
- Loss-free data transfer. The service will reliably transfer all data to the receiver, recovering from
packets dropped in the network due to router buffer overflow.

The Web and HTTP


1. What do we mean when we say “HTTP is stateless”? In answering this question, assume that
cookies are not used. Check all answers that apply.
- An HTTP server does not remember anything about what happened during earlier steps in
interacting with this HTTP client.
2. What is an HTTP cookie used for?
- A cookie is a code used by a server, carried on a client’s HTTP request, to access information the
server had earlier stored about an earlier interaction with this Web browser. [Think about the
distinction between a browser and a person.]
3. What is the purpose of the HTTP GET message?
- The HTTP GET request message is used by a web client to request a web server to send the
requested object from the server to the client.
4. What is the purpose of the conditional HTTP GET request message?
- To allow a server to only send the requested object to the client if this object has changed since
the server last sent this object to the client.
Suppose a client is sending an HTTP GET request message to a web server, gaia.cs.umass.edu.
Suppose the client-to-server HTTP GET message is the following:
5.
GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1
Host: gaia.cs.umass.edu
Accept: text/plain, text/html, text/xml, image/jpeg, image/gif, audio/mpeg, audio/mp4,
video/wmv, video/mp4,
Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fi

Downloaded by Gia Hung ([email protected])


Computer Network Page 11
lOMoARcPSD|33719933

Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fi


If-Modified-Since: Wed, 09 Sep 2020 16:06:01 -0700
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko)
Chrome/17.0.963.56 Safari/535.11

a. What version of HTTP is the client using?


- 1.1
b. What is the language in which the client would least prefer to get a response? [You may have to
search around the Web a bit to answer this.]
- United Kingdom English
c. Does the client have a cached copy of the object being requested?
- Yes, because this is a conditional GET, as evidenced by the If-Modified-Since field.
6.
Suppose now the server sends the following HTTP response message the 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, 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:

GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1

Downloaded by Gia Hung ([email protected])


Computer Network Page 12
lOMoARcPSD|33719933

GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1


Host: gaia.cs.umass.edu
Accept: text/plain, text/html, text/xml, image/jpeg, image/gif, audio/mpeg, audio/mp4,
video/wmv, video/mp4,
Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fi
If-Modified-Since: Wed, 09 Sep 2020 16:06:01 -0700
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko)
Chrome/17.0.963.56 Safari/535.11

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:

Downloaded by Gia Hung ([email protected])


Computer Network Page 13
lOMoARcPSD|33719933

- 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.

The Domain Name Service: DNS


1. Match the function of a server to a given type of DNS server in the DNS server hierarchy.
Local DNS server Replies to DNS query by local
host, by contacting other DNS
servers to answer the query.
Top Level Domain (TLD) servers Responsible for a domain
(e.g., *.com, *.edu); knows
how to contact authoritative
name servers.
DNS root servers Highest level of the DNS
hierarchy, knows how to
reach servers responsible for
a given domain (e.g., *.com,
*.edu).
Authoritative DNS server Provides authoritative
hostname to IP mappings for
organization’s named hosts.

Downloaded by Gia Hung ([email protected])


Computer Network Page 14
lOMoARcPSD|33719933

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

- HTTP local web caching

Video Streaming and Content Distribution Networks


1. Manifest file. What is the purpose of a manifest file in a streaming multimedia setting?
- To let a client know where it can retrieve different video segments, encoded at different rates.
2. What approach is taken by a CDN to stream content to hundreds of thousands of simultaneous
users?
- Store/serve multiple copies of videos at multiple geographically distributed sites.
3. Match the definition/function of an element or approach in a networked streaming video system,
with its name.
Chunk A unit of video, each of which may be encoded at multiple different rates, stored in
different files.
Manifest A file containing the location and encoding rate of files corresponding to video segments in
a video.
DASH An approach that allows a client to adapt the encoding rate of retrieved video to network
congestion conditions.
Enter A CDN approach that stores content in access networks, close to clients.
deep

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.

Socket Programming: Creating Network Applications


Downloaded by Gia Hung ([email protected])
Computer Network Page 15
lOMoARcPSD|33719933

Socket Programming: Creating Network Applications


1. Which of the following characteristics below are associated with a UDP socket? Check one or more
that apply.
- provides unreliable transfer of a groups of bytes (“a datagram”), from client to server.
- socket(AF_INET, SOCK_DGRAM) creates this type of socket.
- the application must explicitly specify the IP destination address and port number for each group
of bytes written into a socket.
- data from different clients can be received on the same socket.

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

5. What happens when a socket connect() procedure is called/invoked?


- This procedure creates a new socket at the client, and connects that socket to the specified server.

Downloaded by Gia Hung ([email protected])


Computer Network Page 16
lOMoARcPSD|33719933

Chapter 3: The transport layer


Friday, April 19, 2024 12:00 AM

Introduction and Transport-layer Services


1. Where is transport-layer functionality primarily implemented?
- Transport layer functions are implemented primarily at the hosts at the “edge” of the
network.

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?

Multiplexing and Demultiplexing


1. What is meant by transport-layer demultiplexing?
- Receiving a transport-layer segment from the network layer, extracting the payload (data)
and delivering the data to the correct socket.

2. What is meant by transport-layer multiplexing?


- Taking data from one socket (one of possibly many sockets), encapsulating a data chuck
with header information – thereby creating a transport layer segment – and eventually
passing this segment to the network layer.

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

Downloaded by Gia Hung ([email protected])


Computer Network Page 17
lOMoARcPSD|33719933

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

Connectionless Transport: UDP


1. True or False: On the sending side, the UDP sender will take each application-
layer chunk of data written into a UDP socket and send it in a distinct UDP
datagram. And then on the receiving side, UDP will deliver a segment’s payload
into the appropriate socket, preserving the application-defined message boundary.
- 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

3. Why is the UDP header length field needed?


- Because the payload section can be of variable length, and this lets UDP know where the
segment ends.

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

Downloaded by Gia Hung ([email protected])


Computer Network Page 18
lOMoARcPSD|33719933

- 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

Principles of Reliable Data Transfer


1. Consider the purposes/goals/use of different reliable data transfer protocol mechanisms.
For the given purpose/goal/use match it to the RDT mechanism that is used to implement
the given purpose/goal/use.
Sequence Allows for duplicate detection at receiver.
numbers
NAK Lets the sender know that a packet was NOT received correctly at the
receiver.
Checksum Used by sender or receiver to detect bits flipped during a packet’s
transmission.
ACK Lets the sender know that a packet was received correctly at the receiver.
Retransmission Allows the receiver to eventually receive a packet that was corrupted or lost
in an earlier transmission.

2. What is meant by a cumulative acknowledgment, ACK(n)?


- A cumulative ACK(n) acks all packets with a sequence number up to and including n as
being received.

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

receive an ACK from the receiver.

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!

Connection-oriented Transport: TCP


1. True or False: On the sending side, the TCP sender will take each application-layer chunk
of data written into a TCP socket and send it in a distinct TCP segment. And then on the
receiving side, TCP will deliver a segment’s payload into the appropriate socket, preserving
the application-defined message boundary.
- False.

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.

Downloaded by Gia Hung ([email protected])


Computer Network Page 20
lOMoARcPSD|33719933

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.

Principles of Congestion Control


1. Consider the five images below. Indicate which of these images suggest the need
for flow control (the others would suggest the need for congestion control).
- A glass overflowing
- A talking head

2. Consider the figure below, which shows the application-to-application throughput


achieved when two senders are competing at a shared bottleneck link. Suppose that
when the overall arrival rate, lambdain' (for each sender) is close to R/2, the throughput
to the application layer (at each receiver), lambdaout, is equal to 0.8 * lambdain'.

What fraction of the packets transmitted at the sender are retransmissions?


- 0.2

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.

Downloaded by Gia Hung ([email protected])


Computer Network Page 21
lOMoARcPSD|33719933

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.

TCP Congestion Control


1. Which of the following statements about TCP’s Additive-increase-multiplicative-decrease
(AIMD) algorithm are true? Check all that are true.
- AIMD is a end-end approach to congestion control.
- AIMD cuts the congestion window size,cwnd, i to 1 whenever a timeout occurs.
- AIMD cuts the congestion window size, cwnd, in half whenever loss is detected by a triple
duplicate ACK.

2. How is the sending rate typically regulated in a TCP implementation?


- By keeping a window of size cwnd over the sequence number space, and making sure that
no more than cwnd bytes of data are outstanding (i.e, unACKnowledged). The size of
cwnd is regulated by AIMD.

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

Evolution of Transport Layer Functionality


1. What are advantages of the streams concept in QUIC? Select all that apply.
- Since each stream has its own error control, if one stream experiences an error (e.g., lost
or damaged segment), the other streams are unaffected.
- Streams allow concurrent retrieval of web objects, while avoiding Head of the Line (HOL)
blocking.

2. What are advantages of implementing transport-layer functionality in QUIC at the


application layer? Select all that apply.
- QUIC can establish all connection parameters (security, reliability, flow and congestion
control)in just one handshake rather than separately in two.
- As an application-layer protocol, QUIC can be updated/modified at “app frequency” rather
than at the frequency of operating system updates.

Downloaded by Gia Hung ([email protected])


Computer Network Page 23

You might also like