Vous êtes sur la page 1sur 19

NETWORKING TECHNOLOGIES-II

CHAPTER 24: THE DOMAIN NAME SYSTEM (DNS)

To identify an entity, TCP/IP protocols use the IP address, which uniquely identifies the
connection of a host to the Internet. However people prefer to use names instead of
addresses. We need a system that can map a name to an address or an address to a name.

When the Internet was small, the mapping was done using a host file. The host file had
only two columns comprising name and address. Every host could store the host file on
its disk and update it periodically from a master host file.

Today it is impossible to have one single host file to relate every address with a name and
vice versa. The host file would be too large to store in every host.
The solution that is used today is to divide this huge amount of information into smaller
parts and store each part on a different computer. In this method the host that needs
mapping can contact the closest computer holding the needed information. This is the
concept followed by the Domain Name System.

NAMESPACE: - to be unambiguous the names assigned to the machines should be


carefully selected from a name space with complete control over the bindings between
the names and the IP addresses. The names should be unique because the addresses are
unique. A namespace that maps each address to a unique name can be organized in two
ways:

1). Flat namespace: - a name in this space is a sequence of characters without


structure. The names may or may not have a common section. If they do have it has no
meaning. The main disadvantage of a flat namespace is that it cannot be used in a large
system because it must be centrally controlled to avoid ambiguity and duplication.

2). Hierarchical namespace: - each name is made of several parts. The first part can
define the nature of the organization, the second part can define the name of an
organization, and the third part can define departments in the organization and so on. A
central authority can assign the part of the name that defines the nature and name of the
organization. The responsibility of the rest of the name can be given to the organization
itself. In this even is part of the address is same, the whole address will be different. The
names remain unique without the need to be assigned by a central authority. The central
authority controls only part of the name, not the whole.

DOMAIN NAME SPACE


To have a hierarchical namespace a domain name space was designed. In this design the
names are designed in an inverted tree structure with the root at the top. The tree can have
only 128 levels. The root glues the whole tree together; each level of the tree defines a
hierarchical level.

Page 1 of 19
NETWORKING TECHNOLOGIES-II

LABEL: - each node in the tree has a label, which is a string with a maximum of 63
characters. The root label is a null string. DNS requires that children of a node have
different labels, which guarantees the uniqueness of the domain names.

DOMAIN NAME: - each node in the tree has a domain name. A full domain name is a
sequence of labels separated by dots. The domain names are always read from the node
up to the root. The last label is the label of the root. This means that a full domain name
always ends in a null label, which means the last character is a dot because the null string
is nothing.

FULLY QUALIFIED DOMAIN NAME: - if a label is terminated by a null string, it is


called a FQDN. An FQDN is a domain name that contains the full name of a host. It
contains all labels from the most specific to the most general. For e.g.:
challenger.atc.fhda.edu. A DNS server can match an FQDN to an address

PARTIALLY QUALIFIED DOMAIN NAME: - if a label is not terminated by a null


string, it is called a PQDN. A PQDN starts from a node, but it does not reach the root. It
is used when the name to be resolved belongs to the same site as the client. Here the
resolver can supply the missing part called the suffix to create an FQDN. For e.g.: if a
user at the fhda.edu. Site wants to get the IP address of the challenger computer he would
define the partial name as challenger

DISTRIBUTION OF NAMESPACE
The information contained in the domain name space should be stored. But it would be
inefficient and also not reliable to have just one computer store such a huge amount of
information.
It is inefficient because responding to requests from all over the world places a heavy
load on the system. It is not reliable because any failure makes the data inaccessible.

HIERARCHY OF NAME SERVERS


The solution to above problems is to distribute the information among many computers
called DNS Servers. One way to do this is to divide the whole space into many domains
based on the first level. We let the root stand-alone and create, as many domains as there
are first level nodes.
But a domain created in this manner could be very large; DNS allows domains to be
divided further into smaller domains. Each server can be responsible (authoritative) for
either a large or small domain. In other words we have a hierarchy of servers.

