lOMoARcPSD| 58833082
1
Chapter 2 Review Questions
R1. List five nonproprietary Internet applications and the application-layer protocols
that they use.
Non-proprietary Internet applications:
- The Internet applications which are not protected under any patent and used by
the public domain are called Non-proprietary Internet applications. The user can
produce as well as distribute these applications.
- The five non-proprietary Internet applications along with their application layer
protocols are as follows:
1. The Webapplication: HTTP (Hyper Text Transfer Protocol)
2. e-mail application: SMTP (Simple Mail Transfer Protocol)
3. Streaming of multimedia Audio and Video: RTP (Real Time Transport Protocol)
4. Remote login application: TELNET (Telecommunication network protocol)
5. File transfer application: FTP (File Transfer Protocol)
R2. What is the difference between network architecture and application architecture?
- Network architecture: The process of organizing the communication process into
the layers is called network architecture. Or it can be considered as the design of the
communication network.
- Application Architecture: The architecture which is designed by the application
developer is called Application Architecture. This type of architecture dictates the
complete or broad structure of an application.
- The differences between Application architecture and Networking architecture
are as follows:
Network Architecture
Application Architecture
1. Network architecture is a process
of organizing the communication
process into the layers.
1. Application Architecture is an architecture
which is designed by the application
developer. It dictates the complete or broad
structure of an application.
2. Network architecture is a kind of
fixed framework which provides the
specific services to the applications.
2. Application Architecture is kind of
architecture which specifies "how the
application is structured."
3. Servers and five-layer internet
architecture are the examples of
Network architecture.
3. Peer to peer and client servers are the
examples of Application architectures.
R3. For a communication session between a pair of processes, which process is the
client and which is the server?
lOMoARcPSD| 58833082
2
Communication session between a pair of processes:
+ Client: It is the software that accesses the services made available by a server.
+ Server: The server is a running instance of an application which can accept
requests and give responses accordingly.
1. For the Web:
The web browseracts as a client process which displays relevant information
required by the user. The browser is a software application for retrieving, searching and
displaying the information resources on World Wide Web.
The web server acts as a serverprocesswhich is used to process the requests and
give responses. The web server uses the HTTP to process requests and to distribute the
information on World Wide Web.
2. For the Client-Server and Peer-to-peer architecture:
The Peer or a computer that is downloading the file is called as the Client.
The Peer or a computer that is uploading the file is called as the Server.
R4. For a P2P file-sharing application, do you agree with the statement, “There is no
notion of client and server sides of a communication session”? Why or why not?
- Communication session:
A communication session is an information interchange, which takes place
interactively between two devices participating in the communication session.
A session between the two communicating devices, or between a computer and
the user.
- In the context of Networking, the communicating devices are user and server.
In all communication sessions, there is a client side and a server side.
The user sends requests and acts as a client.
The computer processes the user requests and generates the responses and acts
as a server.
In a P2P file sharing, there occurs a server as well as client. The peer or the
computer receiving the file is called as a client and the peer or the computer sending the
file is called as a server.
Thus, there is an approach of client and server sides of a communication session
in P2P communication.
- Therefore, the statement that says that "There is no notion of client and server
sides of a communication session in P2P file sharing" is False.
R5. What information is used by a process running on one host to identify a process
running on another host?
- Host-to-Host communication:
lOMoARcPSD| 58833082
3
The communication between the Application layer protocols, Transport layer
protocols such as TCP and UDP can be managed by using Ports and Sockets.
The host-to-host communication operated by the TCP and UDPprotocols are
performed in IP (Internet Protocol) communication model. This helps in providing the
host-to-host communication services for the protocols of the application layer on one IP
host to another IP host.
Port:
A Port is defined as a TCP or UDP connection point.
Socket:
The endpoint of connection obtained by pairing the IP address and a Port is called
as a Socket.
- The following information is required by a process running on one IP host to
identify a process running on another IP host:
1. IP address of the destination host.
2. Port number of the destination socket.
- Therefore, the IP address of the destination host and Port number of the
destination socket are required to perform host-to-host communication.
R6. Suppose you wanted to do a transaction from a remote client to a server as fast as
possible. Would you use UDP or TCP? Why?
The User Datagram Protocol (UDP) is used to perform the transaction from a remote
client to a server.
- Reasons behind using the UDP protocol are as follows:
The UDP protocol completes the transaction from a remote client to a server in
one roundtrip time (RTT).
As it uses one roundtrip time, it requires less time to complete the transaction
between the client and server.
UDP is an unreliable protocol but usually, it is reliable enough.
The transaction process is the process in which request is sent by the client to a
UDP socket. The server generates the response and sends it back to the client's UDP
socket.
- Reasons behind not using the TCP protocol are as follows:
The TCP protocol requires a minimum of 2 roundtrip times (RTTS).
The TCP is a connection-oriented transport layer protocol and the
communication takes place between two hosts in a network.
TCP is a reliable protocol.
The transaction process with two roundtrip times is one RTT for
connection setup and the other RTT for the client to send a request and server to
reply the generated response.
lOMoARcPSD| 58833082
4
It requires more time to complete the transaction from remote client to a
server.
R7. Referring to Figure 2.4, we see that none of the applications listed in Figure 2.4
requires both no data loss and timing. Can you conceive of an application that requires
no data loss and that is also highly time-sensitive?
- The list of some applications which requires no data loss and highly time sensitive
are given below:
1. The applications developed by Internet of Things (IoT) technologies given below:
Smart health monitoring
Smart traffic control
Earth quake detection
2. Currency identification for visually impaired
3. Smart street lights
4. Smart locking
5. Alcohol sensing vehicle detection
- Internet of Things is a technology which controls the remote objects, by monitoring
with the sensor and passes that information to controlling unit which is a computer or a
human through the internet connectivity.
+ Smart health monitoring:
In smart health monitoring, the sensors are continuously monitor the health of a
person.
A sensor is attached to the person and monitors the health conditions (like Blood
Pressor, Heart rate etc.)
Automatically sends an alert message to the relatives and doctors when the
person condition is critical.
This is an application requires no data loss and highly time sensitive. Because, if
any loss of data or delay in time occurs will results a very dangerous problem to the
person.
+ Smart traffic control:
In Smart traffic control system, a person monitors the traffic signals by sensors, and
control the flow of traffic based on the demand.
If any loss of data of delay in time occurs, it will leads to accidents.
+ Earth quake detection:
The powerful sensors are used to detect the motion of earth and sending an alert or
a warning message to people. So that people can move quickly to other place.
This application requires no data loss and it is very time sensitive.
+ Currency identification for visually impaired:
lOMoARcPSD| 58833082
5
It is used to identify the denomination and informs to the person (as an audio) who
is visually impaired, so that blind person can easily manage the currency in daily life
without affected by frauds.
This application requires no data loss and it is very time sensitive.
- Therefore, many applications which are used in real world requires no data loss
and highly time sensitive.
R8. List the four broad classes of services that a transport protocol can provide. For
each of the service classes, indicate if either UDP or TCP (or both) pro vides such a
service.
There are a number of services that are provided by a Transport layer Protocol. Some
of the services that are applicable to both TCP and UDP protocols are as follows:
1. Reliability:
- In TCP: TCP is a connection-oriented protocol.
When a data file or message is sent from source to destination, there is a
guarantee that a packet will be delivered until the connection does not fail.
The data transfer between client and server in the form of reliable byte stream.
Therefore, TCP is reliable.
- In UDP: UDP is a connectionless protocol.
When the data file or message is sent from source to destination there is no
chance for guaranteed delivery to destination.
The data transfer is not possible in the form of byte stream in the case of UDP.
Therefore, UDP is unreliable.
2. Ordering of data:
- In TCP:
TCP protocol delivers the packets in an order. The source transmits the
second packet only after the first packet is received at the destination. Therefore,
TCP follows ordering of packets.
- In UDP:
UDP protocol does not deliver the packets in an order. The transmission
of packets from the source to destination follows no order. Therefore, UDP follows
no ordering.
3. Constant Throughput:
- In TCP:
The throughput for TCP protocol is much more than throughput for UDP
protocol because TCP is reliable.
There is guarantee for constant throughput in TCP protocol. Therefore,
TCP also have certain throughput value.
- In UDP:
lOMoARcPSD| 58833082
6
The throughput for UDP protocol is less than throughput for TCPprotocol
because UDP is unreliable.
There is guarantee for constant throughput in UDP protocol. Therefore,
UDP also have certain throughput value.
4. Timing:
- In TCP:
The fixed amount of delays occurs in receiving an acknowledgement from
the receiver to the client because it is connection orientated. That means no jitter
occurs in TCP.
If packets is sent by client but not received any acknowledgement, then
client wait for timeout expiration and retransmit the same packet to receiver.
Therefore, the TCP protocol satisfies the timing services.
- In UDP:
As UDP is connectionless and does not send any acknowledgements upon
receiving the packets.
Therefore, no time delay in receiving acknowledgements. But the client
doesn't know, whether the packet was dropped or delayed. Therefore, UDP protocol
satisfies the timing property but it doesn't give the guarantee that packet delayed or
not.
5. Security:
- In TCP:
TCP is a reliable and connection oriented protocol, since it is very difficult
to perform attack on TCP packets.
Security is provided in the form of encryption. Therefore, the TCP
provides more secure communication between client and receiver.
- In UDP:
As UDP is connection-less, it is easy performing the attacks like spoofing,
DOS etc. Security is provided in the form of encryption. Therefore, UPD doesn't
provide guarantees for secure communication.
R9. Recall that TCP can be enhanced with SSL to provide process-to-process security
services, including encryption. Does SSL operate at the transport layer or the application
layer? If the application developer wants TCP to be enhanced with SSL, what does the
developer have to do?
- Secure Socket Layer (SSL):
The Secure Socket Layer is a security technology.
It establishes an encrypted link between a server and a client.
It is a security protocol that determines the variables of encryption for the
data that is transmitting over a link.
lOMoARcPSD| 58833082
7
It also determines the variables of encryption for the link.
- SSL encryption:
SSL operates at the application layer.
•The SSL is operated at the application layer to provide the security and hide data
in the application by encrypting the data.
The unencrypted data present in the Application layer is taken by the SSL
socket.
The data is encrypted and then passed to the TCP socket.
When the application developer requires TCP to be enhanced with SSL,
the application should include the SSL code.
R10. What is meant by a handshaking protocol?
- Handshaking protocol:
The process when one device sends a message to another device by initiating the
communications with the use of communication channels.
The handshake protocols begin to establish a connection between a computer and
a device.
It begins connection by telling both devices how to communicate with each other.
For example, the handshake can also be used between a printer and a computer
to tell the printer how to receive and output data before printing takes place.
It is mainly responsible for authentication purpose to establish a secure session
by exchanging messages.
It is a protocol that uses the handshaking between two communication entities .
It enables the authentication between devices and improves the transmission
speed.
The devices send the messages in the communication protocol by interacting
each other with the use of handshaking protocol.
- The TCP (Transmission Control Protocol) uses a 3-way Handshaking protocol for
Connection Establishment process 3-way Handshaking protocol:
The handshaking protocol first interchanges the control packets between the two
communicating entities.
•The data is then sent between the two communicating entities.
In order to establish a connection, every device must send an SYN message and
receive an ACK for the message from the other device.
Thus, a connection between the devices is established.
The SMTP (Simple Mail Transfer Protocol) uses the Handshaking protocol at the
application layer
lOMoARcPSD| 58833082
8
The HTTP protocol does not use the handshaking protocol at the application
layer.
R11. Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP?
Solution:
The protocols, such as HTTP, FTP, SMTP, and POP3, requires the application data
to be received, without any gaps in the correct order.
The TCP is more reliable than the UDP because TCP is a connected-oriented
network where there is a guarantee of the transmitted packet in reaching the destination.
UDP sends only the datagram and it does not stand in managing retransmission,
data sequencing, or the connection.
Here, to run on their data and for assured delivery, all the data streams want the
reliable protocol.
The packet loss or failures during the transmission cannot be decided in the UDP
protocol.
- The protocols named each of those are data stream and loss-free transport protocols.
In TCP protocol, all the application data can be received without any gaps in a
correct order but UDP does not.
In TCP protocol, the data transmission is accurate.
•Also, the packet is delivered to the destination perfectly on the TCP protocol
because it is a connected-oriented network
Thus, the loss of data in HTTP, SMTP, FTP and POP3cannot be affordable using
the UDP protocol.
- Therefore, the HTTP, FTP, SMTP, and POP3 run on top of the TCP protocol rather
than on UDP protocol.
R12. Consider an e-commerce site that wants to keep a purchase record for each of its
customers. Describe how this can be done with cookies.
Maintaining purchase record using cookies:
The purchase record of a customer can be stored using the E-commerce site. This
can also be done using cookies. The following procedure describes the process of storing
a record using cookie:
1. When the client visits an e-commerce website for the first time, the website
returns a cookie number.
2. In the mean while each successive visit, the user provides a username and
password, which grant the site to determine the user and modify the user's record.
3. The cookie number stored on the user's host is managed by the browser. Thus,
the user does not explicitly enter the username and password every time while visiting
the website.
4. The cookie number is present in cookie header and is generated by the server.
lOMoARcPSD| 58833082
9
5. The client receives the response along with the header and the number with a
line appended to a special cookie file. The file contains the sever name and the user's
associated ID number.
6. In the subsequent request to the same server, the client includes a cookie header.
The cookie header consists of a header line which specifies the identification number
for that server.
7. Thus, the website finds the user by sending a user's cookie number each time
when the user visits the website.
R13. Describe how Web caching can reduce the delay in receiving a requested object.
Will Web caching reduce the delay for all objects requested by a user or for only some
of the objects? Why?
- Web caching:
Web caching is defined as a temporary storage of documents such as images,
video files, HTML pages to reduce the bandwidth usage.
It finds the desired content and brings the content close the user onto the same
LAN of the host.
It handles the requests send by the user's browser, which could be directed to the
origin server and the same content is saved as cache files.
Web cache keeps the copies of requested objects of the client in the storage.
- Web caching reduces the delay in receiving requested objects as given below.
The web caching can reduce the response time of the client's request when the
bottle bandwidth between the client and the server is much less than the bottleneck
bandwidth between the client and the cache.
Web caching can reduce the response time for the client requests when there is a
high- speed connection between the client and cache, and the cache has the requested
object.
Web caching reduces the traffic on the institution's access link to the internet.
Therefore, the institute doesn't have to update its bandwidth cables quickly. Thus, it can
reduce the cost.
If the cache memory size is high, it can handle many requests quickly. Thus, it
reduces the response time.
Finally, the traffic on the internet decreases substantially as a whole.
- Therefore, the web caching reduces the delay in receiving the requests for all
objects requested by the user.
R14. Telnet into a Web server and send a multiline request message. Include in the
request message the If-modified-since: header line to force a response message with the
304 Not Modifiedstatus code.
lOMoARcPSD| 58833082
10
The following command is issued in Windows command prompt followed by the
HTTP GET message to the "utopia.poly.edu" web server:
> telnet utopia.poly.edu 80
As the index.html page in the web server was not modified since Mon, 18 May 2015
09:23:34GMT, the following outputwas displayed when the above commands were
issued on Sat, 23 May 2015.
The first 4 lines are the GET message and header lines input by the user.
The next 4 lines (starting from HTTP/1.1 304 Not Modified) are the response from
the web server.
R15.Why is it said that FTPsends control information “out-of-band”?
- A software which can enable to send and receive messages is called messaging
app. These apps can use protocols to send and receive messages.
- There are several popular messaging apps, they are:
Viber
WhatsApp
Voxer
MessageMe
TextNow
SnapChat
Hike
WeChat
Telegram
Skype
Line
Facebook Messenger
Yahoo Messenger, etc.
- SMS can use one or more protocols. Some of the protocols are
TCP (Transfer Control Protocol)
HTTP (Hypertext Transfer Protocol)
lOMoARcPSD| 58833082
11
HTTPS (Hypertext Transfer Protocol Secure)
SMTP (Simple Mail Transfer Protocol)
FTP (File Transfer Protocol)
XMPP (Extensible Messaging and Presence Protocol)
XML over HTTP/HTTPS
+ Viber: Viber uses the TCP (Transfer Control Protocol) to do text messaging like
other messaging apps.
+ WhatsApp: WhatsApp uses the above protocols to communicate with another
person in case of sending messages to one another.
+ Skype: VoIP protocols are used in Skype.
+ Facebook Messenger: Protocol used in Facebook messenger is XMPP (Extensible
Messaging and Presence Protocol)
+ Yahoo Messenger: Protocols used in Yahoo messenger are associated with TCP
and HTTP.
Hence it is clear that some of the messaging apps can use the protocols same as SMS
and some use different protocols.
R16. Suppose Alice, with a Web-based e-mail account (such as Hotmail or gmail), sends
a message to Bob, who accesses his mail from his mail server using POP3. Discuss how
the message gets from Alice’s host to Bob’s host. Be sure to list the series of
applicationlayer protocols that are used to move the mes sage between the two hosts.
- The scenario specifies that Alice is the sender(source) who sends a message to Bob
and Bob is the receiver(destination) who receives the message.
The flow of the message being sent from Alice to Bob is as follows:
Alice uses Web-based e-mail account.
HTTP protocol is used to send the message from Alice browser to web-based
mail server.
From the Web-based mail server, the message of the Alice is sent via SMTP
(SMTP acts as Alice client server) server.
The message is sent to Bob's mail server though the SMTP server (SMTP acts as
Bob's server).
From, Bob's mail server, the message is transferred to Bob browser by using
POP3 protocol in-order to access the mail.
- Therefore, here is the list of series of application-layer protocols which are used
to transfer a message from Alice to Bob are:
Alice - HTTP - Web based mail server - SMTP - Bob's mail server - POP3 - Bob
R17. Print out the header of an e-mail message you have recently received. How many
Received: header lines are there? Analyze each of the header lines in the message.
lOMoARcPSD| 58833082
12
- The header of an e-mail message is as follows:
Received: from 65.54.246.202 (EHLO bay10-omc1-s5.bay10.hotmail.com)
(65.54.246.202) by mta285.mail.mud.yahoo.com with SMTP; Fri,
19 Aug 2018 16:50:41 -0700
Received: from hotmail.com ([65.56.135.103]) by bay10-omc1-
s5.bay10.hotmail.com with Microsoft SMTPSVC (6.0.3790.2668);
Fri, 19 Aug 2018 16:49:40 -0700
Received: from mail pickup service by hotmail.com with Microsoft
SMTPSVC; Fri, 19 Aug 2018 16:49:38 -0700
Message-ID: <BAY100-F26D9E35AF59E0D18B819AFB8310@phx.gbl>
Received: from 65.55.135.120 by by130fd.bay100.hotmail.msn.com with
HTTP; Fri, 19 Aug 2018 23:51:35 GMT
From: "Alice" <alice@hotmail.com>
To: bob@yahoo.com
BCC:
Subject: Dummy mail
Date: Fri, 19 Aug 2018 23:51:35 +0000
Mime-Version: 1.0
Content-Type: Text/html; format-flowed
Return-Path: alice@hotmail.com
- The above example e-mail message header contains 4 Received: header lines. This
indicates that the mail message has passed through 5 different SMTP servers before
reaching the receiver's mail box.
Last (or fourth) "Received:" header indicates that the mail message is delivered
from sender's SMTP server (65.55.135.120) to second SMTP server(by130fd.bay
100.hotmail.msn.com) in the sequence.
Third "Received:" header indicates that the mail message is delivered from
second SMTP server to third SMTP server in the sequence.
Second "Received:" header indicates that the mail message is delivered third
SMTP server to fourth SMTP server in the sequence.
First " Received:" header indicates that the mail message is delivered from the
fourth SMTP server in the sequence to receiver's SMTP server
(mta285.mail.mud.yahoo.com).
- Explanation for each header line in the message:
lOMoARcPSD| 58833082
13
+ Received: This header field is used to indicate the sequence of SMTP servers
through which the mail message traveled before reaching the receiver's mail box. This
header also includes timestamps.
+ Message-ID: The Message-ID is a unique string assigned to the mail message
when it is created first, by the mail system. The mail system assigned the following
number to the example mail message:
BAY100-F26D9E35AF59E0D18B819AFB8310@phx.gbl
+ From: The From field indicates the email address of the sender. In the given
example header, the sender's mail address is alice@hotmail.com.
+ To: The To field indicates the email address of the receiver. In the given example
header, the receiver's mail address is bob@yahoo.com.
+ BCC (Blind Carbon Copy): The mail message is delivered to the recipients
mentioned in the BCC field along with the main recipient mentioned in To: header line.
But, the details of the recipients mentioned in the BCC: do not appear in the mail
message header.
+ Subject: This field specifies the subject of the mail. In the example mail message,
the Subject is specified as Dummy mail.
+ Date: The Date field specifies at what time and on what day the sender sent the
mail message. In the given example mail message, the mail was sent on 19th Aug 2018,
at 23:51:35 GMT, by the sender.
+ Mime-Version: This field indicates the Multipurpose Internet Mail Extension
(MIME) version number. MIME defines the format of the mail message. MIME version
is used by the mail systems and SMTP. In the given example, the Mime-Version is 1.0.
+ Content-type: This field specifies the type of content in the body of the mail
message. That is, content-type describes the data that the body of the message contains.
In the given example, the Content- type is "text/html".
+ Return-path: This field specifies the email address of the sender. Thus, when the
user sends the reply, the mail will be sent to the email address given in the Return-path:
header field. Also, the mail servers use the email address given in this field to bounce
back the undeliverable mail messages. In the given example header, the Return-path is
"alice@hotmail.com".
R18. From a users perspective, what is the difference between the download-and delete
mode and the download-and-keep mode in POP3?
- POP3 is a simple mail access protocol. POP3 stands for Post Office Protocol 3. It
begins when the TCP connection is opened to the mail server by the user. The TCP
connection progresses in the following three phases:
1) Authorization
2) Transaction
3) Update
lOMoARcPSD| 58833082
14
During the first phase (Authorization), the user sends the username and password
for authentication.
During the transaction phase, the POP3 can be configured to either 'download-
anddelete or 'download-and-keep
- Difference between 'Download-and-delete and 'Download-and-keep:
Download-and-delete
Download-and-keep
1. After the completion of retrieving the
messages from a POP server by the user,
the messages are deleted by the user.
1. In this type of configuration, the
messages are not at all deleted after the
user retrieves the messages.
1. The messages cannot be re- read
whenever needed by the user because the
messages are deleted.
1. The messages are kept by the user in
the mail server after downloading them
and the user can also access these
messages from different machines.
1. The download-and-delete leads to a
problem for such users who want to
access these messages from different
machines.
1. The problem with this type of
configuration is that every time, the user
retrieves the stored messages from a new
machine. Thus, all the non-deleted
messages are transferred to new machine.
R19. Is it possible for an organization’s Web server and mail server to have exactly the
same alias for a hostname (for example, foo.com)? What would be the type for the RR
that contains the hostname of the mail server?
- Mail server aliasing:
The name of the mail server can be allased and a simple name can be used instead
of the complicated name of the mail server.
The mail server of the organization and the Web server can have the same alias
for a host name.
The MX record (Mail Exchanger) record allows the mail servers to have the same
hostnames. This record is useful in mapping the hostname in the mail server to its IP
address.
For example, the web server of a company and mail server can both be represented
using employee_enterprise.com.
Therefore, it is possible to have the same hostname for an organization's Web server
and mail server.
- The RR is nothing; it is a Resource Record
The Resource Record type is a type that provides Domain Name System
(DNS)based data about computers on a TCP/IP networks.
The MX is nothing; it is a Mail Exchanger record.
lOMoARcPSD| 58833082
15
The Mail Exchanger is a record type that allows the host name of the mail servers
to have multiple aliases.
Here,
The MX is a record type that is used to map the mail server's host name to its IP
address. Therefore, Mail Exchanger is a record type that contains the hostname of the
mail server.
R20. Look over your received emails, and examine the header of a message sent from
a user with an .edu email address. Is it possible to determine from the header the
IPaddress of the host from which the message was sent? Do the same for a message sent
from a gmail account.
- The header of an e-mail message contains different fields. Each field specifies
some information regarding the e-mail message. For example, Sender: field indicates
the email address of the sender. Date: field indicates when and on what date the mail is
sent by the sender.
Received: is one of the header lines of the mail message header.
A mail message header may contain more than one Received: fields.
Received: field is used to indicate the sequence of SMTP servers through which
the mail message traveled before reaching the receiver's mail box.
When a mail message is received, SMTP adds host name of the source or IP
address of the source and time stamp in the Received: field.
Consider that a user with an .edu email address sent a mail message. Then
examine the examine the Received: field in the mail message header.
If the header contains multiple Received: headers, examine the last Received:
field of the header, since the last Received: field contains the IP address of the sender's
host.
Consider the following example Received: header line:
Received: from 65.55.135.120 by by130fd.bay100.hotmail.msn.com with
HTTP; Fri, 19 Aug 2018 23:51:35 GMT
From the above header field, it can be determined that 65.55.135.120 is the IP
address of the Host from which the mail message was sent.
Therefore, the IP address of sender's host can be determined, if the sender sent
the message from the .edu email address.
Only when a mail is sent from SMTP environment, the sender's host name or IP
address of the sender's host is included in the Received: header line.
Some mail services like gmail are web-based. When a sender sent the mail
message from the web-browser (non-SMTP environment), the e-mail message is
delivered from the sender's browser to sender's mail server using HTTP protocol rather
than using SMTP protocol.
lOMoARcPSD| 58833082
16
Thus, the IP address of the sender's host is not included in the Received: field.
Hence, when a user send's a message from the gmail account, gmail server do not
display the IP address of sender's host in Receiver: field of the mail message header.
Therefore, the IP address of the sender's host can't be determined if the sender sent
the message from the gmail account.
Problems
P1. True or false?
a. In HTTP, the client must send one request per each object. Therefore, the client
sends four requests and receives four responses.
If non-persistent HTTP is used, all four requests and responses sent over
four separate TCP connections.
If persistent HTTP is used, all these four requests and responses sent over
one TCP connection.
Hence the statement that the client receives four response messages for the one
request message is FALSE
b. In persistent HTTP connection, a client requested files that are in the same server,
can be sent over the single TCP connection.
The two web pages research.html and students.html are distinct. Both of
these web pages belong to same domain name (www.mit.edu). That is, both web
pages reside in the same web server.
If the same client requests these two pages, then it is possible to send these
two web pages over the same persistent connection.
Hence the statement that sending the two distinct web pages over the same persistent
connection is TRUE
c. Every non-persistent connection between client and the server will create new
TCP (Transmission Control Protocol) segment for every new HTTP request message.
So, it is not possible to carry two distinct HTTP (Hyper Text Transmission Protocol)
request messages for a single TCP segment.
Hence the statement, it is possible to carry two distinct HTTP (Hyper Text
Transmission Protocol) request messages for a single TCP segment is FALSE
d. The Date: header line in the HTTP request message indicates the time and date
when the object in the response was created and sent by the server.
The header doesn't contain any details related to object modification.
Hence the statement, "The Date: header contains object modification details" is
FALSE
e. When the server successfully found the file that is requested by client, the server
sends the HTTP response message by including the requested file in the message body
filed.
lOMoARcPSD| 58833082
17
But, in some cases, the server unable to find the requested file, then the server sends
the HTTP response with corresponding status code (e.g. 400, 404...) and with empty
message body.
Hence the statement, "An empty message body is never returned by HTTP message"
is FALSE
P3. Consider an HTTPclient that wants to retrieve a Web document at a given URL. The
IPaddress of the HTTPserver is initially unknown. What transport and applicationlayer
protocols besides HTTPare needed in this scenario?
A web document can be retrieved by HTTP client at a given location or URL.
Initially, HTTP server doesn't know the IP address.
In this scenario, besides HTTP protocol, the following protocols are needed to
retrieve web document:
User datagram protocol (UDP) for domain naming system (DNS) and
transmission control protocol (TCP) for Hypertext transport protocol (HTTP) are
needed in transport layer protocols.
Domain naming system (DNS) and Hypertext transport protocol (HTTP)
are needed in application layer protocol.
P6. Obtain the HTTP/1.1 specification (RFC 2616). Answer the following questions:
a) Client-server signaling mechanism for indicating that the persistent connection
is being closed:
A connection closing mechanism to close persistent connections for client
and server is defined in the HTTP/1.1 (Hyper Text Transmission Protocol)
specification [RFC (Request For Comments) 2616].
A client, server or both can send the close of connection signal. If the
client or server wishes to close the connection, it can send the connection header
field with Connection token close. This is described in the section 8.1.2 and
8.1.2.1 of RFC-2616.
After, either a client or a server sends a signal "connection: close", client
cannot send any more requests and server cannot receive any more requests on
that connection. If client wants to send a request to server, it has to request for
new connection.
A client, a server or both can give "going to close connection" signal.
b) RFC-2616 specifications do not contain any description related to encryption
services. Therefore, encryption services are not provided by HTTP/1.1. c) Number of
simultaneous connections with server:
As per the section 8.1.4 of RFC-2616, the number of connections that a
client can have simultaneously with a given server is limited
The number of connections that a single-user client can maintain with any
server or proxy is 2.
lOMoARcPSD| 58833082
18
A client cannot have more than 2 connections with server.
d) Yes, the transport connection can be closed from either of the client side or the server
side at any time, if the connection is idle for some time.
Due to the above reason, it is possible to closing of connection can be initiated from
one side, while the other side is transmitting the data.
The server may initiates signal for closing of connection as the connection is idle
for some duration. At the same time the client may send a request via the same
connection to the server as the client is unaware of this asynchronous closing of the
connection.
P7. Suppose within your Web browser you click on a link to obtain a Web page. The IP
address for the associated URL is not cached in your local host, so a DNS lookup is
necessary to obtain the IP address. Suppose that n DNS servers are visited before your
host receives the IP address from DNS; the successive visits incur an RTT of RTT1, . . .,
RTTn. Further suppose that the Web page associated with the link contains exactly one
object, consisting of a small amount of HTML text. Let RTT0 denote the RTT between
the local host and the server containing the object. Assuming zero transmission time of
the object, how much time elapses from when the client clicks on the link until the client
receives the object?
- When a user clicks on a link, the browser establishes a TCP connection with the
server and then sends a request to the server for the object. The server processes the
request and sends a response that contains the requested object to the client. This
process takes two round-trip times (RTT).
- It is given in the problem that the round-trip times (RTT) are as follows:
+ RTT between local host and DNS server 1= RTT
1
+ RTT between local host and DNS server 2= RTT
2
and so on,
+ RTT between local host and DNS server n= RTT
n
+ RTT between local host and server =RTTO and
Transmission time of the object = 0
Time taken for DNS look up = RTT
1
+ RTT
2
+...+ RTT
n
Since RTT between local host and server is RTTO,
Time to establish TCP connection = RTT
Time to request and receive the object is,
= RTT
0
+ transmission time of object
= RTT
0
+ 0
= RTT
0
Therefore, the amount of time that elapses from when a user clicks the link until the
object is received by the client is,
lOMoARcPSD| 58833082
19
Time taken for DNS look up + Time to establish TCP connection + Time to send
request and receive object.
= (RTT
1
+ RTT
2
+...+ RTT
n
) + RTT
0
+ RTT
0
= 2RTT
0
+ (RTT
1
+ RTT
2
+...+ RTT
n
)
P8. Referring to Problem P7, suppose the HTML file references eight very small objects
on the same server. Neglecting transmission times, how much time elapses with
- When a user clicks on a link, the browser establishes a TCP connection with the
server and then sends a request for the object to the server. The server processes the
request and sends a response that contains the requested object to the client. This
process takes two round-trip times (RTT).
- It is given in the problem that the round-trip times (RTT) are as follows:
RTT between local host and DNS server 1= RTT1
RTT between local host and DNS server 2= RTT2 and so on,
RTT between local host and DNS server n= RTTn
RTT between local host and server =RTTO and
Transmission time of the object = 0
Time taken for DNS look up = RTT
1
+ RTT
2
+...+ RTT
n
The time taken to receive the HTML file by the client is
Time taken for DNS look up + Time to establish TCP connection + Time to send
request and receive HTML file
= (RTT
1
+ RTT
2
+...+ RTT
n
) + RTT
0
+ RTT
0
= 2RTT
0
+(RTT
1
+ RTT
2
+...+RTT
n
)
a) In the case of non-persistent HTTP with no parallel TCP connections:
It is given that, the HTML file references 8 small objects on the same server.
Therefore, the process to receive the total file is as follows:
The Browser initiates DNS-look up
The Browser creates a TCP connection with the server and sends a request for
HTML file to server. The server in turn, processes the request and sends the HTML
file as the response. The connection gets terminated.
The Browser creates a TCP connection and sends a request for object1 to the
server. The server sends the object1 as the response. The connection gets terminated
The browser serially creates the connections as described in step 3 for eight
objects
The time to receive an object by the client is,
Time to establish TCP connection + time to send the request and to receive the object
+ transmission time of object
= RTT
0
+ RTT
0
[Since, transmission time of object is 0]
lOMoARcPSD| 58833082
20
=2RTT
0
Note that it is enough to DNS look up the first time.
However, the time to receive 8 objects by the client is,
=8×2RTT
0
= 16 RTT
0
Therefore, the amount of time that elapses from when user clicks the link until the
file including 8 objects is received by the client is,
Time taken for DNS look up+(time to establish TCP connection + Time to send
request and receive HTML file) + Time to receive eight objects
= (RTT
1
+ RTT
2
+...+ RTT
n
) + 2RTT
0
+16 RTT
0
= 18 RTT
0
+(RTT
1
+ RTT
2
+...+ RTT
n
)
b) In the case of non-persistent HTTP with parallel TCP connections:
It is given that, the HTML file references 8 small objects on the same server.
The process to receive the total file is as follows:
Browser initiates DNS-look up
Browser creates a TCP connection with server and sends a request for HTML
file to server. Server in turn, processes the request and sends the HTML file as response.
The connection will be terminated.
Browser creates 8 independent connections for 8 objects and receives 8 objects
simultaneously.
As the browser uses non-persistent HTTP with parallel connections, the eight
objects are received by the client in two round-trip times.
Therefore, the total time to receive 8 objects by the client is,
Time to establish TCP connection + Time to request and receive the object.
= RTT
0
+ RTT
0
=2RTT
0
Therefore, the amount of time that elapses from when user clicks the link until the
file including 8 objects is received by the client is
Time taken for DNS look up + (Time to establish TCP connection +
Time to send request and receive HTML file) + Time to recieve eight objects
= (RTT
1
+ RTT
2
+...+ RTT
n
) + 2RTT
0
+2RTT
0
= 4RTT
0
+(RTT
1
+ RTT
2
+...+ RTT
n
)
c) In the case of persistent HTTP with pipelining:
It is given that, the HTML file references 8 small objects on the same server.
The process to receive the total file is as follows:
The browser initiates DNS-look up

