Upload Download Standard View: Sign in Join Books Audiobooks Comics Sheet Music

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

UPLOAD SIGN IN JOIN

BooksAudiobooksComicsSheet Music
DOWNLOAD
STANDARD VIEW
FULL VIEW
OF .
1

Kuvempu Univeristy BSc(IT) 3rd


semester exercise answer
(Computer Networks II 34)
|Views: 6,062|Likes: 67
Published by swobhagya
NIIT
Coordinator Guide Computer Networks 1
C H A P T E R -S P E C I F I C I N P U T S
Chapter One Objectives In this chapter, the
students have learned to: Define computer
networks Discuss the evolution of computer
networks

Focus Areas This chapter explains the evolution


of computer networks. You can start the session
by asking the students that what do they
understand of the Internet. Then tell them that
the Internet is a network of computers. Now tell
them that earlier computers wer
See more
File transfer commands
: These commands actually let the user
transfer files.RETR, STOR, APPE, STOU, .
Miscellaneous commands
: These commands deliver information to
the FTP user at the clientsite.Commands
are - HELP, NOOP,
9.
Briefly explain the steps involved in
storing an image file into the server
from client side.
Ans.
The steps involved in storing an image
file into the server from client side are as
follows:18.The control connection to
port 21 is created.19.After the control

connection to port 21 is created,


the FTP server sends the 220
(serviceready) response on the control
connection.20.The client sends the USE
command (this USER command passes
the user information toserver).21.The
server responds with 331 (user name is
OK, a password is required).22.The client
sends the PASS command (sends the
password for the user).23.The server
responds with 230 (user login OK, if user
id and password match).24.The client
issues a passive open on an ephemeral
port for data connection and sends
thePORT command (over the control
connection) to give this port number to
the server.25.The server does not open
the connection at this time, but
prepares itself for issuing anactive open
on the data connection between port 20
(server side) and the ephemeral
portreceived from the client. It sends the
response 150 (data connection will be
open shortly).26.The client sends the
TYPE command (to indicate the type of

data as binary )27.The server responds


with response 200 (command OK)28.The
client sends the STRU command (defines
the data following as of file type.)29.The
server responds with response 200
(command OK)30.The client sends the
STOR command (to request the server to
store the data)31.The server opens the
data connection and sends the message
250.32.The client sends the fi le
on the data connection. After the
entire fi le is sent the dataconnection
is closed. Closing the data connection
means end-of-file.33.The server sends the
response 226 on the control
connection.34.The client sends the QUIT
command (or it can send the other
commands to open another data
connection for transferring another
file).35.The server responds with 221
(service closing) and it closes the control
connection.
FAQ1.
What is concurrency?
Ans:

Concurrency means the ability to run


simultaneously. Both clients and serves
can run inconcurrent mode. However, the
concurrency in clients and server differ
from each other.
Concurrency in Clients:
Clients can be run on a computer either
iteratively or concurrently. Running clients
iterativelymeans running them one by one;
one client must start, run, and terminate
before the computer can start another
client. However today, most computers
allow concurrent clients, that is, twoor
more clients running at the same time.
Concurrency in Servers
Because an iterative server can process
only one request at a time, it receives a
request,processes it, and sends the
response to the requestor before it
handles another request. If there is a
request from another client, then it has
to either reject the request or keep the
requestin waiting until the server finishes
the first one. On the other hand, a
concurrent server canprocess many

requests at the same time and thus can


share its time between many requests.

N
I
I
T
C
o
o
r
d
i
n
a
t
o
r
G
u
i
d
e

o
m
p
u
t
e
r
N
e
t
w
o
r
k
s
6
2

2.
What are a connectionless iterative
server and a connectionless concurrent
server?
Ans:Connectionless iterative server
: The servers that use UDP,
a connectionless transport layer protocol,
are normally iterative. This means that
the server processes one client request at
atime in order of their arrival. A server
receives the request in a datagram from
UDP, processesthe request, and gives the
response to UDP to send to the client.
Connectionless concurrent server

: The servers that use UDP,