ZONE: - what a server is responsible for or has authority over is called a zone. If a server
accepts responsibility for a domain and does not divide the domain into smaller domains,
the “domain” and the “zone” refer to the same thing.
The server makes a database called the zone file and keeps all the information for every
node under that domain. However if a server divides its domains into sub domains and
delegates part of its authority to other servers, “domain” and “zone” refer to different
things. The information about the nodes in the sub domains is stored in the servers at the

Page 2 of 19
NETWORKING TECHNOLOGIES-II

lower levels with the original server keeping some sort of reference to these lower level
servers.

ROOT SERVER: - a root server is a server whose zone consists of the whole tree. A root
server usually does not store any information about domains but delegates its authority to
other servers keeping references to those servers. Currently there are more than 13 root
servers each covering the whole domain name space. These servers are distributed all
around the world.

PRIMARY AND SECONDARY SERVERS: - a primary server is a server that stores a


file about the zone for which it is an authority. It is responsible for creating, maintaining
and updating the zone file. It stores the zone file on a local disk.
A secondary server is a server that transfers the complete information about a zone from
another server (primary or secondary) and stores the file on its local disk. The secondary
server neither creates nor updates the zone file. If updating is required the primary server
does it and the updated version is sent to the secondary server.
The idea is not to put the secondary server at a lower level of authority but to create
redundancy for the data so that if one server fails, the other can continue serving clients.
A server can be a primary server for a specific zone and a secondary server for another
zone. When the primary server downloads information from the secondary, it is called
zone transfer.

DNS IN THE INTERNET

DNS is a protocol that can be used in different platforms. In the Internet, the domain
name space is divided into three different sections:
1). Generic domains
2). Country domains
3). Inverse domains

GENERIC DOMAINS: - the generic domains define registered hosts according to their
generic behavior. Each node in the tree defines a domain, which is an index to the domain
name space database.

LABEL DESCRIPTION
com Commercial organization
edu Educational institutions
gov Government institutions
int International organizations
mil Military groups
net Network support centers
org Non profit organizations

Page 3 of 19
NETWORKING TECHNOLOGIES-II

aero Aerospace/airlines companies


biz Businesses or firms
coop Cooperative business firms
info Information service providers
museum Museums/historical orgs.
name Personal names
pro Professional individual orgs.

COUNTRY DOMAINS: - the country domains section follows the same format as the
generic domains but uses two character country abbreviations (e.g. us for United States)
in place of the three character organizational abbreviations at the first level.
Second level labels can be organizational or they can be more specific, national
designations etc.
The address anza.cup.ca.us can be translated to Anza college in Cupertino in California in
the United States

INVERSE DOMAINS (Write the same answer if a short note on Pointer Query is asked)
The inverse domain is used to map an address to a name. This may happen for example,
when a server has received a request from a client to do a task. Whereas the server has a
file that contains a list of authorized clients, the server lists only the IP address of the
client. To determine if the client is one the authorized list, it can ask its resolver to send a
query to the DNS server and ask for a mapping of address to name.
This type of query is called an inverse or pointer query (PTR). To handle a pointer query,
the inverse domain is added to the domain name space with the first level node called
arpa (for historical reasons). The second level is also one single node named in-addr (for
inverse address). The rest of the domain defines the IP addresses.
The servers that handle the inverse domain are also hierarchical. To follow the
conventions of reading the domain labels from the bottom to the top, an IP address such
as 132.35.45.121 is read as 121.45.35.132.in-addr.arpa. This configuration makes the
domain look inverted when compared to a generic or a country domain.

Articles 24.11, 24.12, 24.13, 24.14, 24.15 from Douglas Comer

DDNS: - when the DNS was designed no one predicted that there would be so many
changes made to addresses. In DNS when there is a change, such as adding a new host,
removing a host or changing an IP address the change must be made to the DNS master
file. These changes involve a lot of manual updating.
The Dynamic Domain Name Space has been devised to respond to this need. In DDNS
when a binding between a name and an address is determined the information is sent
usually by DHCP to a primary server. The primary server updates the zones. The
secondary servers are notified actively or passively. In active notification the primary

Page 4 of 19
NETWORKING TECHNOLOGIES-II

server sends a message to the secondary about the change. In passive notification the
secondary servers periodically check for any changes.

