Acn Class Test-2 Solution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

QUESTION BANK UNIT TEST-II

ADVANCED COMPUTER NETWORKING- 22520


2 MARKS:

1) State the need of domain name system.


ANS:- Need of domain name system:
• Since IP addresses are difficult to remember and names are easier to
remember Domain Name System is used and DNS servers are used for
converting these names into IP addresses.
• Large number to hosts and servers connected in the internet can be classified
using Domain name system so that hierarchical naming system is implemented.
• To identify an entity, TCP/IP protocols use the IP address. An IP is uniquely
identifies the connection of a host to internet. Use for mapping can map a name
to an address or an address to a name.
2) State the use of 6 flags in TCP header.
ANS:- There are 6, 1-bit control bits that control connection establishment,
termination, abortion, flow control etc..
1. URG: The urgent pointer is valid if it is 1.
2. ACK: ACK bit is set to 1 to indicate the acknowledgement member is valid.
3. PSH: The receiver should pass this data to application as soon as possible.
4. RST: This flag is used to reset connection.
5. SYN: Synchronize sequence number to initiate a connection.
6. FIN: It is used to release connection.
3) List two advantages of using UDP over TCP.
ANS:- Advantages of using UDP over TCP:
1) UDP is connection less and unreliable transport layer protocol. i.e. It does not
require to maintain a connection.
2) UDP is transaction oriented and suitable for simple query response protocols.
3) UDP is faster since it does not require acknowledgment.
4) Useful when time sensitivity is more important.
4) State the transmission modes of FTP.
ANS:- Transmission modes of FTP:
1. Stream mode
2. Block mode
3. Compressed mode
5) Distinguish between SMTP and POP3 protocol.
ANS:-

6) State the use of Telnet.


ANS:- Followings are some of the uses of Telnet
• TELNET is used to connect remote computers and issue commands on those
computers.
• It is used as a standard TCP/IP protocol for virtual terminal service which is
given by ISO.
• Telnet can be used to test or troubleshoot remote web or mail servers, as well
as trusted internal networks.
7) Distinguish between FTP & TFTP protocols.

8) State any four features of TCP.


ANS:- 1. TCP is connection oriented Protocol.
2. It provides reliable delivery of messages.
3. TCP makes checks for errors and reporting.
4. TCP has flow control.
5. TCP has High Speed.
4 MARKS:-
1)Compare TCP and UDP (any four points)
ANS:-
2) Explain the working of TELNET.
ANS:- TELNET: TELNET is an abbreviation for TErminaLNETwork. It is the
standard TCP/IP protocol for virtual terminal service.
TELNET Working:
• TELNET is a client-server application that allows a user to log on to a remote
machine, giving the user access to the remote system.
• The user sends the keystrokes to the terminal driver, where the local operating
system accepts the characters but does not interpret them.
• A terminal driver correctly interprets the keystrokes on the local terminal or
terminal emulator.
• The characters are sent to the TELNET client, which transforms the characters
to a universal character set called network virtual terminal (NVT) characters and
delivers them to the local TCP/IP protocol stack.
• The commands or text, in NVT form, travel through the Internet and arrive at
the TCP/IP stack at the remote machine.
• Here the characters are delivered to the operating system and passed to the
TELNET server, which changes the characters to the corresponding characters
understandable by the remote computer.
• However, the characters cannot be passed directly to the operating system
because the remote operating system is not designed to receive characters from
a TELNET server: It is designed to receive characters from a terminal driver.
• A piece of software called a pseudo terminal driver is added which pretends
that the characters are coming from a terminal.
• The operating system then passes the characters to the appropriate application
program.
3) Construct a diagram to show the application of cookies in a scenario in
which the server uses cookies for advertisement.
ANS:- Use of Cookies for advertisements:
A cookie is also used by advertising agencies. An advertising agency can place
banner ads on some main website that is often visited by users. The advertising
agency supplies only a URL that gives the banner address instead of the banner
itself. When a user visits the main website and clicks on the icon of an
advertised corporation, a request is sent to the advertising agency. The
advertising agency sends the banner, a GIF file, for example, but it also includes
a cookie with the ill of the user. Any future use of the banners adds to the
database that profiles the Web behaviour of the user. The advertising agency has
compiled the interests of the user and can sell this information to other parties.
This use of cookies has made them very controversial. Hopefully, some new
regulations will be devised to preserve the privacy of users.