Preview text:

lOMoAR cPSD| 58833082 Chapter 2 Review Questions
R1.
List five nonproprietary Internet applications and the application-layer protocols that they use.
Non-proprietary Internet applications:
- The Internet applications which are not protected under any patent and used by
the public domain are called Non-proprietary Internet applications. The user can
produce as well as distribute these applications.
- The five non-proprietary Internet applications along with their application layer protocols are as follows:
1. The Webapplication: HTTP (Hyper Text Transfer Protocol)
2. e-mail application: SMTP (Simple Mail Transfer Protocol)
3. Streaming of multimedia Audio and Video: RTP (Real Time Transport Protocol)
4. Remote login application: TELNET (Telecommunication network protocol)
5. File transfer application: FTP (File Transfer Protocol)
R2. What is the difference between network architecture and application architecture?
- Network architecture: The process of organizing the communication process into
the layers is called network architecture. Or it can be considered as the design of the communication network.
- Application Architecture: The architecture which is designed by the application
developer is called Application Architecture. This type of architecture dictates the
complete or broad structure of an application.
- The differences between Application architecture and Networking architecture are as follows: Network Architecture
Application Architecture
1. Network architecture is a process 1. Application Architecture is an architecture
of organizing the communication which is designed by the application process into the layers.
developer. It dictates the complete or broad structure of an application.
2. Network architecture is a kind of 2. Application Architecture is kind of
fixed framework which provides the architecture which specifies "how the
specific services to the applications. application is structured."
3. Servers and five-layer internet 3. Peer to peer and client servers are the
architecture are the examples of examples of Application architectures. Network architecture.
R3. For a communication session between a pair of processes, which process is the
client and which is the server? 1 lOMoAR cPSD| 58833082
Communication session between a pair of processes:
+ Client: It is the software that accesses the services made available by a server.
+ Server: The server is a running instance of an application which can accept
requests and give responses accordingly. 1. For the Web:
• The web browseracts as a client process which displays relevant information
required by the user. The browser is a software application for retrieving, searching and
displaying the information resources on World Wide Web.
• The web server acts as a serverprocesswhich is used to process the requests and
give responses. The web server uses the HTTP to process requests and to distribute the
information on World Wide Web.
2. For the Client-Server and Peer-to-peer architecture:
• The Peer or a computer that is downloading the file is called as the Client.
• The Peer or a computer that is uploading the file is called as the Server.
R4. For a P2P file-sharing application, do you agree with the statement, “There is no
notion of client and server sides of a communication session”? Why or why not? - Communication session:
• A communication session is an information interchange, which takes place
interactively between two devices participating in the communication session.
• A session between the two communicating devices, or between a computer and the user.
- In the context of Networking, the communicating devices are user and server.
• In all communication sessions, there is a client side and a server side.
• The user sends requests and acts as a client.
• The computer processes the user requests and generates the responses and acts as a server.
• In a P2P file sharing, there occurs a server as well as client. The peer or the
computer receiving the file is called as a client and the peer or the computer sending the file is called as a server.
• Thus, there is an approach of client and server sides of a communication session in P2P communication.
- Therefore, the statement that says that "There is no notion of client and server
sides of a communication session in P2P file sharing" is False.
R5. What information is used by a process running on one host to identify a process running on another host? - Host-to-Host communication: 2 lOMoAR cPSD| 58833082
• The communication between the Application layer protocols, Transport layer
protocols such as TCP and UDP can be managed by using Ports and Sockets.
• The host-to-host communication operated by the TCP and UDPprotocols are
performed in IP (Internet Protocol) communication model. This helps in providing the
host-to-host communication services for the protocols of the application layer on one IP host to another IP host. Port:
A Port is defined as a TCP or UDP connection point. Socket:
The endpoint of connection obtained by pairing the IP address and a Port is called as a Socket.
- The following information is required by a process running on one IP host to
identify a process running on another IP host:
1. IP address of the destination host.
2. Port number of the destination socket.
- Therefore, the IP address of the destination host and Port number of the
destination socket are required to perform host-to-host communication.
R6. Suppose you wanted to do a transaction from a remote client to a server as fast as
possible. Would you use UDP or TCP? Why?
The User Datagram Protocol (UDP) is used to perform the transaction from a remote client to a server.
- Reasons behind using the UDP protocol are as follows:
• The UDP protocol completes the transaction from a remote client to a server in one roundtrip time (RTT).
• As it uses one roundtrip time, it requires less time to complete the transaction
between the client and server.
• UDP is an unreliable protocol but usually, it is reliable enough.
• The transaction process is the process in which request is sent by the client to a
UDP socket. The server generates the response and sends it back to the client's UDP socket.
- Reasons behind not using the TCP protocol are as follows: •
The TCP protocol requires a minimum of 2 roundtrip times (RTTS). •
The TCP is a connection-oriented transport layer protocol and the
communication takes place between two hosts in a network. • TCP is a reliable protocol. •
The transaction process with two roundtrip times is one RTT for
connection setup and the other RTT for the client to send a request and server to reply the generated response. 3 lOMoAR cPSD| 58833082 •
It requires more time to complete the transaction from remote client to a server.
R7. Referring to Figure 2.4, we see that none of the applications listed in Figure 2.4
requires both no data loss and timing. Can you conceive of an application that requires
no data loss and that is also highly time-sensitive?
- The list of some applications which requires no data loss and highly time sensitive are given below:
1. The applications developed by Internet of Things (IoT) technologies given below: • Smart health monitoring • Smart traffic control • Earth quake detection
2. Currency identification for visually impaired 3. Smart street lights 4. Smart locking
5. Alcohol sensing vehicle detection
- Internet of Things is a technology which controls the remote objects, by monitoring
with the sensor and passes that information to controlling unit which is a computer or a
human through the internet connectivity. + Smart health monitoring:
In smart health monitoring, the sensors are continuously monitor the health of a person.
• A sensor is attached to the person and monitors the health conditions (like Blood Pressor, Heart rate etc.)
• Automatically sends an alert message to the relatives and doctors when the person condition is critical.
This is an application requires no data loss and highly time sensitive. Because, if
any loss of data or delay in time occurs will results a very dangerous problem to the person. + Smart traffic control:
In Smart traffic control system, a person monitors the traffic signals by sensors, and
control the flow of traffic based on the demand.
If any loss of data of delay in time occurs, it will leads to accidents. + Earth quake detection:
The powerful sensors are used to detect the motion of earth and sending an alert or
a warning message to people. So that people can move quickly to other place.
This application requires no data loss and it is very time sensitive.
+ Currency identification for visually impaired: 4 lOMoAR cPSD| 58833082
It is used to identify the denomination and informs to the person (as an audio) who
is visually impaired, so that blind person can easily manage the currency in daily life without affected by frauds.
This application requires no data loss and it is very time sensitive.
- Therefore, many applications which are used in real world requires no data loss and highly time sensitive.
R8. List the four broad classes of services that a transport protocol can provide. For
each of the service classes, indicate if either UDP or TCP (or both) pro vides such a service.
There are a number of services that are provided by a Transport layer Protocol. Some
of the services that are applicable to both TCP and UDP protocols are as follows: 1. Reliability:
- In TCP: TCP is a connection-oriented protocol.
• When a data file or message is sent from source to destination, there is a
guarantee that a packet will be delivered until the connection does not fail.
• The data transfer between client and server in the form of reliable byte stream. Therefore, TCP is reliable.
- In UDP: UDP is a connectionless protocol.
• When the data file or message is sent from source to destination there is no
chance for guaranteed delivery to destination.
• The data transfer is not possible in the form of byte stream in the case of UDP. Therefore, UDP is unreliable. 2. Ordering of data: - In TCP: •
TCP protocol delivers the packets in an order. The source transmits the
second packet only after the first packet is received at the destination. Therefore,
TCP follows ordering of packets. - In UDP: •
UDP protocol does not deliver the packets in an order. The transmission
of packets from the source to destination follows no order. Therefore, UDP follows no ordering.
3. Constant Throughput: - In TCP: •
The throughput for TCP protocol is much more than throughput for UDP
protocol because TCP is reliable. •
There is guarantee for constant throughput in TCP protocol. Therefore,
TCP also have certain throughput value. - In UDP: 5 lOMoAR cPSD| 58833082 •
The throughput for UDP protocol is less than throughput for TCPprotocol because UDP is unreliable. •
There is guarantee for constant throughput in UDP protocol. Therefore,
UDP also have certain throughput value. 4. Timing: - In TCP: •
The fixed amount of delays occurs in receiving an acknowledgement from
the receiver to the client because it is connection orientated. That means no jitter occurs in TCP. •
If packets is sent by client but not received any acknowledgement, then
client wait for timeout expiration and retransmit the same packet to receiver.
Therefore, the TCP protocol satisfies the timing services. - In UDP: •
As UDP is connectionless and does not send any acknowledgements upon receiving the packets. •
Therefore, no time delay in receiving acknowledgements. But the client
doesn't know, whether the packet was dropped or delayed. Therefore, UDP protocol
satisfies the timing property but it doesn't give the guarantee that packet delayed or not. 5. Security: - In TCP: •
TCP is a reliable and connection oriented protocol, since it is very difficult
to perform attack on TCP packets. •
Security is provided in the form of encryption. Therefore, the TCP
provides more secure communication between client and receiver. - In UDP:
• As UDP is connection-less, it is easy performing the attacks like spoofing,
DOS etc. Security is provided in the form of encryption. Therefore, UPD doesn't
provide guarantees for secure communication.
R9. Recall that TCP can be enhanced with SSL to provide process-to-process security
services, including encryption. Does SSL operate at the transport layer or the application
layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do? - Secure Socket Layer (SSL): •
The Secure Socket Layer is a security technology. •
It establishes an encrypted link between a server and a client. •
It is a security protocol that determines the variables of encryption for the
data that is transmitting over a link. 6 lOMoAR cPSD| 58833082 •
It also determines the variables of encryption for the link. - SSL encryption: •
SSL operates at the application layer.
•The SSL is operated at the application layer to provide the security and hide data
in the application by encrypting the data. •
The unencrypted data present in the Application layer is taken by the SSL socket. •
The data is encrypted and then passed to the TCP socket. •
When the application developer requires TCP to be enhanced with SSL,
the application should include the SSL code.
R10. What is meant by a handshaking protocol? - Handshaking protocol:
• The process when one device sends a message to another device by initiating the
communications with the use of communication channels.
• The handshake protocols begin to establish a connection between a computer and a device.
• It begins connection by telling both devices how to communicate with each other.
• For example, the handshake can also be used between a printer and a computer
to tell the printer how to receive and output data before printing takes place.
• It is mainly responsible for authentication purpose to establish a secure session by exchanging messages.
• It is a protocol that uses the handshaking between two communication entities .
• It enables the authentication between devices and improves the transmission speed.
• The devices send the messages in the communication protocol by interacting
each other with the use of handshaking protocol.
- The TCP (Transmission Control Protocol) uses a 3-way Handshaking protocol for
Connection Establishment process 3-way Handshaking protocol:
• The handshaking protocol first interchanges the control packets between the two communicating entities.
•The data is then sent between the two communicating entities.
• In order to establish a connection, every device must send an SYN message and
receive an ACK for the message from the other device.
• Thus, a connection between the devices is established.
• The SMTP (Simple Mail Transfer Protocol) uses the Handshaking protocol at the application layer 7 lOMoAR cPSD| 58833082
• The HTTP protocol does not use the handshaking protocol at the application layer.
R11. Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP? Solution:
The protocols, such as HTTP, FTP, SMTP, and POP3, requires the application data
to be received, without any gaps in the correct order.
• The TCP is more reliable than the UDP because TCP is a connected-oriented
network where there is a guarantee of the transmitted packet in reaching the destination.
• UDP sends only the datagram and it does not stand in managing retransmission,
data sequencing, or the connection.
• Here, to run on their data and for assured delivery, all the data streams want the reliable protocol.
• The packet loss or failures during the transmission cannot be decided in the UDP protocol.
- The protocols named each of those are data stream and loss-free transport protocols.
• In TCP protocol, all the application data can be received without any gaps in a
correct order but UDP does not.
• In TCP protocol, the data transmission is accurate.
•Also, the packet is delivered to the destination perfectly on the TCP protocol
because it is a connected-oriented network
• Thus, the loss of data in HTTP, SMTP, FTP and POP3cannot be affordable using the UDP protocol.
- Therefore, the HTTP, FTP, SMTP, and POP3 run on top of the TCP protocol rather than on UDP protocol.
R12. Consider an e-commerce site that wants to keep a purchase record for each of its
customers. Describe how this can be done with cookies.
Maintaining purchase record using cookies:
The purchase record of a customer can be stored using the E-commerce site. This
can also be done using cookies. The following procedure describes the process of storing a record using cookie:
1. When the client visits an e-commerce website for the first time, the website returns a cookie number.
2. In the mean while each successive visit, the user provides a username and
password, which grant the site to determine the user and modify the user's record.
3. The cookie number stored on the user's host is managed by the browser. Thus,
the user does not explicitly enter the username and password every time while visiting the website.
4. The cookie number is present in cookie header and is generated by the server. 8 lOMoAR cPSD| 58833082
5. The client receives the response along with the header and the number with a
line appended to a special cookie file. The file contains the sever name and the user's associated ID number.
6. In the subsequent request to the same server, the client includes a cookie header.
The cookie header consists of a header line which specifies the identification number for that server.
7. Thus, the website finds the user by sending a user's cookie number each time
when the user visits the website.
R13. Describe how Web caching can reduce the delay in receiving a requested object.
Will Web caching reduce the delay for all objects requested by a user or for only some of the objects? Why? - Web caching:
• Web caching is defined as a temporary storage of documents such as images,
video files, HTML pages to reduce the bandwidth usage.
• It finds the desired content and brings the content close the user onto the same LAN of the host.
• It handles the requests send by the user's browser, which could be directed to the
origin server and the same content is saved as cache files.
• Web cache keeps the copies of requested objects of the client in the storage.
- Web caching reduces the delay in receiving requested objects as given below.
• The web caching can reduce the response time of the client's request when the
bottle bandwidth between the client and the server is much less than the bottleneck
bandwidth between the client and the cache.
• Web caching can reduce the response time for the client requests when there is a
high- speed connection between the client and cache, and the cache has the requested object.
• Web caching reduces the traffic on the institution's access link to the internet.
Therefore, the institute doesn't have to update its bandwidth cables quickly. Thus, it can reduce the cost.
• If the cache memory size is high, it can handle many requests quickly. Thus, it reduces the response time.
• Finally, the traffic on the internet decreases substantially as a whole.
- Therefore, the web caching reduces the delay in receiving the requests for all
objects requested by the user.
R14. Telnet into a Web server and send a multiline request message. Include in the
request message the If-modified-since: header line to force a response message with the 304 Not Modifiedstatus code. 9 lOMoAR cPSD| 58833082
The following command is issued in Windows command prompt followed by the
HTTP GET message to the "utopia.poly.edu" web server:
> telnet utopia.poly.edu 80
As the index.html page in the web server was not modified since Mon, 18 May 2015
09:23:34GMT, the following outputwas displayed when the above commands were issued on Sat, 23 May 2015.
The first 4 lines are the GET message and header lines input by the user.
The next 4 lines (starting from HTTP/1.1 304 Not Modified) are the response from the web server.
R15.Why is it said that FTPsends control information “out-of-band”?
- A software which can enable to send and receive messages is called messaging
app. These apps can use protocols to send and receive messages.
- There are several popular messaging apps, they are: • Viber • WhatsApp • Voxer • MessageMe • TextNow • SnapChat • Hike • WeChat • Telegram • Skype • Line • Facebook Messenger • Yahoo Messenger, etc.
- SMS can use one or more protocols. Some of the protocols are
• TCP (Transfer Control Protocol)
• HTTP (Hypertext Transfer Protocol) 10 lOMoAR cPSD| 58833082
• HTTPS (Hypertext Transfer Protocol Secure)
• SMTP (Simple Mail Transfer Protocol)
• FTP (File Transfer Protocol)
• XMPP (Extensible Messaging and Presence Protocol) • XML over HTTP/HTTPS
+ Viber: Viber uses the TCP (Transfer Control Protocol) to do text messaging like other messaging apps.
+ WhatsApp: WhatsApp uses the above protocols to communicate with another
person in case of sending messages to one another.
+ Skype: VoIP protocols are used in Skype.
+ Facebook Messenger: Protocol used in Facebook messenger is XMPP (Extensible
Messaging and Presence Protocol)
+ Yahoo Messenger: Protocols used in Yahoo messenger are associated with TCP and HTTP.
Hence it is clear that some of the messaging apps can use the protocols same as SMS
and some use different protocols.
R16. Suppose Alice, with a Web-based e-mail account (such as Hotmail or gmail), sends
a message to Bob, who accesses his mail from his mail server using POP3. Discuss how
the message gets from Alice’s host to Bob’s host. Be sure to list the series of
applicationlayer protocols that are used to move the mes sage between the two hosts.
- The scenario specifies that Alice is the sender(source) who sends a message to Bob
and Bob is the receiver(destination) who receives the message.
The flow of the message being sent from Alice to Bob is as follows:
• Alice uses Web-based e-mail account.
• HTTP protocol is used to send the message from Alice browser to web-based mail server.
• From the Web-based mail server, the message of the Alice is sent via SMTP
(SMTP acts as Alice client server) server.
• The message is sent to Bob's mail server though the SMTP server (SMTP acts as Bob's server).
• From, Bob's mail server, the message is transferred to Bob browser by using
POP3 protocol in-order to access the mail.
- Therefore, here is the list of series of application-layer protocols which are used
to transfer a message from Alice to Bob are:
Alice - HTTP - Web based mail server - SMTP - Bob's mail server - POP3 - Bob
R17. Print out the header of an e-mail message you have recently received. How many
Received: header lines are there? Analyze each of the header lines in the message. 11 lOMoAR cPSD| 58833082
- The header of an e-mail message is as follows: Received:
from 65.54.246.202 (EHLO bay10-omc1-s5.bay10.hotmail.com)
(65.54.246.202) by mta285.mail.mud.yahoo.com with SMTP; Fri, 19 Aug 2018 16:50:41 -0700 Received: from hotmail.com ([65.56.135.103]) by bay10-omc1-
s5.bay10.hotmail.com with Microsoft SMTPSVC (6.0.3790.2668);
Fri, 19 Aug 2018 16:49:40 -0700 Received:
from mail pickup service by hotmail.com with Microsoft
SMTPSVC; Fri, 19 Aug 2018 16:49:38 -0700 Message-ID: Received:
from 65.55.135.120 by by130fd.bay100.hotmail.msn.com with
HTTP; Fri, 19 Aug 2018 23:51:35 GMT From: "Alice" To: bob@yahoo.com BCC: Subject: Dummy mail Date:
Fri, 19 Aug 2018 23:51:35 +0000 Mime-Version: 1.0
Content-Type: Text/html; format-flowed
Return-Path: alice@hotmail.com
- The above example e-mail message header contains 4 Received: header lines. This
indicates that the mail message has passed through 5 different SMTP servers before
reaching the receiver's mail box.
• Last (or fourth) "Received:" header indicates that the mail message is delivered
from sender's SMTP server (65.55.135.120) to second SMTP server(by130fd.bay
100.hotmail.msn.com) in the sequence.
• Third "Received:" header indicates that the mail message is delivered from
second SMTP server to third SMTP server in the sequence.
• Second "Received:" header indicates that the mail message is delivered third
SMTP server to fourth SMTP server in the sequence.
• First " Received:" header indicates that the mail message is delivered from the
fourth SMTP server in the sequence to receiver's SMTP server (mta285.mail.mud.yahoo.com).
- Explanation for each header line in the message: 12 lOMoAR cPSD| 58833082
+ Received: This header field is used to indicate the sequence of SMTP servers
through which the mail message traveled before reaching the receiver's mail box. This
header also includes timestamps.
+ Message-ID: The Message-ID is a unique string assigned to the mail message
when it is created first, by the mail system. The mail system assigned the following
number to the example mail message:
BAY100-F26D9E35AF59E0D18B819AFB8310@phx.gbl
+ From: The From field indicates the email address of the sender. In the given
example header, the sender's mail address is alice@hotmail.com.
+ To: The To field indicates the email address of the receiver. In the given example
header, the receiver's mail address is bob@yahoo.com.
+ BCC (Blind Carbon Copy): The mail message is delivered to the recipients
mentioned in the BCC field along with the main recipient mentioned in To: header line.
But, the details of the recipients mentioned in the BCC: do not appear in the mail message header.
+ Subject: This field specifies the subject of the mail. In the example mail message,
the Subject is specified as Dummy mail.
+ Date: The Date field specifies at what time and on what day the sender sent the
mail message. In the given example mail message, the mail was sent on 19th Aug 2018,
at 23:51:35 GMT, by the sender.
+ Mime-Version: This field indicates the Multipurpose Internet Mail Extension
(MIME) version number. MIME defines the format of the mail message. MIME version
is used by the mail systems and SMTP. In the given example, the Mime-Version is 1.0.
+ Content-type: This field specifies the type of content in the body of the mail
message. That is, content-type describes the data that the body of the message contains.
In the given example, the Content- type is "text/html".
+ Return-path: This field specifies the email address of the sender. Thus, when the
user sends the reply, the mail will be sent to the email address given in the Return-path:
header field. Also, the mail servers use the email address given in this field to bounce
back the undeliverable mail messages. In the given example header, the Return-path is "alice@hotmail.com".
R18. From a user’s perspective, what is the difference between the download-and delete
mode and the download-and-keep mode in POP3?
- POP3 is a simple mail access protocol. POP3 stands for Post Office Protocol 3. It
begins when the TCP connection is opened to the mail server by the user. The TCP
connection progresses in the following three phases: 1) Authorization 2) Transaction 3) Update 13 lOMoAR cPSD| 58833082
During the first phase (Authorization), the user sends the username and password for authentication.
During the transaction phase, the POP3 can be configured to either 'download-
anddelete or 'download-and-keep
- Difference between 'Download-and-delete and 'Download-and-keep: Download-and-delete Download-and-keep
1. After the completion of retrieving the 1. In this type of configuration, the
messages from a POP server by the user, messages are not at all deleted after the
the messages are deleted by the user. user retrieves the messages.
1. The messages cannot be re- read 1. The messages are kept by the user in
whenever needed by the user because the the mail server after downloading them messages are deleted.
and the user can also access these
messages from different machines.
1. The download-and-delete leads to a 1. The problem with this type of
problem for such users who want to configuration is that every time, the user
access these messages from different retrieves the stored messages from a new machines.
machine. Thus, all the non-deleted
messages are transferred to new machine.
R19. Is it possible for an organization’s Web server and mail server to have exactly the
same alias for a hostname (for example, foo.com)? What would be the type for the RR
that contains the hostname of the mail server? - Mail server aliasing:
The name of the mail server can be allased and a simple name can be used instead
of the complicated name of the mail server.
• The mail server of the organization and the Web server can have the same alias for a host name.
• The MX record (Mail Exchanger) record allows the mail servers to have the same
hostnames. This record is useful in mapping the hostname in the mail server to its IP address.
For example, the web server of a company and mail server can both be represented
using employee_enterprise.com.
Therefore, it is possible to have the same hostname for an organization's Web server and mail server.
- The RR is nothing; it is a Resource Record
• The Resource Record type is a type that provides Domain Name System
(DNS)based data about computers on a TCP/IP networks.
The MX is nothing; it is a Mail Exchanger record. 14 lOMoAR cPSD| 58833082
• The Mail Exchanger is a record type that allows the host name of the mail servers to have multiple aliases. Here,
The MX is a record type that is used to map the mail server's host name to its IP
address. Therefore, Mail Exchanger is a record type that contains the hostname of the mail server.
R20. Look over your received emails, and examine the header of a message sent from
a user with an .edu email address. Is it possible to determine from the header the
IPaddress of the host from which the message was sent? Do the same for a message sent from a gmail account.
- The header of an e-mail message contains different fields. Each field specifies
some information regarding the e-mail message. For example, Sender: field indicates
the email address of the sender. Date: field indicates when and on what date the mail is sent by the sender.
• Received: is one of the header lines of the mail message header.
• A mail message header may contain more than one Received: fields.
• Received: field is used to indicate the sequence of SMTP servers through which
the mail message traveled before reaching the receiver's mail box.
• When a mail message is received, SMTP adds host name of the source or IP
address of the source and time stamp in the Received: field.
• Consider that a user with an .edu email address sent a mail message. Then
examine the examine the Received: field in the mail message header.
• If the header contains multiple Received: headers, examine the last Received:
field of the header, since the last Received: field contains the IP address of the sender's host.
Consider the following example Received: header line:
Received: from 65.55.135.120 by by130fd.bay100.hotmail.msn.com with
HTTP; Fri, 19 Aug 2018 23:51:35 GMT
From the above header field, it can be determined that 65.55.135.120 is the IP
address of the Host from which the mail message was sent.
Therefore, the IP address of sender's host can be determined, if the sender sent
the message from the .edu email address.
• Only when a mail is sent from SMTP environment, the sender's host name or IP
address of the sender's host is included in the Received: header line.
• Some mail services like gmail are web-based. When a sender sent the mail
message from the web-browser (non-SMTP environment), the e-mail message is
delivered from the sender's browser to sender's mail server using HTTP protocol rather than using SMTP protocol. 15 lOMoAR cPSD| 58833082
• Thus, the IP address of the sender's host is not included in the Received: field.
Hence, when a user send's a message from the gmail account, gmail server do not
display the IP address of sender's host in Receiver: field of the mail message header.
Therefore, the IP address of the sender's host can't be determined if the sender sent
the message from the gmail account. Problems P1. True or false? a.
In HTTP, the client must send one request per each object. Therefore, the client
sends four requests and receives four responses.
• If non-persistent HTTP is used, all four requests and responses sent over
four separate TCP connections.
• If persistent HTTP is used, all these four requests and responses sent over one TCP connection.
Hence the statement that the client receives four response messages for the one request message is FALSE b.
In persistent HTTP connection, a client requested files that are in the same server,
can be sent over the single TCP connection.
• The two web pages research.html and students.html are distinct. Both of
these web pages belong to same domain name (www.mit.edu). That is, both web
pages reside in the same web server.
• If the same client requests these two pages, then it is possible to send these
two web pages over the same persistent connection.
Hence the statement that sending the two distinct web pages over the same persistent connection is TRUE c.
Every non-persistent connection between client and the server will create new
TCP (Transmission Control Protocol) segment for every new HTTP request message.
So, it is not possible to carry two distinct HTTP (Hyper Text Transmission Protocol)
request messages for a single TCP segment.
Hence the statement, it is possible to carry two distinct HTTP (Hyper Text
Transmission Protocol) request messages for a single TCP segment is FALSE d.
The Date: header line in the HTTP request message indicates the time and date
when the object in the response was created and sent by the server.
The header doesn't contain any details related to object modification.
Hence the statement, "The Date: header contains object modification details" is FALSE e.
When the server successfully found the file that is requested by client, the server
sends the HTTP response message by including the requested file in the message body filed. 16 lOMoAR cPSD| 58833082
But, in some cases, the server unable to find the requested file, then the server sends
the HTTP response with corresponding status code (e.g. 400, 404...) and with empty message body.
Hence the statement, "An empty message body is never returned by HTTP message" is FALSE
P3. Consider an HTTPclient that wants to retrieve a Web document at a given URL. The
IPaddress of the HTTPserver is initially unknown. What transport and applicationlayer
protocols besides HTTPare needed in this scenario?
A web document can be retrieved by HTTP client at a given location or URL.
Initially, HTTP server doesn't know the IP address.
In this scenario, besides HTTP protocol, the following protocols are needed to retrieve web document:
• User datagram protocol (UDP) for domain naming system (DNS) and
transmission control protocol (TCP) for Hypertext transport protocol (HTTP) are
needed in transport layer protocols.
• Domain naming system (DNS) and Hypertext transport protocol (HTTP)
are needed in application layer protocol.
P6. Obtain the HTTP/1.1 specification (RFC 2616). Answer the following questions: a)
Client-server signaling mechanism for indicating that the persistent connection is being closed:
• A connection closing mechanism to close persistent connections for client
and server is defined in the HTTP/1.1 (Hyper Text Transmission Protocol)
specification [RFC (Request For Comments) 2616].
• A client, server or both can send the close of connection signal. If the
client or server wishes to close the connection, it can send the connection header
field with Connection token close. This is described in the section 8.1.2 and 8.1.2.1 of RFC-2616.
• After, either a client or a server sends a signal "connection: close", client
cannot send any more requests and server cannot receive any more requests on
that connection. If client wants to send a request to server, it has to request for new connection.
• A client, a server or both can give "going to close connection" signal. b)
RFC-2616 specifications do not contain any description related to encryption
services. Therefore, encryption services are not provided by HTTP/1.1. c) Number of
simultaneous connections with server:
• As per the section 8.1.4 of RFC-2616, the number of connections that a
client can have simultaneously with a given server is limited
• The number of connections that a single-user client can maintain with any server or proxy is 2. 17 lOMoAR cPSD| 58833082
• A client cannot have more than 2 connections with server.
d) Yes, the transport connection can be closed from either of the client side or the server
side at any time, if the connection is idle for some time.
Due to the above reason, it is possible to closing of connection can be initiated from
one side, while the other side is transmitting the data.
The server may initiates signal for closing of connection as the connection is idle
for some duration. At the same time the client may send a request via the same
connection to the server as the client is unaware of this asynchronous closing of the connection.
P7. Suppose within your Web browser you click on a link to obtain a Web page. The IP
address for the associated URL is not cached in your local host, so a DNS lookup is
necessary to obtain the IP address. Suppose that n DNS servers are visited before your
host receives the IP address from DNS; the successive visits incur an RTT of RTT1, . . .,
RTTn. Further suppose that the Web page associated with the link contains exactly one
object, consisting of a small amount of HTML text. Let RTT0 denote the RTT between
the local host and the server containing the object. Assuming zero transmission time of
the object, how much time elapses from when the client clicks on the link until the client receives the object?
- When a user clicks on a link, the browser establishes a TCP connection with the
server and then sends a request to the server for the object. The server processes the
request and sends a response that contains the requested object to the client. This
process takes two round-trip times (RTT).
- It is given in the problem that the round-trip times (RTT) are as follows:
+ RTT between local host and DNS server 1= RTT1
+ RTT between local host and DNS server 2= RTT2 and so on,
+ RTT between local host and DNS server n= RTTn
+ RTT between local host and server =RTTO and
Transmission time of the object = 0
Time taken for DNS look up = RTT1 + RTT2 +...+ RTTn
Since RTT between local host and server is RTTO,
Time to establish TCP connection = RTT
Time to request and receive the object is,
= RTT0 + transmission time of object = RTT0 + 0 = RTT0
Therefore, the amount of time that elapses from when a user clicks the link until the
object is received by the client is, 18 lOMoAR cPSD| 58833082
Time taken for DNS look up + Time to establish TCP connection + Time to send request and receive object.
= (RTT1 + RTT2 +...+ RTTn) + RTT0 + RTT0
= 2RTT0 + (RTT1 + RTT2 +...+ RTTn)
P8. Referring to Problem P7, suppose the HTML file references eight very small objects
on the same server. Neglecting transmission times, how much time elapses with
- When a user clicks on a link, the browser establishes a TCP connection with the
server and then sends a request for the object to the server. The server processes the
request and sends a response that contains the requested object to the client. This
process takes two round-trip times (RTT).
- It is given in the problem that the round-trip times (RTT) are as follows:
RTT between local host and DNS server 1= RTT1
RTT between local host and DNS server 2= RTT2 and so on,
RTT between local host and DNS server n= RTTn
RTT between local host and server =RTTO and
Transmission time of the object = 0
Time taken for DNS look up = RTT1 + RTT2 +...+ RTTn
The time taken to receive the HTML file by the client is
Time taken for DNS look up + Time to establish TCP connection + Time to send request and receive HTML file
= (RTT1 + RTT2 +...+ RTTn) + RTT0 + RTT0
= 2RTT0 +(RTT1 + RTT2 +...+RTTn)
a) In the case of non-persistent HTTP with no parallel TCP connections:
It is given that, the HTML file references 8 small objects on the same server.
Therefore, the process to receive the total file is as follows:
• The Browser initiates DNS-look up
• The Browser creates a TCP connection with the server and sends a request for
HTML file to server. The server in turn, processes the request and sends the HTML
file as the response. The connection gets terminated.
• The Browser creates a TCP connection and sends a request for object1 to the
server. The server sends the object1 as the response. The connection gets terminated
• The browser serially creates the connections as described in step 3 for eight objects
The time to receive an object by the client is,
Time to establish TCP connection + time to send the request and to receive the object + transmission time of object
= RTT0 + RTT0 [Since, transmission time of object is 0] 19 lOMoAR cPSD| 58833082 =2RTT0
Note that it is enough to DNS look up the first time.
However, the time to receive 8 objects by the client is, =8×2RTT0 = 16 RTT0
Therefore, the amount of time that elapses from when user clicks the link until the
file including 8 objects is received by the client is,
Time taken for DNS look up+(time to establish TCP connection + Time to send
request and receive HTML file) + Time to receive eight objects
= (RTT1 + RTT2 +...+ RTTn) + 2RTT0 +16 RTT0
= 18 RTT0 +(RTT1 + RTT2 +...+ RTTn)
b) In the case of non-persistent HTTP with parallel TCP connections:
It is given that, the HTML file references 8 small objects on the same server.
The process to receive the total file is as follows:
• Browser initiates DNS-look up
• Browser creates a TCP connection with server and sends a request for HTML
file to server. Server in turn, processes the request and sends the HTML file as response.
The connection will be terminated.
• Browser creates 8 independent connections for 8 objects and receives 8 objects simultaneously.
As the browser uses non-persistent HTTP with parallel connections, the eight
objects are received by the client in two round-trip times.
Therefore, the total time to receive 8 objects by the client is,
Time to establish TCP connection + Time to request and receive the object. = RTT0 + RTT0 =2RTT0
Therefore, the amount of time that elapses from when user clicks the link until the
file including 8 objects is received by the client is
Time taken for DNS look up + (Time to establish TCP connection +
Time to send request and receive HTML file) + Time to recieve eight objects
= (RTT1 + RTT2 +...+ RTTn) + 2RTT0 +2RTT0
= 4RTT0 +(RTT1 + RTT2 +...+ RTTn)
c) In the case of persistent HTTP with pipelining:
It is given that, the HTML file references 8 small objects on the same server.
The process to receive the total file is as follows:
• The browser initiates DNS-look up 20