DNS can either use UDP or TCP. In both cases the well-known port used by the server is
port 53. UDP is used when the size of the response message is less than 512 bytes
because most UDP packages have a 512-byte size limit. If the size is more than 512 bytes
a TCP connection is used.

CHAPTER 25: APPLICATIONS: REMOTE LOGIN (TELNET, RLOGIN)

The main task of the Internet and its TCP/IP protocol suite is to provide services for
users. For example, users want to be able to run different application programs at a
remote site and create results that can be transferred to their local site. One way to satisfy
these demands is to create different client-server application programs for each desired
service.
The better solution is a general-purpose client-server program that lets a user access any
application program on a remote computer. In other words let a user log on to a remote
computer. After logging on a user can use the services available on the remote computer
and transfer the results back to the local computer.
TELNET and Rlogin are general-purpose client-server application programs. TELNET is
an abbreviation for TErminaL NETwork. It is the standard TCP/IP protocol for virtual
terminal service as proposed by ISO.

TELNET CONCEPTS

Time-Sharing Environment: - TELNET was designed at a time when most operating


systems were operating in a time-sharing environment. In this a large computer supports
multiple users. The interaction between a user and computer occurs through a terminal,
which is a combination of keyboard, monitor and mouse.
In time-sharing environment the central computer must do all of the processing. When a
user types a character on the keyboard the character is usually sent to the computer and
echoed to the monitor. This creates an environment in which each user has the illusion of
a dedicated computer.

Remote Login: - when a user wants to access an application program or utility located on
a remote machine, he or she performs remote login. Here the TELNET client and server
programs come into use. The user sends the keystrokes to the terminal drivers where the
local operating system accepts the characters but does not interpret them. The characters
are sent to the TELNET client, which transforms the characters to a universal character
set called NVT and delivers them to the local TCP/IP 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 characters
understandable by the remote server. But this cannot be done directly because a remote

Page 5 of 19
NETWORKING TECHNOLOGIES-II

operating system is not designed to receive characters from a TELNET server. The
solution is to add a piece of software called a pseudoterminal driver, which pretends that
the characters are coming from a terminal. The operating system then passes the
characters to the appropriate application programs.
(Draw the figure 25.1 given in Douglas Comer for this explanation)

NETWORK VIRTUAL TERMINAL

The mechanism to access a remote computer is complex. This is because every computer
and its operating system accept a special combination of characters as tokens.
To deal with heterogeneous systems i.e. we want to access any remote computer in the
world, we must know what type of computer we will be connected to and also install the
specific terminal emulator used by that computer. TELNET solves this problem by
defining a universal interface called the Network Virtual Terminal. Via this character set,
the client TELNET translates the characters that come from the local terminal into the
NVT form and delivers them to the network. The server TELNET, on the other hand
translates data and commands from NVT form into the form acceptable by the remote
computer.

NVT uses two sets of characters, one for data and one for control
1). Data characters:- for data NVT normally uses what is called NVT ASCII. This is
an 8-bit character set in which the highest order bit is 0.
2). Remote control characters: - to send control characters between computers NVT
uses an 8-bit character set in which the highest order bit is set to 1

CHARACTER MEANING
EOF End of file
EOR End of record
SE Sub-option end
NOP No operation
DM Data mark
BRK Break
IP Interrupt process
AO Abort output
AYT Are you there?
EC Erase character
EL Erase line
GA Go ahead signal
SB Sub-option begin
WILL Agree to enable option
WONT Refuse to enable option
DO Approve to option request

Page 6 of 19
NETWORKING TECHNOLOGIES-II

DON’T Denial of option request


IAC Interpret next character as control

TELNET uses only one TCP connection. The server uses the well-known port 23 and the
client uses an ephemeral port. The same connection is used for sending both data and
control characters. TELNET accomplishes this by embedding the control characters in a
data stream. However to distinguish data from control characters each sequence of
control characters is preceded by a special control character called interpret as control
(IAC).

