0% found this document useful (0 votes)
12 views7 pages

Application Layer Solution

The document discusses various aspects of the application layer in computer networks, including unique identifiers for computers, the impact of DNS server failures, and the differences between UDP and TCP protocols. It also covers the client-server paradigm, the necessity for servers to be always running, and the implications of using different transport-layer protocols for specific applications. Additionally, it addresses the structure of socket addresses and how client processes find IP addresses and port numbers for communication.

Uploaded by

doli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

Application Layer Solution

The document discusses various aspects of the application layer in computer networks, including unique identifiers for computers, the impact of DNS server failures, and the differences between UDP and TCP protocols. It also covers the client-server paradigm, the necessity for servers to be always running, and the implications of using different transport-layer protocols for specific applications. Additionally, it addresses the structure of socket addresses and how client processes find IP addresses and port numbers for communication.

Uploaded by

doli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Module IV Application Layer

Book: Computer Networks


by TANENBAUM

1. Many business computers have three distinct and worldwide unique


identifiers. What are they?
Answer: Computers that has three distinct and worldwide unique identifiers are:

MAC (Media Access Control): It is a network identifier and it is used to communicate local network
and is globally unique.

IP (Internet Protocol) Address: It is unique address that assigned to a device for communicate within
a network

UUID(Universally Unique Identifier) or GUID (Globally Unique Identifier): A unique 128-bit identifier
often assigned to hardware components and ensures uniqueness across systems worldwide.

2. Consider a situation in which a cyberterrorist makes all the DNS


servers in the world crash simultaneously. How does this change
one's ability to use the Internet?
Answer: If all DNS servers in the world crashed simultaneously, it would have a huge impact on the
Internet.
→Web browsing will stop and can’t be access by anyone
→Email service will also get affected
→Major applications of internet will damage

4. DNS uses UDP instead of TCP. If a DNS packet is lost, there is no


automatic recovery. Does this cause a problem, and if so, how is it solved?
Answer: Yes, if we use UDP then it can cause DNS packet lost. As UDP is connectionless so there is so
guarantee of retransmitted the packet.

→By trying multiple times before request failed


→If the DNS server is not responding then we can use another DNS server which will be available.
→ If a DNS server or client has cached results, it can provide an answer without needing to send a
new query.
By using this steps we could be solved the DNS packet loss problem.
5. John wants to have an original domain name and uses a randomized
program to generate a secondary domain name for him. He wants to
register this domain name in the com generic domain. The domain name
that was generated is 253 characters long. Will the com registrar allow
this domain name to be registered?
Answer: No, John will not be able to register a domain name which is 253 characters long.
Because, according to ICANN, the domain name must be consist at most 63 characters. Where John
wants 253 characters long domain.

6. Can a machine with a single DNS name have multiple IP addresses?


How could this occur?
Answer: Yes, a machine with single DNS name have multiple IP addresses.
This occurred by:
→If a machine can have both and IPv4 and IPv6 address under the same DNS
→If one ip becomes unavailable, DNS can resolve to a backup ip
→A single physical server might have multiple network interfaces, each with a different ip address.

7. The number of companies with a Web site has grown explosively in


recent years. As a result, thousands of companies are registered in the
com domain, causing a heavy load on the top-level server for this domain.
Suggest a way to alleviate this problem without changing the naming
scheme (i.e., without introducing new top-level domain names). It is
permitted that your solution requires changes to the client code.
Answer: To alleviate this problem without changing the naming scheme. We need to :
→Increase DNS caching at clients and ISPs
→We have to use more local and recursive DNS resolvers that can cache results and serve repeat
those queries without contacting the TLD servers
→Encourage more use of secondary DNS services

8. Some email systems support a Content Return: header field. It specifies


whether the body of a message is to be returned in the event of
nondelivery. Does this field belong to the envelope or to the header?
Answer: In Envelop, it contains transmission details used by the mail server using SMTP protocol
to route and deliver the email.

But in header, it is part of the email message itself and contains details. So the recipient can se this
information when they view the raw email message.
20. Does Webmail use POP3, IMAP, or neither? If one of these, why was
that one chosen? If neither, which one is it closer to in spirit?
Answer: Webmail does not use POP3 and IMAP directly. It is relied on proprietary protocols to
interact with the mail servers. By comparing both these protocol, webmail is conceptually closer to
IMAP than to POP3

the reason behind is:

→If the email stay on the server, in IMAP, webmail stores emails on the mail server that allows users
to access. Where as, POP3 downloads email and often delete it from the server which making multi-
device access difficult.
→Webmail users can see the same inbox, folders, and sent messages from any device like IMAP. But
in POP3, email are usually downloaded to a single device and may not remain available on other
devices.
→Webmail services provide access through a web browser rather than and email client. Bu in POP3,
it use HTTPs for communication instead of mail protocol like IMAP.

21. When Web pages are sent out, they are prefixed by MIME headers.
Why?
Answer: MIME headers are specify the type of content being sent, so the browsers know hoe to
interpret it. And it can handle any kind of format whether it is JSON, PDF, video or something else. It
can define the character encoding for text based file to ensure proper rendering.
For this reason, web pages are prefixed by MIME headers when they are sent out.
Module 4 Application Layer
Book: Data Communications and
Networking by
BA. FOROUZAN

