Application layer |Computer Networks Notes | Btech
top of page

Application Layer: Computer Networks Class Notes

Updated: Oct 22, 2022

Mobiprep has created last-minute notes for all topics of Computer networks to help you with the revision of concepts for your university examinations. So let’s get started with the lecture notes on Computer networks.

Our team has curated a list of the most important questions asked in universities such as DU, DTU, VIT, SRM, IP, Pune University, Manipal University, and many more. The questions are created from the previous year's question papers of colleges and universities.


Application Layer


Question 1) What are the functions of application layer?

Answer) The main function of the application layer is to provide user interface. The other services provided by the application layer are:

  1. File transfer

  2. File management

  3. Remote file access

  4. Mail services (mail forwarding and storage facilities)

  5. Network virtual terminal

  6. Virtual terminal is an application service that enables the user to connect to a local server for file transfer or for running an application. Even if the user’s PC and the server run on different operating systems, communication can be established between them using application layer protocols like Telnet, FTP etc.

  7. Directory services

  8. Remote job entry


 

Question 2) What is DNS? why is it used?

Answer) DNS – Domain Name Server

The DNS is a system in which the mapping of URL to the corresponding IP address is stored.

The TCP/IP protocols use IP address to identify an entity in a network. But, people prefer to use names instead of numeric addresses. Hence, a file that stores the mapping of name to an address is needed. When the network was small, people used host files for this purpose. Each host machine had this file. The host file consisted of two columns: name and address.

When the network became large, the entire information could not be stored in the host machine. So, the entire host file was stored in a single computer and all the users were allowed to access this centralized information. This system is called the DNS. The host that needs mapping can contact the DNS to obtain the required information.


 

Question 3) Explain the DNS messages.

Answer) The DNS has two types of messages: query and response.

Query

The query message has two sections. They are: header section and question section.

Response

The response message has four sections. They are: header section, question records, answer section, authoritative section and additional section.




Domain Name System  in computer network class notes
Domain Name System
  1. HEADER SECTION


DNS Message Header Format in computer network class notes
DNS Message Header Format

  • It is usually 12 bytes in length.

  • This section is same in both query and response messages.

  • The identification subfield (or message id) in the header is used by client to match the response with the query. i.e. each query has a unique identification number. So, it can be used to match the query to the corresponding response.

Flags

  • The QR flag in the header is used to identify whether the message is a Query or a Response. For a query message, QR=0. For a response, the QR bit is set to 1 (QR=1)

  • The Op code is used to specify the type of query or response

  • AA (authoritative Answer) is used only in the Response message. It is used to indicate whether the server is authoritative or not.

  • TC (truncated) flag is used to specify whether the message is truncated or not. A query or response message is truncated when it exceeds 512 bytes.

  • RD (Recursion Desired) flag is used to specify whether the client wants a recursive answer or not.

  • RA (Recursion Available) flag is used to indicate whether a recursive answer is available or not.

  • Z is the reserved field which is reserved for future use. This field is set to 0.

  • Response code field is used to specify the status of error in the response.

  • The question count section specifies the number of records in the query message.

  • The answer count section specifies the number of records in the query message.

  • The authority count section specifies the number of records in the authoritative section.

  • The additional count section specifies the number of records in the additional section.


2. QUESTION SECTION

  • This filed consists of one or more question records

3. ANSWER SECTION

  • This field consists of one or more resource records

4. AUTHORITATIVE SECTION

  • This section is present only in response messages. It is used to provide information about the authoritative servers available for the query.

5. ADDITIONAL INFORMATION SECTION

  • This section is present only in response messages. This section contains some additional information that is might be useful to the resolver.


 

Question 4) What is telnet? explain it in detail.

Answer) Telnet – Teletype Network

Telnet is an application layer protocol that provides a command line interface for communication with a remote device. It is used for remote device management. It provides a bidirectional text based communication using a virtual terminal connection on a network. It enables the users to run any type of program on a remote site and transfers the results to a local site. The connection provided by Telnet to the remote computer is in such a way that the local terminal appears to be at the remote side.


Working

The user at the remote site connects to the Telnet server using the command prompt. The syntax of the command is given below:

Telnet hostname port

The hostname is the name of the machine the user wants to connect to. If the remote machine is accessible, it gives the user permission to access the machine after asking the machine’s username and password. Once the user is authenticated, the user is allowed to access the remote machine.


 

Question 5) What is e-mail? explain e-mail address format?

Answer) E-mail is the electronic message sent from one computer system to another. It is used to exchange messages between two or more computers. Using e-mail, text files, audio files, videos, and other non-text files can be sent.

E-mail format

The format of E-mail address is given below:

username @ domain name

  • Username

The username defines the name of the specified file (user mailbox)

  • Domain name

The domain name is usually the name of the organization. It can be the name of the server or exchanger (hosts) selected by the organization