TELNET OPTIONS
TELNET lets the client and server negotiate options before or during the use of the
service. Options are extra features available to a user with more sophisticated terminal.
Some of the common options are:
1). Binary: this option allows the receiver to interpret every 8-bit character received
except IAC as binary data.
2). Echo: this option allows the server to echo data received from the client. This
means that every character sent by the client to the sender will be echoed back to the
screen of the client terminal.
3). Suppress go-ahead: this option suppresses the GA character
4). Status: this option allows the user to get the options enabled at the server site
5). Timing mark: this option allows one party to issue a timing mark that indicates
that all previously data has been processed
6). Terminal type: this option allows the client to send its terminal type
7). Terminal speed: this option allows the client to send its terminal speed
8). Line mode: this option allows the client to switch to line mode

Article 25.8 from Douglas Comer

CONTROLLING THE SERVER


1). IP (interrupt process): when a program is being run locally the user can interrupt
the program if the program has gone into an infinite loop. TELNET defines the IP control
character that is read and interpreted as the command for invoking the interrupt function
in remote machine

2). AO (abort output): this is same as IP but it allows the process to continue without
creating output. This is useful if the process has another effect in addition to creating
output. The user wants this effect but not the output
3). AYT (are you there?): this control character is used to determine if the remote
machine is up and running especially after a long silence from the server. When this
character is received the server usually sends an audible or visual signal to confirm that it
is running
4). EC (erase character): this is used to erase a character, which interprets the work of
backspace, or delete key in the local machine
5). EL (erase line): this is used to erase the current line in the remote host

Page 7 of 19
NETWORKING TECHNOLOGIES-II

OUT OF BAND SIGNALLING


To make control characters effective in special situations, TELNET uses out-of-band
signaling. In this the control characters are preceded by IAC and are sent to the remote
process out of order.
Suppose an application program running at the server site has gone into an infinite loop
and does not accept any input data. The user wants to interrupt the application program
but the program does not read any data from the buffer. The TCP at the server site has
found that the buffer is full and has sent a segment specifying that the client window size
should be zero.
To remedy such a situation an urgent TCP segment should be sent from the client to the
server. The urgent segment overrides the regular flow-control mechanism.
When a TELNET process wants to send an out-of-band sequence of characters to the
other process it embeds the sequence in the data stream and inserts a special character
called DM (data mark). However to force the other party to handle the sequence out of
order, it creates a TCP segment with the urgent bit set and the urgent pointer pointing to
the DM character.
When the receiving TCP receives the segment, it reads the data and discards any data
preceding the control characters. When it reaches the DM character, the remaining data
are handled normally. In other words the DM character is used as a synchronization
character that switches the receiving TCP from the urgent mode to the normal mode and
resynchronizes the two ends.

REMOTE LOGIN (Rlogin)


Another remote login client-server application in common use is Rlogin. This is not an
Internet standard but was designed by BSD UNIX to provide access to remote computers.
Rlogin was originally designed to be used on the UNIX operating system as a simple
remote login facility. It therefore does not provide option negotiation. The server accepts
the terminal type of the user.

Rlogin uses only one TCP connection. The server uses the well-known port 513 and the
client uses an ephemeral port. The one TCP connection is used both for data and
commands.

CONNECTION: - the client starts the connection. After the usual TCP connection is
established on port 513, the client sends four null terminated strings.
1. The first string is actually empty. It is just a null character (\0)
2. the second string defines the login name of the user on the client host and
terminates with a null character
3. the third string defines the login name of the user on the server host and
terminates with a null character
4. the fourth string defines the name of the user’s terminal followed by a slash,
followed by the terminal speed and terminated with a null character

Page 8 of 19
NETWORKING TECHNOLOGIES-II

The server responds with only one null character.

FLOW CONTROL: - the output sent by the server to the client is shown on the client
screen. Two special characters Start and Stop control the displaying of the output on the
screen. The client or the server can handle the keys.

LOCAL FLOW CONTROL: - in local flow control, the client handles the Start and Stop
keys. The client does not send these two characters to the server. If the user types the Stop
key the client stops showing on the screen the output received from the server. It buffers
them. When the user types the Start key the buffered data are then displayed. This is the
default setting.

REMOTE FLOW CONTROL: - in remote flow control, the server handles the Start and
Stop keys. When the server receives the Stop key it stops sending any data to the client.
When it receives the Start key, it sends the buffered data to the client. In remote flow
control by the time the Stop key reaches the server it may have sent a lot of characters to
the client screen.