25.6.2 Questions
Q25-1. Assume we add a new protocol to the application layer. What
changes do we need to make to other layers?
Answer: Adding a new protocol in application layer primarily affects the uppers layer of the
network stack. But it also require modifications at lower layers.
→Application layer:

 Defining the new protocol’s specifications including message formats, request and response
patterns and data handling techniques

 Define new APIs for application to use the new protocol

→Transport layer:

 There will be no changes if the protocol uses existing transport protocol like TCP and UDP.
 But if any new transport mechanism is needed then the existing ones are need
modifications.
 For reliable flow control existing transport layer protocol may need adjustment

→Network layer:

 The network devices like firewall, router may need to recognize the new protocol to allow
traffic flow.
 If the protocol introduces new routing requirement the adjustment might be required in the
IP layer.
→Datalink layer:

 There will no changes are required at this layers unless the new application-layer protocol
requires special handling.

→Physical layer:

 Like datalink layer, here also no direct impact in this layer, as this layer deals with raw bit
transmission

Q25-2. Explain which entity provides service and which one receives
service in the client-server paradigm.
Answer: In the client-server paradigm, the server is the entity that provides the service to client.
And, the client is the entity that receives the service by sending requests to the server.

Q25-3. In the client-server paradigm, explain why a server should be run


all the time, but a client can be run when it is needed.
Answer: In the client-server paradigm, server should be run all the time because:

 It provides continuos service to handle the client requests, so it must be available whenever
a client needs access.
 It supports multiple cilents and it must always be ready to serve them
 Clients can send requests at any time, and if the server is down, they won’t receive a
response

But a client can be run when it is needed because:

 Cilents request services only when need, so they don’t need to run all the time

Running a client constantly would waste system resources like memory and processing power

 It is controlled by end-users who decides when to access the server

Q25-4. Can a program written to use the services of UDP be run on a


computer that has installed TCP as the only transport-layer protocol?
Explain.
Answer: A program written to use UDP cannot run on a computer that only supports TCP at the
transport layer. Because:

→UDP and TCP are both different protocols where TCP is connection oriented, reliable with error
retransmission if the packet is not delivered properly where as UDP is connectionless and fast but
does not guarantee that packet will deliver to the destination point

→If a program is written which only support TCP then it can not support the UDP. But if it is designed
for UDP the we can expects that it is datagram-based communication
Q25-5. Most of the operating systems installed on personal computers
come with several client processes, but normally no server processes.
Explain the reason.
Answer:
→Personal computer are designed for client-side operations which primarily used for browsing web,
checking mail and many more activities.
→These activities involve client processes that send requests to remote servers
→Since most users consume services rather than provide them, there is little need for built-in server
processes

→Server is designed to continuously, listening for incoming requests. And most personal computer
are not run for 24/7.
→There can security risk also like running a server on a personal computer increases risk.
→Open ports could expose the system and unauthorizes user might attempt to exploit
vulnerabilities.

Q25-6. A new application is to be designed using the client-server


paradigm. If only small messages need to be exchanged between the
client and the server with- out concern for message loss or corruption,
what transport-layer protocol do you recommend?
Answer: For an application that exchanges only small messages and is not concerned about message
loss or corruption, UDP is the best choice. UDP is a lightweight, connectionless protocol that sends
data without establishing a dedicated connection, making it faster and more efficient for simple
message exchanges. Unlike TCP, UDP does not include error checking or retransmission, which
reduces overhead and improves performance. This is ideal for applications where occasional data
loss is acceptable, such as real-time notifications, DNS queries, or simple status updates

Q25-7. Which of the following can be a source of data?


a. a keyboard
b. a monitor
c. a socket
Answer: A keyboard is an input devices that generates binary data when a user types.

A network socket is an endpoint for communication between devices. It can receive data from a
remote source.

But a monitor is an output device that displays data that generated. So it is not a source of data.

Q25-8. A source socket address is a combination of an IP address and a


port number. Explain what each section identifies.
Answer: A source socket address is a combination of an IP address and a port number which used to
uniquely identifies the sender of the network data.
IP address use to identifies the device on a network and it ensures that data is send to its proper
destination

The port number identifies the specific application running on the host. That allows multiple network
services to run on the same devices without conflicts.

Q25-9. Explain how a client process finds the IP address and the port
number to be inserted in a remote socket address.
Answer: When a client process wants to communicate with a remote server, it need to determine the
IP address and port number to of the destination.
IP address helps to identify the client’s domain and network so that the packet sends properly to that
network

And port number use to identify the device so that it receive by the proper device

Q25-10. Assume we design a new client-server application program that


requires persistent connection. Can we use UDP as the underlying
transport-layer protocol for this new application?
Answer: No UDP is not suitable for a client server application because:
→It requires a reliable connection. UDP is connection less, it means it can’t establish a reliable
connection between server and client. It simply sends packet without ensuring whether they are
arrived there destination or not.

→ TCP is better for transport-layer protocol because it provides reliable connection. TCP ensures data
integrity, retransmission of lost packets. If any packet does not reach it’s destination it again
retransmit. This case makes it ideal and for long-lived connection like chat application, online gaming
and remote login sessions.

You might also like