a connectionless transportlayer protocol
can also be iterative. This means that the
server processes multiple clientrequests
at the same time. This type of server
will be found occasionally.
3.
What are a connection-oriented iterative
server and a connection-oriented
concurrent server?
Ans:Connection-oriented iterative
server
: The servers that use TCP, a connectionorientedtransport layer protocol can be
concurrent. This means that the server
can serve one clientrequest at a time.
This type of server will be found
occasionally.
Connection-oriented concurrent server
: The servers that use TCP, a connectionorientedtransport layer protocol, are
normally concurrent. This means that the
server can serve manyclients at the same
time. Communication is connectionoriented, which means that a request isa

stream of bytes that can arrive in several


segments and the response can occupy
severalsegments. A connection is
established between the server and each
client, and the connectionremains open
until the entire stream is processed and
the connection is terminated.
4.
What is an active open connection?
Ans:
A client opens the communication channel
using the IP address of the remote host and
thewell-known port address of the specific
server program running on that
machine. This is calledan
active open
connection.
5.
What is a passive open connection?
Ans:
A server opens the channel for incoming
requests from clients, but it never
initiates a serviceuntil it is requested to
do so. This is called a
passive open

connection.
6.
What is a control connection?
Ans:
FTP uses ASCII character set to
communicate across the control channel.
Communication isachieved through
commands and responses. This simple
method is adequate for the
controlconnection because we send one
command (response) at a time. Each
command or responseis only one short line
so we need not worry about file format or
file structure. Each line isterminated with
a two-character (carriage return and line
feed) end-of-line token.
7.
What is data connection?
Ans:
Data connection allows you to transfer
files after defining the types of file to be
transferred, thestructure of the data,
and the transmission mode. Before sending
the file through the dataconnection, you
need to prepare for transmission through

the control connection. Theheterogeneity


problem is resolved by defining three
attributes of communications: file type,
data

N
I
I
T
C
o
o
r
d
i
n
a
t
o
r
G
u
i
d
e

C
o
m
p
u
t
e
r
N
e
t
w
o
r
k
s
6
3
structure, and transmission mode. A
common format for the above three
attributes is agreedupon before actually
transferring the data.

N
I
I
T
C
o
o
r
d
i
n
a
t
o
r
G
u
i
d
e

C
o
m
p
u
t
e
r
N
e
t
w
o
r
k
s
6
4
8.

Write a brief description about clientserver model.


Ans:
The purpose of a client-server model is to
provide data communication services to
users. In theclient-server model, an
application program, called the
client,
requests for a service fromanother
application program, called the
server
. In other words, when a machine needs
torequest for a service, it is called a
requester or a client. When a machine
provides a service, itis called a provider or
a server.
9.
Write a short note on FTP.
Ans:
File transfer protocol (FTP) is the standard
mechanism provided by TCP/IP to copy a
file fromone host to another. When two
systems use different file name
conventions, different ways torepresent
text and data, and different directory

structures, you can use FTP in such


a situationto transfer files. FTP establishes
two connections between the hosts. One
connection is usedfor data transfer and
the other for control information
(commands and responses). FTP usestwo
well-known TCP ports, port 20 is used for
the data connection and port 21 is used
for thecontrol connection.
10.
What are the common FTP commands for
processing?
Ans:
FTP uses the control connection to
establish a communication between the
client controlprocess and the server
control process. During
this communication, the FTP commands
aresent from the client to the server and
the responses are sent back from the
server to the client.You can divide the FTP
commands into six groups: access
commands, file managementcommands,
data formatting commands, port defining

commands, file transferring commands,and


miscellaneous commands.
Access Commands
: These commands let the user access the
remote system.Commands are - USER,
PASS, ACCT, REIN, QUIT, ABOR
File Management Commands:
These commands let the user access the
file system on theremote computer. They
allow the user to navigate through the
directory structure, create newdirectories,
delete files, and so on.Commands are
CWD, CDUP, DELE, LIST,
Data Formatting Commands:
These commands let the user define the
data structure, file typeand transmission
mode. The defined format is then used by
the file transfer commands.Commands are
TYPE, STRU, and MODE.
Port Defining Commands:
These commands define the port number for
the data connectionon the client
site.Commands are PORT, PASV
File Transfer Commands:

These commands actually let the user


transfer files.RETR, STOR, APPE, STOU,
Miscellaneous Commands:
These commands deliver information to the
FTP user at the clientsite.Commands are HELP, NOOP,

N
I
I
T
C
o
o
r
d
i
n
a
t
o
r
G
u
i
d
e

C
o
m
p
u
t
e
r
N
e
t
w
o
r
k
s
6
5

You might also like