Rlogin works only in the character mode. The data are sent from the client to the server
one character at a time. Each character is then echoed to the user terminal.

SECURITY ISSUE

Both TELNET and Rlogin suffer from security problems. Although both require a login
name and password often this is not enough. A microcomputer connected to a broadcast
LAN can easily eavesdrop using snooper software and capture a login name and
password even if it is encrypted.

Page 9 of 19
NETWORKING TECHNOLOGIES-II

CHAPTER 26: APPLICATIONS: FILE TRANSFER AND ACCESS

Article 26.3, 26.4 from Douglas Comer

Transferring files from one computer to another is one of the most common tasks
expected from a networking or internetworking environment. There are certain problems
that must be dealt with in this case.
1. Two systems may have different ways to represent text and data
2. Two systems may have different directory structures
3. Two systems may have different file conventions

All of these problems have been solved by FTP i.e. File Transfer Protocol in a very
simple and elegant approach
FTP differs from other client-server applications in that it establishes two connections
between the hosts. One connection is used for data transfer and another for control
information. For this FTP uses two well-known ports: port 21 is used for the control
connection whereas port 20 is used for data connection.
In the basic model of FTP the client has three components: user interface, client control
process and the client data transfer process.
The server has two components: the server control process and server data transfer
process

The control connection remains connected during the entire interactive FTP session. The
data connection is opened and then closed for each file transferred.

CONNECTIONS

Control Connection: - the control connection is created in the same way as any other
application program. There are two steps
1. The server issues a passive open on the well-known port 21 and waits for a
client
2. The client uses an ephemeral port and issues an active open
The connection remains open during the entire process. The service type used by the IP
protocol is minimize delay because this is an interactive connection between a user and a
server. The user types commands and expects to receive responses without significant
delay.

Data Connection: - there are three steps involved in the data connection
1. The client issues a passive open using an ephemeral port. This must be done
by the client because it is the client that issues the commands for transferring
files
2. The client sends this port number to the server using the PORT command

Page 10 of 19
NETWORKING TECHNOLOGIES-II

3. The server receives the port number and issues an active open using the well-
known port 20 and the received ephemeral port number

After the initial connection in both the cases, the server process creates a child process
and assigns the duty of serving the client to the child process using an ephemeral port.

COMMUNICATION
The FTP client and server, which run on different computers, must communicate with
each other. These two computers may use different operating systems, different character
sets, different file structures and formats.

COMMUNICATION OVER CONTROL CONNECTION


FTP uses the same approach as TELNET or SMTP to communicate across the control
connection. It uses the NVT ASCII character set. Communication is achieved through
commands and responses.

COMMUNICATION OVER DATA CONNECTION


The purpose and implementation of the data connection is to transfer files. The client
must define the type of file to be transferred, the structure of the data and the
transmission mode. The heterogeneity problem is resolved by defining these three
attributes of communication

File Type: FTP can transfer one of the following file types
1. ASCII file: this is the default format for transferring text files
2. EBCDIC file: if one or both ends of the connection use EBCDIC encoding,
the file can be transferred with EBCDIC file type
3. Image file: this is the default format for transferring binary files.

Data Structure:
1. File structure (default): the file has no structure. It is a continuous stream of
bytes
2. Record structure: the file is divided into records. This is only done with text
files
3. Page structure: the file is divided into pages. The pages can be stored or
accessed randomly or sequentially.

Transmission mode:
1. Stream mode: this is the default mode. Data are delivered from FTP to TCP as
a continuous stream of bytes. TCP is responsible for chopping data into
segments of appropriate size.
2. Block mode: data can be delivered from FTP to TCP in blocks. In this case
each block is preceded by a 3 byte header
3. Compressed mode: if the file is big, the data can be compressed. The
compression method used is usually run-length encoding.

Page 11 of 19
NETWORKING TECHNOLOGIES-II

Article 26.10 from Douglas Comer (Anonymous FTP)

TFTP (Trivial File Transfer Protocol)


There are occasions when we need to simply copy a file without the need of all the
functionalities of the FTP. For example, when a diskless workstation or a router is booted,
we need to download the bootstrap and configuration files. Here we do not need all of the
sophistication provided in FTP. We just need a protocol that quickly copies the files.

