CN Unit-5 Notes
CN Unit-5 Notes
To have a hierarchical name space, a domain name space was designed. In this
design the names are defined in an inverted-tree structure with the root at the top.
The tree can have only 128 levels: level 0 (root) to level 127.
Figure 1
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 (empty string).
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 (null).
Example: challenger.ate.tbda.edu.
Example: challenger
Domain
A domain is a sub-tree of the domain name space. The name of the domain is the
domain name of the node at the top of the sub-tree. Figure 3 shows some domains.
Note that a domain may itself be divided into domains (or subdomains as they are
sometimes called).
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.
Example:
com -Commercial organizations
edu-Educational institutions ,
gov- Government institutions ,
info -Information service providers
int-International organizations,
net - Network support centers ,
org -Nonprofit organizations
Country Domains
The country domains section uses two-character country abbreviations (e.g., us for
United States). Second labels can be organizational, or they can be more specific,
national designations. The United States, for example, uses state abbreviations as a
subdivision of us.
TELNET
Timesharing Environment
TELNET was designed at a time when most operating systems, such as UNIX,
were operating in a timesharing environment. In such an environment, a large
computer supports multiple users.
Logging
In a timesharing environment, users are part of the system with some right to
access resources. Each authorized user has identification and probably, a password.
The user identification defines the user as part of the system. To access the system,
the user logs into the system with a user id or log-in name. The system also
includes password checking to prevent an unauthorized user from accessing
resources.
Figure 4
ELECTRONIC MAIL
This is most common scenario, Bob is also connected to his mail server by a WAN
or a LAN. After the message has arrived at Bob's mail server, Bob needs to retrieve
it. Here, we need another set of client/server agents, which we call message access
agents (MAAs). Bob uses an MAA client to retrieve his messages. The client sends
a request to the MAA server, which is running all the time, and requests the
transfer of the messages.
When both sender and receiver are connected to the mail server via a LAN or a
WAN, we need two VAs, two pairs of MTAs (client and server), and a pair of
MAAs (client and server). This is the most common situation today.
Figure 6
User Agent
The first component of an electronic mail system is the user agent (VA). It
provides service to the user to make the process of sending and receiving a
Figure 7
Command-driven
User agent normally accepts a one-character command from the keyboard to
perform its task. For example, a user can type the character r, at the command
prompt, to reply to the sender of the message, or type the character R to reply to
the sender and all recipients. Some examples of command-driven user agents are
mail, pine, and elm.
Addresses
To deliver mail, a mail handling system must use an addressing system with
unique addresses. In the Internet, the address consists of two parts: a local part and
a domain name, separated by an @ sign.
Local Part
The local part defines the name of a special file, called the user mailbox, where all
the mail received for a user is stored for retrieval by the message access agent.
Domain Name
The second part of the address is the domain name. An organization usually selects
one or more hosts to receive and send e-mail; the hosts are sometimes called mail
servers or exchangers.
MIME
Multipurpose Internet Mail Extensions (MIME) is a supplementary protocol that
allows non-ASCII data to be sent through e-mail. MIME transforms non-ASCII
data at the sender site to NVT ASCII data and delivers them to the client MTA to
be sent through the Internet. The message at the receiving side is transformed back
to the original data. We can think of MIME as a set of software functions that
transforms non-ASCII data (stream of bits) to ASCII data and vice versa.
Figure 9
1. MIME-Version
2. Content-Type
3. Content-Transfer-Encoding
4. Content-Id
5. Content-Description
Figure 10
MIME-Version
This header defines the version of MIME used. The current version is 1.1.
Content-Type
This header defines the type of data used in the body of the message. The content
type and the content subtype are separated by a slash.
Content-Transfer-Encoding
This header defines the method used to encode the messages into 0s and 1s for
transport.
Content-Id
This header uniquely identifies the whole message in a multiple-message
environment.
Content-Description
9 Department of CS/IT, United College of Engineering and Research, Prayagraj
This header defines whether the body is image, audio, or video.
The actual mail transfer is done through message transfer agents. To send mail, a
system must have the client MTA, and to receive mail, a system must have a server
MTA. The formal protocol that defines the MTA client and server in the Internet is
called the Simple Mail Transfer Protocol (SMTP).
SMTP is used two times, between the sender and the sender's mail server and
between the two mail servers. SMTP simply defines how commands and responses
must be sent back and forth.
Figure 11
Figure 12
Keywords Arguments
HELO Sender's host name
MAIL FROM Sender of the message
RCPTTO Intended recipient of the message
Responses are sent from the server to the client. A response is a three digit code
that may be followed by additional textual information.
Code Description
211 System status or help reply
214 Help message
220 Service ready
SMTP is a push protocol; it pushes the message from the client to the server. In
other words, the direction of the bulk: data (messages) is from the client to the
server. On the other hand, the third stage needs a pull protocol; the client must pull
messages from the server. The direction of the bulk data is from the server to the
client. The third stage uses a message access agent.
Figure 13
Post Office Protocol, version 3 (POP3) is simple and limited in functionality. The
client POP3 software is installed on the recipient computer; the server POP3
software is installed on the mail server. Mail access starts with the client when the
user needs to download e-mail from themailbox on the mail server. The client
opens a connection to the server on TCP port 110.It then sends its user name and
password to access the mailbox.
POP3 has two modes: the delete mode and the keep mode. In the delete mode, the
mail is deleted from the mailbox after each retrieval. In the keep mode, the mail
remains in the mailbox after retrieval. The delete mode is normally used when the
user is working at her permanent computer and can save and organize the received
mail after reading or replying. The keep mode is normally used when the user
accesses her mail away from her primary computer (e.g., a laptop). The mail is
read but kept in the system for later retrieval and organizing
IMAP4
Another mail access protocol is Internet Mail Access Protocol, version 4 (IMAP4).
IMAP4 is similar to POP3, but it has more features; IMAP4 is more powerful and
more complex.
POP3 is deficient in several ways. It does not allow the user to organize her mail
on the server; the user cannot have different folders on the server. POP3 does not
allow the user to partially check the contents of the mail before downloading.
File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for
copying a file from one host to another. Although transferring files from one
system to another.
The well-known port 21 is used for the control connectionand the well-known port
20 for the data connection.
Figure 14
The control connection remains connected during the entire interactive FTP
session.
The data connection is opened and then closed for each file transferred. It opens
each time commands that involve transferring files are used, and it closes when the
file is transferred.
We should remember that file transfer in FTP means one of three things:
Figure 15
The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data
on the World Wide Web. HTTP functions as a combination of FTP and SMTP. It
is similar to FTP because it transfers files and uses the services of TCP. However,
it is much simpler than FTP because it uses only one TCP connection. There is no
separate control connection; only data are transferred between the client and the
server. HTTP is like SMTP because the data transferred between the client and the
server look like SMTP messages.
Request type
This field is used in the request message. In version 1.1 of HTTP, several request
types are defined. The request type is categorized into methods as follows
Version
The most current version of HTTP is 1.1.
Status code
This field is used in the response message. The status code field is similar to those
in the FTP and the SMTP protocols. It consists of three digits.
Whereas 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 site.
Header
The header exchanges additional information between the client and the server.
For example, the client can request that the document be sent in a special format,
or the server can send extra information about the document. The header can
consist of one or more header lines. Each header line has a header name, a colon, a
space, and a header value.
Nonpersistent Connection
In a nonpersistent connection, one TCP connection is made for each
request/response.
Persistent Connection
HTTP version 1.1 specifies a persistent connection by default. In a persistent
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 time-
out has been reached. The sender usually sends the length of the data with each
response. 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.
NETWORK MANAGEMENT
Figure 18
SNMP uses the concept of manager and agent. That is, a manager, usually a host,
controls and monitors a set of agents, usually routers.
Figure 19