• Figure below shows a scenario in which an electronic store can benefit from
the use of cookies.
• A shopper wants to buy a toy from an electronic store named BestToys.com.
• The Server sends the Webpage, but it also includes a cookie with the ID
12343.
• Using this a file is created such that the information clicked by the user is sent
and stored in the file, which are used by the server.
4) Explain the TCP connection establishment using a three way handshake
mechanism.
ANS:- Connection Establishment TCP uses a Three way handshaking
mechanism to establish a connection between client and server machines.
The three steps in three way handshaking mechanism are as follows.
SYN: The client sends the first segment, a SYN segment, in which only the
SYN flag is set. This segment is for synchronization of sequence numbers.
SYN + ACK: The server sends the second segment, a SYN +ACK segment,
with 2 flag bits set.
ACK: The client sends the third segment. This is just an ACK segment. It
guarantees the completion of three way handshaking.
5) Describe DHCP with its operation and static and dynamic allocation.
ANS:- DHCP (Dynamic Host Configuration Protocol) is a network management
protocol used to dynamically assign an IP address to any DHCP Operation 2M
device, or node, on a network so it can communicate using IP.
Working of DHCP:
In a network, a DHCP server manages a pool of IP addresses, as well Static
allocation 1M as default gateway details, DNS details and other information for
the clients’ network configuration. When a new computer is introduced into a
DHCP server-enabled network, it will send a query to the DHCP server
requesting all the necessary information. When the query reaches the DHCP
server, it will grant the new computer a new IP address and a lease - a time
frame for which the computer can use this IP address, as well as other
configuration details. The whole process takes place immediately after the new
computer boots, and to be successful, it has to be completed before initiating IP
based communication with other hosts in the network.
Dynamic allocation
When the DHCP server is configured to use dynamic allocation, this means that
it uses a lease policy. This way, when an assigned IP address from the available
pool is no longer used, it will be transferred back to the pool, making it
available for someone else to use. The advantage of this method is that the IP
addresses are used to their maximum - as soon as they are no longer used by the
client, they are instantly made available to others. The disadvantage of this
method is that a client will always have a random IP address.
Static allocation
The static allocation method is very popular in modern ISP networks, which do
not use dial-up methods. With the static allocation, the DHCP sever keeps a
database with all clients' LAN MAC addresses and gives them an IP address
only if their MAC address is in the database. This way, the clients can be sure
that they will be getting the same IP address every time. A DHCP server can be
set to work using a combination of the allocation methods. For example, in a
public Wi-Fi network, all of the known hosts and permanent clients can use the
static allocation, whereas for guests, the dynamic allocation is used. This way,
known hosts can always use the same IP address and the IP address pool is
equally available to everyone.
6) With the help of Diagram, explain architecture of WWW.
ANS:- The WWW (World Wide Web) is a way of exchanging information
between computers on the Internet.
WWW works on client server architecture, in which a client using a browser
can access a service using a server. Today, the WWW is a distributed client
server service.
The service provided is distributed over many locations called sites and each
site holds one or more documents i.e., Web pages.

Client sends a request through its browser to the server using HTTP protocol
which specifies the way the browser and web server communicates.
Then server receives request using HTTP protocol and checks its search for the
requested web page. If found it returns it back to the web browser and close the
HTTP connection.
Now the browser receives the web page, it interprets it and display the contents
of web page in web browser's window.
Fig. shows how WWW works.
The main web document and the image are stored in two separate files in the
same site (file X and file Y) and the referenced text file is stored in another site
(file Z).
Since, we are dealing with three different files, (namely, X, Y and Z) we need
three transactions if we want to see the whole document. The first transaction
(request/response) retrieves a copy of the main document (file X), which has a
reference (pointer) to the second and the third files.
When a copy of the main document is retrieved and browsed, the user can click
on the reference to The image to invoke the second transaction and retrieve a
copy of the image (file Y). if the user further needs to see the contents of the
referenced text file, she can click on its reference pointer) invoking the third
transaction and retrieving a copy of the file Z. Note that although file x and y
both are stored in site x, they are independent files with different names and
addresses. Two transactions are needed to retrieve them.
7) State the need for :
1. Sequence Control
2. Error Control
3. Flow Control in Networking
ANS:- Sequence Control
The 32-bit sequence number field defines the number assigned to the first byte
of data contained in this segment. TCP is a stream transport protocol. To ensure
connectivity, each byte to be transmitted is numbered. The sequence number
tells the destination which byte in this sequence comprises the first byte in the
segment. During connection establishment, each party uses a Random number
generator to create an initial sequence number (ISN), which is usually different
in each direction. We know that a TCP sequence number is 32 bit. So it has
finite (from 0 to (232-1) = 4 Giga sequence numbers) and it means we will be
able to send only 4GB of data with a unique sequence number not more than
that. It helps with the allocation of a sequence number that does not conflict
with other data bytes transmitted over a TCP connection. An ISN is unique to
each connection and separated by each device.
Error Control
Error Control mechanisms are useful to ensure reliability service of TCP. To
provide reliable service TCP detects and corrects errors. Error control
mechanisms are useful for detecting corrupted segments, lost segments, out-of-
order segments, and duplicated segments. Error detection and correction in TCP
is achieved through the use of three simple tools: checksum, acknowledgment,
and time-out.
Flow Control
Flow control make it possible for sender to send the amount of data bytes that
can be sent without worrying an acknowledgment and is one of the most
important duties of the data link layer. In most protocols, flow control is a set of
procedures that tells the sender how much data it can transmit before it must
wait for an acknowledgment from the receiver. The flow Control procedures not
allowed to overwhelm the receiver. Any receiving device has a limited speed at
which it can process incoming data and a limited amount of memory in which to
store incoming data, if sender sends data in a much speed data loss may occur to
overcome this problem flow control procedures are needful.
8)Describe SMTP with suitable diagram.
ANS:- It is the protocol that defines MTA client & server in internet.
• It is an application layer protocol of TCP/IP model.
• It transfer messages from sender’s mail servers to receivers mail server.
• SMTP interacts with local mail system and not user.
• SMTP uses a TCP socket on port 25 to transfer email reliably from client to
server.
• Email is temporarily stored on the local and eventually transferred directly to
receiving server.
• It is simple ASCII protocol.