TFTP is designed for these types of file transfers. It is so simple that the software package
can fit into the read-only memory of a diskless workstation. It can be used at bootstrap
time. TFTP can read or write a file for the client. Reading means copying a file from the
server to the client whereas writing means copying a file from the client to the server.
TFTP uses the services of UDP on the well-known port 69.

MESSAGES
There are five types of messages in TFTP
1. RRQ: the read request message is used by the client to establish a connection
for reading data from the server
2. WRQ: the write request message is used by the client to establish a connection
for writing data to the server
3. DATA: the client or the server to send blocks of data uses the data message.
This block must be exactly 512 bytes except the last block, which must be
between 0 and 511 bytes. A non 512-byte block is used as a signal that the
sender has send all the data. If the data happens to be exactly 512 bytes then
the sender must send one extra block of zero bytes to show the end of
transmission
4. ACK: the acknowledge message is used by the client or server to
acknowledge the receipt of a data block.
5. ERROR: the client or server uses the error message when a connection cannot
be established or when there is a problem during data transmission. It can be
sent as a negative response to RRQ or WRQ.

CONNECTION ESTABLISHMENT: - connection establishment for reading files is


different from connection establishment for writing files
1. Reading: to establish a connection for reading, the TFTP client sends a RRQ
message. The name of the file and the transmission mode is defined in this
message. If the server can transfer the file it responds positively with a DATA
message else will respond negatively with an ERROR message.
2. Writing: to establish a connection for writing, the TFTP client uses the WRQ
message. The name of the file and the transmission mode is defined in this
message. If the server can accept a copy of the file, it responds with an ACK
message else with an ERROR message.

Page 12 of 19
NETWORKING TECHNOLOGIES-II

CONNECTION TERMINATION: - after the entire file is transferred, the connection


must be terminated. TFTP does not have a special message for termination. Termination
is accomplished by sending the last block of data, which are less than 512 bytes.

ERROR CONTROL
The TFTP error-control mechanism is different from those of other protocols. It is
symmetric, which means that the sender and the receiver both use the concept of time-
outs. The sender uses a time out for data messages; the receiver uses time-out for
acknowledgement messages. If a data message is lost then the sender retransmits it after
time-out expiration. If an acknowledgment is lost the receiver retransmits it after time-out
expiration. This guarantees a smooth operation. Error control is needed in 4 situations:
1. Damaged message: if a block of data is damaged, the receiver detects it and
the block is discarded. The sender waits for the ack and does not receive
within the time-out and hence retransmits it.
2. Lost message: if a block is lost it never reaches the receiver and no ack is sent.
The sender resends the block after time-out.
3. Lost acknowledgement: if an acknowledgement is lost, we have two
situations. If the timer of the receiver matures before the timer of the sender,
the receiver retransmits the acknowledgment otherwise the sender resends the
data.
4. Duplicate message: the receiver through the block number can detect
duplication of blocks. In any case, the block is acknowledged once again by
the receiver.

SORCERER’S APPRENTICE BUG: - although the flow and error control mechanism in
TFTP is symmetric, it can lead to a problem known as Sorcerer’s apprentice bug, named
for the cartoon character who conjures up a mop that continuously replicates itself.
This will happen if the ACK message for a packet is delayed but not lost. In this situation
every succeeding block is sent twice, and every succeeding ack is received twice.
Suppose for example, the fifth ack is delayed. After the time-out the sender resends the
fifth block, which will be acknowledged by the receiver again. The sender receives two
acks for the fifth block, which triggers it to send the sixth block twice. The receiver
receives the sixth block twice and again sends two acks. And the problem goes on.

SECURITY: - one important point about TFTP is that there is no provision for security.
There is no user identification or password. One security measure is to limit the access of
TFTP to noncritical files.
Another way is to add security by using another application program such as TELNET in
conjunction with TFTP. The user must first access TELNET and it will check the access
rights of the user.
TFTP is very useful for basic file transfer where security is not a big issue. Its main
application is in conjunction with the BOOTP or DHCP protocols. TFTP requires only a

Page 13 of 19
NETWORKING TECHNOLOGIES-II