The ‘@’ symbol is used to separate the username and domain name.

Example:


 

Question 6) Explain the working of e-mail.

Answer) There are three main components in an e-mail system. They are:

  1. Mailer

It is the mail program that enables the users to compose, manage and read e-mails.

2. Mail server

The mail server is responsible for sending, delivering and storing the e-mails.

3. Mailbox

The mailbox is a storage space in which all the e-mails and their details are stored.


E-mail working

The e-mail follows a client-server model. Here, the client is the mailer or the mail program, and the server is the mail server. The following steps explain the working of an e-mail system:

  1. Let, A be the sender and B be the receiver.

  2. If A wants to send a message to B, it composes an e-mail using the mailer.

  3. After A presses the Send button, the message is routed to SMTP (Simple Mail Transfer protocol) to B’s server.

  4. B communicates with its mail server by running a POP (Post Office Protocol) client. If the POP client finds any new message for B in the POP server, that message is forwarded to B’s computer. The message is then stored in B’s mailbox.

Note: POP is used to sync the e-mails from the server to the particular client.



client server model in computer network class notes


 

Question 7) What is FTP? explain FTP commands.

Answer) The File Transfer Protocol (FTP) is used to transfer files from one host to another. It uses the services of TCP. It does not use a client server approach.

FTP needs two types of connections: data connection and control connection. The data connection is used for data transfer. It is opened and closed for each file transferred. The control connection is used to transfer commands and responses. It remains connected for the entire FTP session.

FTP Commands

  • RETR 🡪 This command is used when a file is to be copied from the server to the client (retrieving)

  • STOR 🡪 This command is used when a file has to be copied from client to the server (storing)

  • LIST 🡪 This commands is used when a list of files is to be sent from server to client

  • USER 🡪 This command is used when the user identification has to be sent to the server.

  • PASS 🡪 This command is used when the userpassword has to be sent to the server.

  • CWD 🡪This command allows the user to work with a different directory or dataset for file storage or retrieval without altering his login or accounting information.

  • RMD 🡪 This command causes the directory specified in the path-name to be removed as a directory.

  • MKD 🡪 This command causes the directory specified in the pathname to be created as a directory.

  • PWD 🡪 This command causes the name of the current working directory to be returned in the reply.


FTP in computer network class notes


 

Question 8) What is world wide web? explain in detail.


Answer) The World Wide Web (WWW) is the repository of information linked together from all over the world. It follows client-server approach. The client uses the browser, which accesses the service using a server. The browser is a program that is designed to fetch web documents. This service is distributed over many locations called sites. Each site has one or more documents called web pages.

When a client wants to access a site A, it sends request through the browser. The request includes the URL. The server finds the site A and sends it to the client. The client receives a copy of the document.


www client server approach in computer network class notes

 

Question 9) What is html?

Answer) HTML is a language for creating web pages. HTML allows us to embed web page formatting instructions in the file itself. The contents designed using HTML are displayed on the browser. Browsers have their own mechanism for recognizing web languages. HTML is the backbone of a web page. HTML uses ASCII characters for both main text and formatting instructions.

A web page consists of two parts: head and body. The structure of a web page designed using HTML is shown below:


web page designed using HTML in computer network class notes

 

Question 10) What is http?

Answer) HTTP – Hypertext Transfer Protocol

HTTP is an application layer protocol that is used to access data on World Wide Web. HTTP is a client-server protocol in which the client initiates the request. Here, client refers to the web browsers. The client sends the request to the server, and the server replies to the request. HTTP is the foundation for data exchange on the Web. It is used to fetch the web resources like HTML documents.


 

Question 11) What do you understand by client server architecture?

Answer) In client-server architecture, there is one server and multiple clients in the network. All the clients are connected to the server. This architecture has a star topology. The server provides centralized control over the network. The clients can communication with each other only through the server. The clients request the server for a particular service, and the server responds to them. A network with client-server architecture is shown in the diagram given below:


 client-server architecture in computer network class notes

 

Question 12) What is peer to peer architecture?

Answer) In peer-to-peer architecture, all the nodes in the network have equal responsibility and authority over the network. The tasks are equally divided among the nodes in the network. The nodes in this type of network share resource between each other without the help of a centralized controller.


peer-to-peer architecture in computer network class notes

 

Question 13) What is the architecture of www?

Answer) The image given below depicts the architecture of World Wide Web.

architecture of World Wide Web in computer network class notes

Identifier

An identifier is used to uniquely identify resources on the web. Universal Resource Identifier (URI) is used for this purpose.

Character set

www uses Unicode character set.

Syntax

XML is used to define the syntax of web. (XML – Extensible Markup Language)

Data interchange

Resource Description Framework (RDF) is used for representation of data and data interchange. RDF represents the resources in graphical form.