COMMANDS & RESPONSE


SMTP uses commands and response to transfer message between MTA client
and MTA server.
SMTP Commands:
1. HELO: Used by client to identify itself.
2. MAIL FROM: Identify sender.
3. RCPT TO: Identify intended recipient.
4. DATA: Send actual message.
5. QUIT: Terminate the message.
6. RSET: Reset the connection.
7. VRFY: Verify the add of recipient
8. HELP: Mail
Example: Scenario: Alice sends message to Bob
1. Alice uses user agents (UA) to compose message and send to
[email protected].
2. Alice UA sends message to her mail server, message placed in message
queue.
3. Client side of SMTP opens TCP connection with Bob’s mail server.
4. SMTP client sends Alice message over TCP connection.
5. Bob’s mail server places the message in Bob’s mailbox.
6. Bob invokes his user agent to read message.
9) Explain the frame format of SSH.
ANS:- SSH Format
1. Length: It indicates the size of the packet, not including the length field or
the variable length random padding fields that follows it.
2. Padding: It causes an intrusion to be more difficult.
3. Type: It identifies the type of message.
4. CRC: It is an error detection field.

10) Differentiate between TCP, UDP and SCTP on basis of relability,


connection management, transmission of message ,flow control
,security and data delivery.
ANS:-
11) Explain the process of resolving the given host name into IP address
using DNS.
ANS:- You can find the hostname of any computer with a public IP address by
passing the address to any Domain Name System (DNS) server. However, since
the computers on a small business network have private IP addresses, you can
only discover their hostnames if the network has a local DNS server. To
discover the hostname of a computer with a private IP address and no local DNS
server, you need to use a Windows utility to query the host itself.
Querying DNS
Click the Windows Start button, then "All Programs" and "Accessories." Right-
click on "Command Prompt" and choose "Run as Administrator."
Type "nslookup %ipaddress%" in the black box that appears on the screen,
substituting %ipaddress% with the IP address for which you want to find the
hostname.
Find the line labeled "Name" underneath the line with the IP address you
entered and record the value next to "Name" as the hostname of the computer.

12) Describe the architecture of e-mail system using four scenario.


ANS:- To explain the architecture of e-mail, we give four scenarios. We begin
with the simplest situation and add complexity as we proceed. The fourth
scenario is the most common in the exchange of e-mail.
TCP/IP Protocol Suite 2 Topics Discussed in the Section
• First Scenario
• Second Scenario
• Third Scenario
• Fourth Scenario

• First Scenario
When the sender and the receiver of an e-mail are on the same mail server, we
need only two user agents.

• Second Scenario

When the sender and the receiver of an e-mail are on different mail servers, we
need two UAs and a pair of MTAs (client and server).
• Third Scenario

When the sender is connected to the mail server via a LAN or a WAN, we need
two UAs and two pairs of MTAs (client and server).
• Fourth Scenario

When both sender and receiver are connected to the mail server via a LAN or a
WAN, we need two UAs, two pairs of MTAs (client and server), and a pair of
MAAs (client and server). This is the most common situation today.

You might also like