small amount of memory and uses the services of UDP and IP. It can be easily configured
in ROM.

Articles 26.12, 26.13, 26.14, 26.15 from Douglas Comer (NFS)

CHAPTER 27: APPLICATIONS: ELECTRONIC MAIL (SMTP, POP, IMAP, MIME)


TO BE DONE FROM DOUGLAS COMER.

Page 14 of 19
NETWORKING TECHNOLOGIES-II

APPLICATIONS: WORLD WIDE WEB (HTTP)

 The Web consists of a large set of documents called Web Pages, which are
accessible over the Internet. Each Web page is classified as a hypermedia
document.
 Two main building blocks are used to implement the Web on top of the global
Internet. A Web browser consists of an application program that a user invokes
to access and display a Web page. The browser becomes a client that contacts
the appropriate Web server to obtain a copy of the specified page.
 The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access
data on the World Wide Web. The protocol transfers data in the form of plain
text, hypertext, audio, video and so on. It is called the Hypertext Transfer
protocol because its efficiency allows its use in a hypertext environment
where there are rapid jumps from one document to another.
 HTTP functions like a combination of SMTP and FTP. It is simpler than FTP
because it uses only one TCP connection (well known port 80).
 The idea of HTTP is very simple. A client sends a request, which looks like
mail to the server. The server sends the response which looks a like a mail
reply to the client. The request and response messages carry data in the form
of letter with MIME like format.

CHARACTERISTICS OF HTTP: -
 The protocol used for communication between a browser and a Web server
or between intermediate machines and Web servers is known as Hypertext
Transfer Protocol
 Application level: HTTP operates at the application level. It
assumes a reliable connection oriented transport protocol such as
TCP.
 Request/Response: once a session has been established one side
must send a request to which the other side responds.
 Stateless: each HTTP request is self-contained. The server does not
keep history of previous requests or sessions.
 Bi-directional transfer: in most cases a browser requests a Web
page and the server transfers a copy to the browser. HTTP allows
transfer from the browser to the server in cases of submitting a
form
 Support for caching: to improve response time a browser caches a
copy of each Web page is retrieves.
 Support for intermediaries: HTTP allows a machine along the path
between a browser and server to act as a proxy server that caches
Web pages and answers a browser’s request from its cache.

HTTP TRANSACTION
There are two general types of HTTP messages:

Page 15 of 19
NETWORKING TECHNOLOGIES-II

1. HTTP REQUEST
2. HTTP RESPONSE

REQUEST MESSAGES: A request message consists of a request line, a header and


sometimes body also.
 The request line defines the request type, resource (URL) and HTTP
version.

Request type: in version 1.1 of HTTP, several request types are defined. The request type
categorizes the request messages into several methods.

GET: - the GET method is used when the client wants to retrieve a document from the
server. The address of the document is defined in the URL. The server responds with the
contents of the document in the body of the response message unless there is an error.

HEAD: - this is used when the client wants some information about a document but not
the document itself. It is similar to GET, but the response from the server does not
contain a body.

POST: - this is used when the client provides some information to the server. It can be
used to send input to the server

PUT: - the client to provide a new or replacement document to be stored on the server
uses this method. The document is included in the body of the request and will be stored
in the location defined by the URL

COPY: - this method is used to copy a file to another location. The location of the source
file is given in the request line.

MOVE: - it is used to move a file to another location.

DELETE: - this method is used to remove a document on the server

LINK: - this method is used to create a link or links from a document to another location.
The location of the file is given in the request line.

OPTION: - the option method is used by the client to ask the server about available
options.

Uniform Resource Locators (URL): - a client that wants to access a Web page needs an
address. To facilitate the access of documents distributed throughout the world, HTTP
uses the concept of locators. The URL is a standard for specifying any kind of
information on the Internet.

The general scheme of an URL is as follows:

Page 16 of 19
NETWORKING TECHNOLOGIES-II

scheme://hostname [: port] / path [; parameters] [? query]