Taxonomies

www uses RDF Schema (RDFS) to describe the taxonomies and ontological constructs.

Ontologies

www uses Web Ontology Language (OWL) to describe ontologies.

Rules

RIF and SWRL are used by www for obtaining rules. Simple Protocol and RDF Query Language are used for querying RDF data and OWL ontologies.

Proof

All semantic and rules that are executed at layers below Proof and their result will be used to prove deductions.

Cryptography

Cryptography is used to verify the origin of sources used. digital signatures are used to provide data encryption.

User interface and applications

User interfaces and application are built to enable user interaction.



 

Question 14) What is the difference between static, dynamic and active document on web?

Answer) Static Document

In a static document, the contents of the document do not change until it is changed by the user. The contents of the document are change only if the user places new information in the document. The contents of a static document are stored in the server.


Dynamic Document

The contents of a dynamic document vary from one request to another. The dynamic documents are created by the server whenever the document is requested by the browser.


Active Document

Active documents provide interactive interface to the user. The active document contains programs to be run on the client side. The active documents are stored in binary form. the client as the responsibility to update the document.


 

Question 15) Which port does http uses?

Answer) HTTP uses the services of TCP on Port 80.


 

Question 16) What is the difference between http and https?

Answer)

HTTP



HTTPS



Hypertext Transfer Protocol



​Secure HTTP


Developed to transfer the files from web.




Developed for ensuring security and authorized web transactions.



Works in the application layer


Works in the transport layer




Does not provide secure communication



Provides secure communication

Certificate is not used


Certificates are used



Encryption and decryption are not done


Encryption and decryption are done



Can be used to transfer text, images, audio, video etc.


Used to transfer sensitive data in a secure manner.






 

Question 17) What do you understand by generic, country and inverse domains?

Answer)Generic domain

In generic domain, the hosts are defined based on their generic behavior. Each node in the tree defines a domain. Each domain is used as index to the domain namespace database. It uses three-character labels, and 14 labels are possible. The 14 possible labels are shown in the diagram given below:


labels in generic domains in computer network class notes

Country domain

The country domain is as same as the generic domain, but it uses two-character country abbreviations. But, generic domain uses 3-charcater labels.

Example: ‘pk’ is the 2-character label for Pakistan


country domains in computer network class notes

Inverse domain

The inverse domain is used to map address to name. When the server has received a request from the client, and the server contains the files of only authorized clients. To determine whether the client is on the authorized list or not, it sends a query to the DNS server and ask for mapping an address to the name.


 

Question 18) What is SNMP?

Answer) SNMP – Simple Network Management Protocol

SNMP is an application layer protocol. It is used to monitor the network, and detect network faults. It can also be used to configure remote devices. It is also used for exchanging information between network devices. It provides a common language of information for routers, servers and other network devices to communicate with the network management system (NMS).


 

Question 19) What is the use of URL?

Answer) URL – Uniform Resource Locator

The URL is used to specify the address of web page. It is used to locate the resources on the web. The URL contains the name of the protocol to be used to access the resources and a resource name. the URL can be divided into 3 parts. This is explained below:

URL : https://www.rootworkz.com/home

In the above example,

  1. https:// represents the protocol to be used to access the resources

  2. rootworkz.com represents the domain name or the host name

  3. www.rootworkz.com/home represents the file or directory path.


 

Question 20) What are the properties of http?

Answer) The following are the properties of the HTTP protocol:

  1. HTTP is a request response protocol.

  2. HTTP uses reliable TCP connections.

  3. HTTP is stateless. So, it cannot maintain the record of different requests across the web pages.

  4. It is connectionless. The browser initiates the HTTP request and after the request is sent the client disconnects from server and waits for the response.

  5. It is media independent. This means that any type of data can be sent.


 

Question 21) What is SFTP?

Answer) SFTP – Secure File Transfer Protocol

It is used for transferring files between machines over a secure and encrypted connection. It runs on port 22. It is a packet based protocol. SFTP communicates over a secure connection initiated through SSH2 (Secure Shell). SFTP uses SSH to provide a secure way to transfer files between computers.


sftp file transfer in computer network class notes


 

Question 22) What is the difference between SFTP and TFTP?

Answer)

SFTP

TFTP

SFTP is a file transfer protocol

TFTP is a file transfer protocol

SFTP runs using TCP

TFTP runs using UDP.


SFTP operates on port 22




TFTP operates on port 69



SFTP provides security

TFTP does not provide security

It requires authentication.


It does not require authentication.



SFTP has file managing and editing capabilities

TFTP does not have file managing and editing capabilities.

Packet level integrity checks are performed to ensure reliability

Uses lockstep method to detect and correct errors.

It is a slow file transfer protocol (slower than TFTP)

It is a fast file transfer protocol.
















bottom of page