ACN Notes Ch5
ACN Notes Ch5
IMRAN SHAIKH
PAGE 1
World Wide Web (WWW)
WWW is a repository of information linked together from points all over
the world.
The WWW has a unique combination of flexibility, portability, and user-
friendly features that distinguish it from other services provided by the
Internet.
WWW Architecture
The WWW today is a distributed client/server service, in which a client using
a browser can access a service using a server. However, the service provided
is distributed over many locations called sites.
PAGE 2
Fig. 5.2 Web Client - Browser
Web Server
The Web page is stored at the server. Each time a client request arrives, the
corresponding document is sent to the client.
PAGE 3
Cookie
World Wide Web was originally designed as a stateless entity - does not
remember information about the clients.
However, today the Web has other functions that need to remember some
information about the clients. To fulfill purpose, the cookie mechanism was
developed.
Cookies are the strings or files created by web server (while client user is
browsing) and placed it at client user’s browser, to save client user behavior.
The server then sends this information back to the user's browser as a
cookie.
The browser stores the cookie, organizing it based on the website’s
name, so the website can use it again later.
PAGE 4
Application of Cookies
PAGE 5
Hyper Text Transfer Protocol (HTTP)
The Hypertext Transfer Protocol (HTTP) is a Application layer protocol
used mainly to access data on the World Wide Web.
HTTP uses the services of TCP on well-known port 80.
HTTP Transaction
HTTP Transaction Figure 5.5 illustrates the HTTP transaction between the
client and server. The client initializes the transaction by sending a request
message. The server replies by sending a response.
PAGE 6
Headers
General Header
Request Header
Entity Header
General Header
The general header gives general information about the message and can be
present in both a request and a response.
E.g.
Request Header
E.g.
Entity Header
The entity header gives information about the body of the document.
E.g.
PAGE 7
HTTP Response Message
Status Line
The status-Line begins with a protocol version, then status code and status phrase.
Headers
General Header
Response Header
Entity Header
General Header
The general header gives general information about the message and can be
present in both a request and a response.
E.g.
Response Header
E.g.
PAGE 8
Entity Header
The entity header gives information about the body of the document.
E.g.
PAGE 9
Communication over FTP Control Connection
It uses the 7-bit ASCII character set (see Figure).
Communication is achieved through commands and responses.
Each command or response is only one short line, so we need not worry about
file format or file structure.
PAGE 10
FTP Commands
get [filename]: Downloads a file from the FTP server to your local
directory.
mget [file1 file2 ...]: Downloads multiple files from the server.
put [filename]: Uploads a file from your local machine to the FTP server.
mput [file1 file2 ...]: Uploads multiple files to the FTP server.
PAGE 11
Electronic Mail
Email Architecture
To explain the architecture of e-mail, we give four scenarios.
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).
PAGE 12
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).
1. Sender runs a UA program to prepare the message and send it to its own
mail server(step 1,2); message is stored in pool at sender’s mail
server(step 3). (Communication between MTA Client at Senders PC and
MTA server at senders mail server)
PAGE 13
2. Sender mail server now sent the message to receivers mail server. (step
4,5).(Communication between MTA Client at Senders mail server and
MTA server at receivers mail server).
3. MTA server at Receivers mail server stores messages in to mail boxes
(step 6).
4. When receiver PC request for any message from mail box, it act as a
MAA client to request message and receivers mail server as a MAA
server to serve that message to receivers PC (MAA client).
NOTE:
Kindly explain only fourth scenario for question asking for ‘Email
Architecture’.
Email Components
o User Agent
o Mail Transfer Agent
o Mail Access Agent
PAGE 14
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 Simple Mail Transfer Protocol (SMTP).
SMTP Working
Connection establishment
Message data transfer
Connection Termination
PAGE 15
Fig. 5.13 SMTP working
SMTP Commands
Initiates the conversation with the SMTP server. EHLO is the extended
version and is preferred for modern servers.
MAIL FROM:<[email protected]>:
RCPT TO:<[email protected]>:
Specifies the recipient's email address. You can issue multiple RCPT TO
commands if there are multiple recipients.
PAGE 16
Example: RCPT TO:[email protected]
DATA:
Signals the server that message content is about to be sent. After issuing
this command, you type the message body and end with a single period . on
a line by itself.
QUIT:
POP3 working
Connection Establishment
Retrieving Emails
Ending the Session
PAGE 17
Internet Message Access Protocol (IMAP)
IMAP is a protocol used for retrieving emails from a mail server to a local client,
such as a computer or mobile device.
It allows users to access and manage their emails directly on the server, making it
particularly useful for accessing email from multiple devices.
It uses TCP for reliable communication, typically over port 143 for unencrypted
communication and port 993 for IMAPS (IMAP over SSL/TLS).
PAGE 18
Difference between SMTP and POP3
MIME is a standard protocol that support SMTP to transfer Non ASCII data.
MIME extends the basic SMTP (Simple Mail Transfer Protocol) used for email by adding
headers to indicate the nature of the content within the email. These headers help the
receiving email client understand how to process and display the message.
PAGE 19
MIME Header
MIME-Version:
Indicates the version of MIME being used. Typically, this is MIME-Version: 1.0.
Content-Type:
Single-Part Message: If an email contains only one type of content (e.g., just
plain text), it can have a single part with a Content-Type header.
Content-Transfer-Encoding:
Specifies how the content is encoded for transmission. Common methods include
base64 and quoted-printable, which ensure that binary data can be safely
transmitted over text-based email systems.
Content-Description:
PAGE 20
MIME Content Transfer Encoding
Base64
It divides the input data into groups of 3 bytes (24 bits) and splits them into 4 groups
of 6 bits each.
Decimal value of each 6-bit group is then mapped to a character from a Base64 table.
PAGE 21
Quoted Printable
It keeps 7bit ASCII characters (like A-Z, a-z, 0-9, and common punctuation) as
they are.
Non-ASCII characters (characters with byte values greater than 127) are
converted to the = sign followed by two hex digits, as shown in diagram.
PAGE 22
Question:
Answer:
Email security over a non-secure channel involves protecting email content and data
when it is transmitted over networks that don't inherently provide encryption or
confidentiality.
Since email protocols like SMTP (Simple Mail Transfer Protocol) do not encrypt data
by default, several methods and tools are used to secure email communications, even
when sent over non-secure channels.
PAGE 23
Fig. 5.19 PGP Working (Email Security)
PAGE 24
TELNET
TELNET is an abbreviation for TErminaL NETwork. It is the standard TCP/IP
protocol for virtual terminal service, which runs at port no 23.
TELNET enables the establishment of a connection to a remote system in such a
way that the local terminal appears to be a terminal at the remote system.
There are two parties involved TELNET Client and TELNET server.
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, which is
understandable by OS of remote machine.
PAGE 25
Fig. 5.21 SSH Components
DHCP Server
DHCP Client
DISCOVER
OFFER
REQUEST
ACK
Message Detail
Discover This is message sent by DHCP client to discover a DHCP server.
Sent by DHCP server to lease unique IP address and other parameters
Offer
needed to client.
Sent by DHCP client asking server to lease parameters listed in Offer
Request
message.
Sent by DHCP server to assign IP address, mask, default router & DNS
Acknowledgement server address to client.
PAGE 26
Simple Network Management Protocol (SNMP)
The Simple Network Management Protocol (SNMP) is a framework for managing
devices in an internet using the TCP-IP protocol suite.
SNMP uses the concept of manager and agent. That is, a manager, usually a host,
controls and monitors a set of agents, usually routers.
Management Components
PAGE 27