Here scheme is the protocol used to retrieve the document. The most common ones are
Gopher, FTP, HTTP, and TELNET
The hostname is the computer where the information is stored although the name of the
computer can be alias.
The URL can optionally contain the port number of the server.
parameters is an optional string that specifies additional parameters supplied by the client
query is an optional string used when the browser sends a question.
Path is the pathname of the file where the information is located. The protocol standards
distinguish between the absolute form of an URL and relative form. A relative URL, is
seldom seen by a user is only meaningful when the server has already been determined
i.e. the server is implicitly known.

Version: - although the most current version of HTTP is 1.1, HTTP versions 1.0 and 0.9
are still in use

RESPONSE MESSAGE: - a response message consists of a status line, a header and


sometimes a body

Status line: - the status line defines the status of the response message. It consists of the
HTTP version, a status code and a status phrase.

HTTP version is the same as the field in the request line.

Status code: - the status code field consists of three digits. The codes in the 100 range are
only informational; the codes in the 200 range indicate a successful request. The codes in
the 300 range redirect the client to another URL and the codes in the 400 range indicate
an error at the client side. Finally codes in the 500 range indicate an error at the server
side.

Status phrase: - this field explains the status code in the text format.

PERSISTENT VERSUS NON PERSISTENT CONNECTION

HTTP version 1.0 specified a non-persistent connection while a persistent connection is


the default in version 1.1

Non-persistent connection
1. The client opens a TCP connection and sends a request
2. The server sends the response and closes the connection
3. The client reads the data until it encounters an end-of-file marker; it then closes
the connection.

Page 17 of 19
NETWORKING TECHNOLOGIES-II

In this strategy for N different pictures in different files, the connection must be opened
and closed N times. This strategy imposes a high overhead and requires a slow start
procedure each time a connection is opened.

Persistent connection
In this connection the server leaves the connection open for more requests after sending a
response. The server can close the connection at the request of a client or if a timeout has
been reached. A browser using a persistent connection can further optimize by pipelining
requests. It is especially attractive in situations where multiple images must be retrieved
for a page.
In this connection the sender usually sends the length of the data with each response so as
to identify the beginning and end item sent in each connection. However there are some
occasions when the sender does not know the length of the data. This is the case when a
document is created dynamically or actively. In these cases the server informs the client
that the length is not known and closes the connection after sending the data so the client
knows that the end of the data has been reached.

Articles 28.12, 28.13, 28.14, 28.15 from Douglas Comer

NEXT GENERATION: IP Version 6 (could be asked in Viva)

The network layer protocol in the TCP/IP protocol suite is currently IPv4. although IPv4
is well designed, data communication has evolved since the inception of IPv4 in the
1970s. it has some deficiencies that make it unsuitable for the fast growing Internet
including the following:
1. the method of addressing has depleted the address space of IPv4 and soon
there will not be any addresses left to assign to any new system that wants to
be connected to the Internet
2. the Internet must accommodate real time audio and video transmission. This
type of transmission requires minimum delay strategies and reservation of
resources not provided in IPv4 design
3. the Internet must accommodate encryption and authentication of data for some
applications. No encryption or authentication is provided in IPv4

To overcome these deficiencies, IPv6 also known as IPng (Internetworking protocol, next
generation) was proposed and is now a standard. In IPv6, the Internet protocol was
extensively modified to accommodate the unforeseen growth of the Internet. Related
protocols such as ICMP were also modified. Other protocols in the network layer such as
ARP, RARP were either deleted or included. Routing protocols such as RIP, were also
slightly modified to accommodate such changes.

Page 18 of 19
NETWORKING TECHNOLOGIES-II

The next generation IP, or IPv6 has some advantages over IPv4 that can be summarized
as below:
1. an IPv6 address is 128 bits long. Compared with the 32-bit address of IPv4
this is a huge increase in the address space (296).
2. IPv6 uses a new header format in which options are separated from the base
header and inserted when needed between the base header and the upper layer
data. This simplifies and speeds up the routing process because most of the
options do not need to be checked by the routers
3. IPv6 is designed to allow the extension of the protocol if required by new
technologies or applications
4. in IPv6 the type of service field has been removed but a mechanism called
flow label has been added to enable the source to request special handling of
the packet
5. the encryption and authentication options in IPv6 provide confidentiality and
integrity of the packet

Page 19 of 19

Vous aimerez peut-être aussi