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

Redes y Servicios:

Lecture -9 Client Server Concepts


DNS,Telnet,Ftp
in this lecture I would like to applications today now as the
touch name
upon a very important concept implies there is the notion of a
which is client
used widely in the internet there is the notion of a server the
nowadays you basic idea is that a server is a
must have heard about the term program
client-server concept client- or which is sometimes call a
server process a
programming in fact most of program in execution is called a
the internet process
applications that we see today a server is a process which is
that we continuously running and it wants
use today they are based on to
this kind of offer some services to clients a
client-server programming so client
first I try in contrast is another process
to explain what this client- which is
server requesting the service from a
programming concept is all server
about then we well a simple example the server
shall be specifically looking at can may
some of simply return with the date and
the applications of the internet time the
so current date and current time the
client-server concepts and client
some of the can ask the server what is the date
applications are the topic of and
our time please tell me the server can
discussion today so first see return back with the date and time
what the this
client-server model is all about can be a very simple example
this is when
a standard model for general a server can provide any
developing Network kind of
service and a client is are different ways of handling this
somebody who is requests in case there are
asking for that service ok this simultaneous
is the requests coming ok typical
difference between client and scenario as I
server and have mentioned that the server
in general since we are talking should be
about a the first process to start in the
networking environment the typical scenario first the server
server and process process must start on
the client may not be running some
on the system the server process must
same machine they may be on initialize itself and then it goes to
different sleep waiting for a client request
computers all together see
typically server is the program sleep is a terminology which is
which used in
starts first and server waits for operating system it means that it
requests from clients so as and basically goes to the waiting state
when the it
requests come from client the is not executing anything right
server now but
will service them and will it is waiting for a request from a
again go back client if that event occur that
and wait for some more means a
requests from the request from a client comes then
clients ok so pictorially this the
looks server program will wake up and
like this there can be one server it will
there start executing so if you if you
can be several clients which remember to recall the the typical
can need state
the service and we shall see transition diagram her process that
later there we
ready running blocked then server will be servicing the
possibly the requests it
server process will be in the will be sending back the response
block and
state it will be waiting for a this will go on okay now typically
request the
from the client to come in roles of the client and server
order to move processes
into ready okay then a client are a symmetric say a symmetric
process in terms
will start well it can be in the of the roles as well as when you
same write
system it can be on some other the actual client and server
system programs
and it can send a request to the this programs you may be writing
server in a
so the server will obviously language like C or C++ or maybe
process the in Java
request so when the server has or any language you will find that
finished when
providing the service the server you write the client program the
can go way you
back to sleep waiting for the write the server program there are
next some
client request and this process places where they differ that is
will why
repeat indefinitely as long as they are called asymmetric they
you do are not
not explicitly shut down the symmetrical if the client and
server server
this is a very simple scenario program looked exactly the same
server is then
waiting clients are sending they would have said to be
requests the symmetrical
but they are asymmetric now in all times and the server will
in terms process
of the of the exact way the one client request at a time the the
requests are server will handle each request
processed by the server servers itself
can be since it is a single copy then only
categorized as either iterative one
or request can be handled at a time
concurrent let us see what so if
these two there are five clients which are
mean a server is set to iterative sending
when requests at the same time the first
first thing is that the server one
process that the server receives will be
knows in advance how long it handle
takes to first the other four will have to
handle its request typically this wait
kind as soon as the server is finished
of server are used only when with
the service the first is ready with the next the
time is fairly small next requesting queue will come
if the request service time can and the
be others will have wait so in this it
fairly long this is not a good will
solution go on so one request is being
if this is not a good alternative serviced
typically isolative servers are or process at a time and all other
used in clients which have also sent
cases where the service times requests
for the will be waiting this is how it
client requests are fairly small works so
in time the client may have to wait if the
so single copy of the server server is busy processing other
will run at requests
now in contrast concurrent is servicing immediately so this is
servers work a
in a different way they are long-term connection or you can
typically say
used when the amount of work request processing scenario here
required to you
handle a request is unknown so cannot handle the requests in
you iterative
really do not know how long way but here what is done is that
the client whenever a client request comes
process will engage the server the
in server starts another process to
providing the result of the handle
request some each request which means that a
requests may take much longer copy of
time say I the server caters to a client's
am giving a simple example request
you can you in a dedicated fashion as many
can think of of an application copies of
like a server as there are client requests
railway reservation system see if there are see here the
suppose scenario
whenever an operator turns on is like this there originally there is
the system one server which is waiting for
and connects to the server say client
after request say client a sends a
three hours he shuts down the request so
connection what the server will do server will
maybe for this entire three- make
hour the a copy of itself and will and will
client remains connected to the allocate that copy to cater to the
server request of client a in a dedicated
and whatever request is going fashion and the server itself will
the server go
back and wait for another call called fork that is a system
request now a call
request from client becomes now suppose you are writing a
the server program in
again makes a copy of itself C if there is a function called fork
and asks in
that copy to the service request the C program so whenever that is
from B executed there is another copy of
and so on so in this way the the
thing will process that gets created
go on if there are ten requests so effectively concurrent servers
coming uses
simultaneously there will be this fourth kind of calls to create
ten copies multiple copies of itself okay
of the server now this may now whatever it said is the basic
seem to be a concept behind client and server
little complex that means how now how
these it actually works well the client-
copies are created but if you server
know the communication can use either
some of the details about TCP or UDP
process depending on your requirement
management in an operating now if it
system you is TCP then before start of
will know that almost in all communication a connection has
operating to be
systems there are some established but if it is UDP of
functions which course
you can use to create new you do not need see when we talk
processes like about a
for example if you are using connection we must first
the UNIX or understand what
the Linux system there is a do we mean by a connection see
function suppose
there are two computers on two coming from so you can have this
side one source
out here one out here this is port number and destination port
your number
source this is your destination also so when you have all these
and you five
want to establish a connection components known to you you
between know exactly
SNT well this can be a two- what is going on you know
way exactly what
communication in general now protocol is being used you know
there are a exactly
few things you need to know which program out here is talking
about this to
communication like which which program out here okay now
protocol are you can
you using are using TCP are say that a connection has exactly
using UDP or been
something else some new established actually been
protocol what is established
the IP address of the source between these two programs right
what is the so this
IP address of the destination five components will constitute a
and also connection
as I mentioned that in both the now typically when you develop a
source network
and destination sides there can application it is always advisable
be to
multiple programs which are use some standard and well
running so accepted
the port number specifies protocols because if you follow
exactly which some
program the packet is destined standard you will often get
to or is support from
the software tools that we use in
developing the software now establish a connection between a
here I am client
showing a very typical scenario and a server you can actually send
say say a
if whenever one wants to packet you can receive a packet
develop an you can
internet application usually at do whatever you want so you
the data have to
link layer level you have the understand what these functions
Ethernet are and
protocol in most of the lands how to use them once you know
we see in that you
the network layer it has to be can very easily write such an
IP at the application now the basic concept
transport layer it can be TCP behind
and when the Berkeley socket which is part
you are developing the of the
application if so-called Berkeley socket
you are using TCP and IP then distribution
there are BST or Berkeley standard
some standard application distribution is
programming called the socket socket is the
interfaces or epi s which are basic
available concept behind inter process
one very popular api is called communication over the network
the between
so-called Berkeley socket client and the server basically the
interface now concept of socket allows one
if you are using Berkeley process to
socket communicate with another now
interface you will be you will this one
be having process can be the client the other
access to some functions which process can be the server they
if you may be on
call using that you can actually the same machine they can be on
different machines now an association and technically
analogy is speaking
like the telephone line you can socket is defined as a so-called
establish a connection over the half
telephone Association like you have the two
to allow one person to talk to sides
another one is the source other is the
similarly socket is an analogy destination now if we have
to the complete
telephone connection using information about one of the sides
socket you that
can establish the connection is called a socket like either if you
then client have the protocol local IP address
can send something the server the
will local port number that is also a
receive this server can send socket
back on one side on the side of the
something the client would source if
receive in we have protocol remote IP
this way a two-way address
communication can remote port number then you have
start now from the socket point the
of view socket on the size of the
there is a term called full destination so
association the source opens the socket the
which refers to that same five destination opens the socket then
table I there
refer to earlier protocol local IP are some functions using which
address local port number they
remote IP communicate and establish a full
address remote port number all association among the sockets this
these is
five things taken together is how it actually works but but in
called an order
to actually understand how it things was to give you a rough
works idea
we'll have to look into this about what this client-server
functions concept is
in depth and we'll actually all about and I told you all the
study how Internet application that you see
this client-server programming they
can be are all based on the on the
done but I am NOT going to client-server concept now I would
the details start
of the coding and the details of with the one of the most important
the applications which well in itself is
function because these are not
slightly out an independent application but is
of the scope of the present used
lecture but by many other practical
if you are interested you can applications
certainly that is the so called domain name
look into the details of the system
Berkeley or DNS this you may have heard
socket interface what kind of this is a
functions very important service which is
are available and how you can provided
utilize in the Internet in lands in different
those functions to write client areas basically the domain name
and system
server programs both is a global database system for
in the in the connection- Internet
oriented that addressing mail other info it say
means using TCP or in the here
connection this need not be restricted to
list which means the UDP internet
environments email it can refer to world wide
okay so my purpose of telling web
all these
telnet FTP any kind of easier to memorize but I also
application you know that
use today you typically use a the IP address of this CSE
name you machine is
do not always use an address 144 dot 16 dot 192 dot 57 of
the purpose course you
of the DNS essentially is to cannot remember many such
convert addresses with
from a name into an address numbers you may tend to forget
okay so this but using
is how it works now the names is much more easier
advantage of because it is
using DNS is that see the using more English like more easy to
names memorize
rather than addresses is much ok now in the domain name
easier system there
easier to use easier to is a concept of domains and
memorize like subdomains
for example I am giving you actually domain refers to a set of
one computers which are related in
practical you can example say some way
the mail there are some computers which
server of the computer science are
and related either by their location
engineering department of IIT location means I am talking about
Kharagpur geographical location they may be
that can be referred to by a I can
name CS e say all computers in India all
the full name is CA C dot IIT computers
kgp dot e in IIT Kharagpur these are some
are net examples
in well you are familiar with these are some categorization of
names of subdomains based on their
this type now this kind of a location and I
name is
can also specify these will be one single server available
computers based in
on the way they are used or one place where you can get all
their the information rather this has to
function like I can say that will be
all some kind of a distributed you can
computers which are in the say
educational database where information is
institutions all computers spread
which refer across a number of different
to commercial organizations computers
these are so just using some systematic
example of distinction from the algorithm
functional point of view ok so these computers can interact
as I have among
mentioned that DNS servers themselves to to get means
basically whatever you
translate domain names to IP can say result you want to get
addresses given a
this is the basic task and this DNS and name say name you can
thing is get an IP
done in a distributed system address by systematic querying of
because of these
the simple reason because one multiple server in a particular
server in order we
one place cannot have shall see how these orders would
information about be
all the domain names in the shortly but before that let us talk
whole world about something called top-level
there are millions and millions domains
of such well this you may be aware that
domain names and the the
corresponding addresses you write for example
addresses you cannot expect yahoo.com com say something
that there dot gov
something that is stanford.edu is a code for each and every
in in refers to India say yaar country
net dot this I n stands for India okay
in C these are called pop level this NZ stands for New Zealand
domain TW which stands for thigh one
when you write an address like and so on
for now the domain name structure is
example when I write say a
www.yahoo.com hierarchy I am giving an example
the last part that I write that is so I
called the top-level domain talked about the address of our
now mail
top-level domain can be can be server in the computer science and
one of engineering department so the
many I have only shown a few address
out of them has four different parts CACI
some of these are based on 80kg p
functional unknit in well if you look from the
classification comm means other side from the side of in this
commercial or in
commercial organization org is a sub domain this in refers to all
means non computers in India this year net is
profit net means network a
service sub class inside India now within
provider gov gov traditionally India
it stands there can be other sub classes or
for US government mill so
military a do there can be ni si there can be
educational now in addition to VSNL
this there can be others also okay so
there are two later domains for your
each and net is a sub domain that is inside
every country of the world India
for example PK stands for again inside your net you have iit
Pakistan there kgp
so within a net you have iit kgp CSE I have specified in our net iit
iit kgp
bombay you can have other and then CAC so these are
salts as well examples of
I have not shown all I have domains and subdomains okay so
shown only as I have
two then inside iit kgp you can mentioned that domain
have distribution is or
computer science engineering domain name management is not
electronics in one
communication engineering place it is distributed for example
and mechanical iit
engineering kgp domain name server can only
then within iit bombay you can keep
again information about the
have computer science names that are under iit KGB like
engineering math ccc
and so on so you can see that make and so on domain name
when you system of our
give a domain name this is an net can only keep track of all the
example of institutions that are under our net
a so-called fully qualified like
domain name iit kgp iit bombay iit delhi and
fully qualified means starting other
from the institutions
top-level domain similarly domain name india can
I am specifying the entire path they can
of the keep track of all those ISPs that
subdomains that you should are
Traverse to inside india like our net n IC
to arrive at the particular place VSNL and
that so on so in the each of these tables
you want to come okay I want you
to refer to have only those entries that are
immediately under it there is a big
domain there are smaller sub 2 lakhs in 1995 it is about 2.4
domains million
under it and each of these sub similarly a duet equation
domains institutions
again they will be having from 250 thousand it has gone to
smaller sub about
domains under them so each of 1.7 million so you can just
this imagine in
domain will contain the the rate in which the number
information only of
about the sub domains that are computers are growing okay
immediately under it this is so the number of such domain sub
how the domain
domain name server and these names are growing okay
information is now DNA
distributed so effectively DNA server converts an IP address
server converts a
will store the domain name and domain name into an IP address
the IP now let
address they will store us see how this is actually done
information only and how
about the computers that are these domain name servers are
immediately called or
under them okay just to have a where they are kept
quick now the most common domain
look of statistics this is only up name server
to is Berkeley internet name domain
the year 1995 you can just in
imagine how short it is called bind be IND for
it has grown since these are the instance if you are using a UNIX
figures or a
in thousands the number of Linux system you will find that
computers in there is
the dot-com domain in 1991 it a process whose name is name D
was about the
berkeley internet name domain happen it will ask you to type in
server the
runs as a process called name d domain name well it has to be the
this is fully
the actual name server process qualified domain name starting
for an from the
application it can be telnet FTP top level and this nslookup will be
web actually contacting the name
mail anything when it wants to server and
get some it will get translated into the IP
information from the server it address and the IP address will be
can returned back to you so either in
invoke the so called DNS name the in
resolver the UNIX or Linux scenario or or
see the bind program is already in the
running Windows environment wherever
that is the server program the if you give
client a command nslookup say say if
program is separate the client you are
program using the Windows environment
we'll be using will be used to you can
send a give it from that run prompt or
request to the server program through
so there a command prompt then you will
is one popular client program find that
this is it will be asking you to type a
called nslookup so if you run domain
nslookup name you type a domain name
on any system it can be a www.yahoo.com return you will
Windows system find that
it can be a Linux system after some time it will return you
whatever so the back
if you run this nslookup then with the IP address of that
what will yahoo.com
okay this is how it works but as secondary name server so if the
I've primary
mentioned that the name server is not accessible you can contact
that is the
running it cannot have have all secondary name server but the
the point to
information well and in general note is that well whether you is
it will whether
not have the information you contact the primary or
locally in that secondary
case every name server has a that is not important important
connection thing is
with a so called primary name that information is not available in
server one
which means if we have a place you have to look into other
name server out places
here this is your name server if if you do not have the information
it does for
not have an information then it example in your primary name
will server I am
contact a primary name server giving an example in our Institute
now you there
can configure that which will is one primary name server
be the available so
primary name server for your in all our computers I have we
case okay have a
and in case the primary name set means I also set it in my
server is computer
not available you can also set the primary name server to be
specify some that
secondary name server okay particular machine so whenever
some other we type
name server also you can in some name some domain name
specify that
domain name gets transferred name server say the top you have
to that a
primary name server with a virtual root level name server say
request for I
the IP address if it is available have taken some examples I have
in taken to
this local table it immediately education institution Stanford and
sends Georgia Tech and to commercial
back otherwise it sends back to sites
its rediff and Yahoo Stanford and
primary name server because if gay Tech
you look will be connected to a name
at that primary name server server under
that is also a do they will be connected with a
not knowing everything so name
with respect server under comm if you have
to that particular machine there Indian
will be companies there will be under the
some other primary name India
server who it I n name server if you have
will ask if it does not have the Australian
information there okay so companies they will be having
everyone under a u
really having a so on so this is how name servers
link to some other name server are
till you organized this route will contain
reach the absolute top level information about all the top-level
name server domains this a du will contain
from there it can again come information about all the
down so I universities
will give a small example this under this I do this Kong will
diagram contain
gives you the so called all the dot-com companies okay
hierarchy of this is
how the domain name will tell well yes I know what
information are calm is
distributed now let us see how calm is somewhere here so it will
this name follow
resolution takes place well here that request to the calm name
let us server
take an example suppose here finally calm name server will
we have a know well
client and we want to get the IP yes I know yahoo.com yahoo.com
address is here
of yahoo.com say and the so from here you can get back the
client is a actual
machine which is connected to IP address once the IP address is
the obtained this is the so-called
stanford.edu site so the client recursive
will name resolution the response that
first send a request to the means
stanford.edu the actual IP address which you
name server this stanford.edu have
name found out this will be following
server will find that the the
information is exact reverse path with respect to
not available with stanford.edu the
so it original request so you see that so
will be sending it sending the many
request message exchanges are required
up to the a do name server well to get
you will back the IP address of the of the
also find that while yahoo.com name
is not an that you had requested for this is
in my table so this I do the
server will also send it one requested name resolution process
level up to and
the root name server so root here say with respect to the client
name server if
you send out one request client the client first sends a
exactly one request
response is being sent back so to the say stanford.edu
just if I nameserver stanford.edu
am the client if I if I were nameserver will
client be sending Mike a response
means I am on a computer I am saying that
typing and well I do not have the information
typing some name say W of W but
yahoo.com so you can contact a do so it will
from my computer exactly one send
request back another request to the ado
will go out and exactly one name
response server the ed unum server will be
will come back so beyond that sending back another request
what is saying that
happening that I am unable to well I do not have root maybe
see that I having so
am not seeing so but but if it is it will be sending another request
recursive name resolution then to
there are the root so in this way the client
lot of message transmissions has
that are the responsibility of sending the
going on from one name server requests getting the response
to other sending
in order to resolve the name the next requests and so on so the
okay there responses that the client is getting
is another alternative it is back in this case will contain
called which
iterative I Titov says that the name server I can contact next or
client in the
will sequentially send code is final case I have got the IP
to DNS address
server like for example this finally so this iterative name
was the server is
easier to implement that is why of the protocols we would be
most discussing
most of the systems they as part of in today's lecture the
implement this first
I to ative name server process one is the so-called telnet protocol
so the telnet is one of the oldest
client will sequentially send protocols
requests that have been used even before
so the response is negative it is the
not internet took its shape this telnet
found then the corresponding command or the telnet facility was
DNS server available subsequently telnet has
will be sending back that become
which server an internet standard the idea of
to query next okay so unlike telnet
recursive is that it allows a person sitting on
name server where only one one computer to work on another
response is computer
being sent back to the client like for example I am sitting on
here you can have multiple this
requests computer II and I want to start
going out and multiple using
responses coming computer B over the network
in to the client okay what I do I
now this name resolution or give a command from a the
this DNS command looks
protocol is central to any like this telnet followed by the
internet address
application okay now now we of the computer in which I want to
now talk work
about some of the internet well here I can either specify the
applications name
which may be using DNS for or if I remember the IP address I
their use two can
also specify the IP address now anything if I run a command
once I command is
do a telnet from A to B well not running on my computer
obviously I rather the
am trying to start a remote command is running on the
session and computer B but
usually there is some what is happening whatever is the
authentication output
where where I am if I am of that command somehow that
sitting at a I output is
will have to supply a valid coming on my screen so as if I am
logging having
login name and password an illusion that I am actually
corresponding to sitting
machine B to gain entry so on the computer B okay this is a
sitting on very
machine a I give a telnet B and useful facility particularly in a
on the networked environment where
screen I find some username you do not
password have everything on your computer
coming I type in those things I something may be available on
gain some other
entry into machine B now computer you can do a telnet and
whatever I see use it
is this screen corresponding to okay
Machine fine so some typical applications
B if I give a directory listing I telnet
can can be used to use software which
see the files which are there on is
machine only available on a central server
B if I run up from if I say for for
example example another application
run a command like C suppose you
compiler or have a printer attached to one
computer
so you want to take some this change only in one place okay
printout so you so
can do a log you can do a telnet talent is a very useful command
to that now by
remote machine remote host default the telnet server runs on
and then you port
can give a print command so a number 23 which means
typical whenever you give
scenario in a laboratory a command like telnet something
environment is telnet
that many users who are say SM is a machine name XYZ
typically then a TCP
students do a telnet to a remote connection is established with the
server machine TCP for the the Machine
and work their server is XYZ over
actually a port number 23 23 is a standard
bigger and faster computer for
now the telnet which is the default port
advantage of this is that that number
instead which is used but in fact this
of loading the software all the telnet
students command can be used to specify
are wanting to use on all their any other
computers you are loading port number as well how like this
them in only I can
one central place it also do a telnet to any machine by
simplifies a specifying
lot the maintenance of the the name but at the end as an
software that optional
means the how they are using parameter I can also specify the
what they port
are using and if you want to number
change the now you will learn later that this
softer to a newer version you port
need to do
number 25 is actually the port taken from a Linux system this
number was the
which is used by the mail original Linux prompt sunny this
servers so is the
when I do a telnet to them to command which was given telnet
this CSE see
machine over port number 25 once this telnet CSU has given
what I am CSE was a
trying to do is that I am name so automatically the domain
actually name
trying to contact the mail system ask was contacted and the
server name
directly okay there are many CSE was translated into the
cases are corresponding IP address but as a
many application where you user I
may want to do not see that happening it is
do this well we shall be talking happening in the background
about automatically so even if I have
this in more detail when you given
talk about telnet CSE I am seeing that some
the mail emails in electronic IP
mail address is coming trying to
system later they will see that contact one
we can for two for sixteen 192 57 this is
actually do a telnet to connect the
to a IP address of the CSE so finally
mail server and you can after
actually send connection is done some message
and receive mails through that is
facility coming connected to CSE this is
okay just to show you a sample the
telnet message Connect which is coming
session this is an example from the
which I have telnet server on the CC side some
other
message is coming ignore these how we can use telnet to connect
things to a
some Linux version exotics new or remote machine okay now
that are we talk
coming then a prompt is about another protocol called FTP
coming asking me see
to supply the login name so I using telnet we are able to log on
supply the to
login name here a prompt is another system and use some
coming to facility out
supply the password well I there but what we cannot do in
supply the telnet is
password here but this is not that we cannot physically transfer
visible because passwords are a
normally file from one machine to another
not visible on the screen so if we
my cannot bring a file from that
username and password are machine to
correct some my machine or I cannot send a file
welcome messages come from
lightly like here my machine to that machine for
last login this line X this you that
have new purpose in you to use a protocol
mail and this is the prompt called
which is the FTP or File Transfer Protocol so
prompt of the CSE machine so let us
now I can see what FTP is now FTP allows a
give some commands where person
the responses to transfer file as I said between
will be coming from the CSE two
machine and machines just exactly like telnet to
not from this sunny machine so provide authentication you need
this is to
just a simple example I have supply login name and password
shown that because
if this was not so then anybody number of information useful files
can which
transfer any file across any many people may want but how
machines many people
that is not what you always have access to my machine they
want there do not
has to be some security also have a valid username and
some files password many
you do not want anyone to of them in fact
access only so this anonymous FTP is a
persons who are having a valid mechanism
account using which anyone who is sitting
login name password can only anywhere in the world can come
access so to my
this kind of login name and machine and take some files from
password me okay
authentication has to be there here the idea is very simple
and the whenever
command is very simple very the system asks for the login name
very similar you
to telnet FTP name or FTP IP type this string anonymous
address instead of a
okay now anonymous FTP is a valid login name and when it asks
variation of for
FTP which had become very the password you type your email
popular in the address
early days of the internet now then whenever you type the login
see the name as
conventional FTP requires a anonymous and your password as
user to your
supply a username and a email address then you get logged
password but in as
suppose on my machine I have an anonymous user in that FTP
kept a server
there may be a lot there may be server on which the FTP server is
a whole work
lot of files available for the working okay
anonymous now in fact FTP uses two port
user for downloading so now numbers
you can you port number 21 is standard and
can have a look at the files you this is
can 22 can be anything in fact this can
list it you can get the files that be
you anything but port number 21 is
need must okay
in fact this anonymous FTP is there are two connections which
in the are
early days of the internet was established one is called the
one control
reason that Internet becomes so connection through the control
popular connect
there are many good peoples control connection is established
who wanted over
to share information they kept port number 21
a lot of so the FTP connection gets
information on their servers established
and using after the control connection
that they they allowed other whenever
peoples to you want to transfer a data so a
share so the huge amount of data
resources connection will be established
were available in anonymous every time you transfer a data and
FTP sites that
now the FTP process model data connection can be opened
looks like over any
this suppose this is a client port number here as an example I
which have
gives the FTP command and shown 22 but it can be thousand
this is the two
thousand three thousand connection okay and some typical
anything but FTP
this port number 21 is standard come under the many commands I
so that have
is that if you do a telnet and if I shown only a few put or input put
want means
to transfer five files there will send one file import means
be multiple put
five data connections opened get or M gate receive a file or
and closed multiple
one after the other for every file hash if before put an input you
single give the hash command you can
file transfer a data connection see the
lu progress of the file transfer some
opened and after the transfer is symbols are getting displayed one
complete it will again be after
closed okay so the other
this is what I said two now each symbol typically
connections display
established one is the control display shows either four
connection over port 21 and kilobytes or
control eight kilo
connection remains all of data transfer so you can see the
throughout a hashes coming one after the other
session until or unless you log you
out of can see that well my file transfer
that FTP and the other port is is
number is a is in progress okay
temporary port number used prompt it prompts a user before
for every they
file being transferred as I said transfer whether you really want
for to
every file transfer you establish transfer yes/no like that it asks
new you
whether the file you want to 331 anything which ends with 1
transfer is this
a binary file or a text file means is an intermediate
ASCII file completion
exit means it terminates exists reply so this user name/password
the FTP thing
server well some summers is not yet complete it is halfway
example session through so once this
let us say suppose here again authentication is
we are done it responds it to 30 it ends it
sitting on a machine called zero means it is the end of one
sunny from step so
that I want to do an FTP into now you see a prompt FTP comes
another now can
machine whose name is AC give the FTP commands like one
AC Indigo so small
connected to CS Indigo the example I am giving if I give a dir
connection command it mean directory so I
over the control connection is can see a
established C is CC some list of all the files which are there
response codes in
are coming say 220 summer the other computer ok so I can say
say 331 230 list
these are some intermediate of all the files their sizes how big
response they are and so on so if I choose
codes followed by the actual to
response C transfer any one of these files I
when I when this connection is can
done then give a command say I want to
this 220 means that the transfer
connection is this file and see if we get this file
successful then it asks for the name
user so it opens a new connection it
name then it asks for the also
password this tells you that 671 bytes received
transfer complete then I can supporting real-time traffic
terminate because
the connection by the squid they are based on Datagram they
so connection gets terminated do not
okay so guarantee that packets will follow
this shows the sample FTP the
session how same path ok so there will be
you can use it so this brings me unequal
to the delays in the packet and may also
end of the todays lecture before they
before can also be out of order delivery
ending today let me have a for
quick look at which real-time response is not
the solutions to the quiz possible
questions of how are the headers in an ipv6
last lecture first question was packet
what are kept track off so all extension
the four types of BGP headers
messages they are after the base header are chained
open update keep 11 in a
notification how is linked list this ID mentioned how
the BGP connection between does
two routers ipv6 a team to support real-time
maintained as I mentioned by traffic
periodically exchanging ipv6 allows a pair of stations to
keepalive establish a path before sending
messages what are the main packets
functional so this is an option you have in
procedures in BGP neighbor ipv6 to
acquisition support real-time traffic what does
Network acquisition Network the
reach payload length signify they
ability why is ipv4 not suitable specify the
for length of the extension headers
and the
transport level protocol data to send ipv6 over ipv4 the entire
unit in an ipv6
ipv6 packet what does the next packet is encapsulated as payload
header and
field mean the type of ipv4 ipv4 header will be added to
information that it so
immediately follows the now some questions from today's
correct header lecture
the current header so there can what is an idea tip server what is a
be concurrent server which of client
multiple headers or the PDU so or
the next server must start first what are the
error will contain what is components of a socket what is a
following the domain
present header in ipv6 how are what an MD and nslookup how
the does
fragments kept recursive name resolution works
off in case the packet is how can
fragmented you connect to a server XYZ
first thing is that base header is comm over
copied into all the fragments port number one two three four
and if why does FTP use more than one
there is a fragment header in port
one packet numbers for communication what
it means that it is fragmented are the
so there functions of the hash and bin
has to be a fragment header in commands
all the in FTP so with that we come to
fragments what is any caste the end
addressing of today's lecture thank
packet will deliver to exactly [Applause]
one of a [Music]
set of computers how can use
tunneling
[Music]
[Music]
Lecture -10 Electronic Mail
[Music] in practice for instance for sending
you mails we use a protocol called
you Simple
[Music] Mail Transfer Protocol or SMTP
continuing with our discussion in
on conjunction with it we use another
internet applications today we protocol called multi-purpose
would be internet
talking about perhaps the most mail extension or mine on the
widely other hand
used application that people when you are receiving mails on
use our
nowadays over the Internet computers there are two other
namely protocols
electronic mail so our topic of which are used in fact one of these
discussion today is electronic two
mail now one is post office protocol version
you know everybody knows 3 or
that electronic is it is also known as pop through
mail is perhaps the most in
widely used short or Internet mail access
application on the Internet well protocol
anybody or IMAP now let us start our
who has a connection or discussion
connectivity to on Simple Mail Transfer Protocol
the Internet invariably uses in fact
electronic this SMTP forms the basis for all
mail or email which is more electronic mail transaction that
popularly takes
called in some form or the place on the net on the Internet
other now now this SMTP is the basic
talking about email there are a protocol used
number to send mail from one machine to
of underlying protocols which the
are used other ok so let us try to understand
what this SMTP protocol is information which is written on
what are its the
capabilities and limitations and envelope of the mail just like
how it when we
works ok the first thing is that send a letter to a destination we
you can put
get all the details about SMTP the letter inside an envelope and
in RFC on top
number 821 this is the of the envelope we write all the
corresponding RFC details
well SMT namely the address which will
is a simple protocol in the help the
sense that post office to deliver the letter at
it has the capability of the
transmitting correct destination so in the same
simple text messages only it way
cannot well inside the envelope you have
transmit anything other than the
simple text message header message header
well when you say simple text can
it means a contain the address of the recipient
simple 7-bit ascii file you and
cannot have some other information this we
any international characters shall see
which may later what other information are
require 8-bit ASCII encoding it required this the SMTP while it is
must transferring or transmitting mails
strictly be 7-bit ascii format but it
the does not look at the mail contents
most significant bit of the bytes or
will the message body as long as it is
be always 0 and in the SMTP in
protocol the simple text format it only looks at
mails are transferred based on the
message header that is only of the mail now once you have
important to created a
send the mail to the correct mail and has given a command to
destination send it
so effectively a mail message the messages get queued up and
looks like this
this there are two parts one is messages go to the input of an
the SMTP
message header other is the sender program sure illustrating
message body this is
basically when you are trying an example with the help of a
to send a diagram
mail the mail is created by a so now this SMTP sender program is
called actually
user agent program which responsible for sending the mails
which is also this SMTP sender program is run
sometimes called as a mail usually
client some as a server process which for
examples of user agent example in
programs are the UNIX environment is
Outlook Express Outlook or sometimes called
you can say a demon demon process some
Pi in Eudora examples of
this kind of mail because client some SMTP server processes are
or your send mail
hard user agents are ever or cumin both of these are widely
based on the platform you're used q
using you mail is slightly better than send
can use any one of these mail
platforms to because of some of its attractive
compose your mail whatever features now let us try to illustrate
you are the process with the help of this
trying to send you can type in diagram here we have the user
the body agent
where the mail is getting server program when it receives
composed but the
however this user agent may mails it will try to follow the mail
not be to the destination now it is
running the the SMTP server possible
program that it does not have a direct path
suppose this is the place where to
the the destination it may have to send
nearest SMTP server program the
is running mail through a number of
out here so this SMTP server intermediate
will be mail servers this may be necessary
acting as the SMTP sender or so
the mail for the purpose this mail server
sender the user agent after the program
mail out here this may send the mail to
gets composed will open a some
connection to intermediate SMTP server one or
the SMTP server on port more of
number 25 port them with a connection on port 25
number 25 is the port for established in each case and
SMTP server finally it
and as you can see several mail will be delivered to an SMTP
messages server
might get queued up in the user which has a connection with the
agent destination user mailbox directly
for being processed by the so
SMTP sender this SMTP server will receive the
program so each of these mail
queued up mails and you will find that well this this
will be containing a mail particular mail is destined to a
header mailbox
followed by a male body now on on my machine so the mail will
this SMTP get
deposited in the appropriate message text in fact contains the
mailbox header
this is how the overall thing and the body now in the header
works so there is
starting from the user agent an RFC 822 which defines the
you go to fields of
an SMTP server which acts as the header so if you look at 8:22
the SMTP you
sender to start with the SMTP can know all the details of the
sender header
will be sending the mail to fields so this header will contain
another SMTP message envelope containing
server which may simply some
followed it to information as we shall see in
another SMTP server and this some
process examples and also a list of
will go on till the mail receives recipients
the and it will also contain the
final SMTP server which acts message
as the body which of course will be
final destination or receiver composed by
which the user
accepts the mail and puts it in and in addition to the message text
the user each
mailbox this is how the overall queued message will also have a
SMTP list of
mail transmission phase works mail destinations this list can be
now in derived by the user agent or the
terms of the mail message smtp
contains each server from the header the idea is
message that gets queued up that
contains of although the mail destinations are
course the text of the message anyway present in the header of
the the
message but in order to process to that alias that alias expands to
it in all
order to followed it that same the email addresses that belong to
information is extracted from that
the mail group so this kind of expansion
header and also kept in a can also
separate place take place with respect to the
which can be accessed very SMTP
fast by the sender it takes messages from the
mail sender program ok so the queue
mail as a one at a time it tries to transmit it
whole is kept somewhere and to
only the the proper destination via an smtp
destination addresses are kept transaction it is a TCP connection
separately along with a pointer over
to the port number 25 and when all the
corresponding mail so that it destinations corresponding to a
can be mail has
processed relatively fast and been processed please note that a
this list particular mail message may have
of mail destination may more
sometimes than one destinations unlike a
require expansion of mailing postal
lists like mail okay an electronic mail can
you know sometimes we have have
the group more than one destinations so
mail facility we give an email when all
address the destinations have been
which actually is a mail alias processed
which meaning there by the copy of the
actually refers to a group of mail
email has been sent to all the
addresses so when a mail is destinations it
being sent is destined to the messages deleted
from
the queue well some given host may not be the same
optimization are user okay
carried out by the mail server multiple users then instead of
like if a sending
message is being sent to well this is not the same as in the
multiple users first case it was the same message
on the same host then they may going
then the to more than one user on the same
mail message will be sent only machine but here multiple
once messages going
to the destination host the to the same machine then to save
delivery to time a
the individual users will be single TCP connection can be
handled at opened and
the destination host so if the all the messages can be sent this
mail is actually overheads this actually
going to two different users on reduces
the same the overhead of creating and
machine hotmail.com say only terminating
a single the TCP connection over port
copy of the mail will go to number 25
hotmail.com you have to do it every time you're
with an information on the sending min so it reduces the
header that number of
this mail has to deliver to two time you are establishing the
of these connection
addresses so the final fine sending a mail there are a
destination say number
hotmail.com will do the rest of errors which are often
after encountered
receiving the body and like due to some problem a host
suddenly if there may be
are multiple messages are unreachable it can be a problem
ready for the with the
host it can be a problem with the final sender will find a final
the link mail
through which the host is server which of course it can keep
connected due in
to some reason the host may be the queue for certain period after
out of that
operation TCP connection may it will give up because if the
fail due to mainus
some error in the network the failed often a mail bounces with
destination address may be an
faulty like error message that will I have kept
the name of the user or the user it
ID may in my queue I am unable to have a
be wrong the target user connection or some problem now
address may the mail
have changed sometimes some will remain on an outgoing queue
of the mail for
servers allow redirection if the certain period of time that
user particular
address has changed period of time is configurable it
automatically the can be
mail will be redirected to an one hour it can be one day it can
alternate be
email address now if this seven days it can be even more
redirection is depending
not possible usually the user is on that time it the the SMTP
informed in the form of an server will
error message be keeping on trying to send the
and if this redirection feature is mail
there during that period and if it fails
then the sender can riku the within that period it will simply
mail well discard the mail after that okay
after the message comes back talking
from about the reliability of the SMTP
protocol well we have ensure that end-to-end transactions
mentioned that it are
uses TCP connection over port successful for example from your
number 25 machine
well we know that TCP is a to the nearest SMTP server that
connection-oriented protocol it transaction is successful but
tries to somehow
recover from errors supposedly beyond that something might have
TCP is happened which has caused the
reliable but in an application mail
like message to get lost so there is no
electronic mail which runs on effort made by the SMTP protocol
top of TCP to
there can be so many different recover from these lost messages
kind of similarly there is no end to end
errors like I have just acknowledgement from the final
mentioned some destination back to the sender that
hosts may be unreachable some is
users used in SMTP similarly error
email address may have been indication
redirected report is not guaranteed sometimes
to some other address and so you
on so under get back a message that that will
these conditions mail
so although TCP attempts to has bounced but even if you do not
provide get
reliable service there is no back a message there is no
guarantee guarantee
that the mail will be delivered that the mail has actually reached
correctly some messages may the
be lost destination we trust SMTP well
there is no guarantee to recover well if
lost you do not get an error message
messages see although TCP we
tries to
assume that the mail has queue to some other SMTP server
reached the through
destination but in practice it a process called mail forwarding
may not suppose
be so but now at the side of the I am an SMTP server I receive a
receiver well when you are message
talking about first I see if the destination
some TV receiver we are corresponds to a user on my
talking of the machine or
SMTP server at the final not if so I put it in the appropriate
destination mailbox if not I try to find out
which is finally connected to which
the user SMTP server I have to forward it
mailboxes these are the user next I
mailboxes simply followed it to the next
now this SMTP receiver will station
be accepting TP server this is how it works
the arriving messages and they so in doing so the receiver must
will be verify
placing the messages in the the local missed mail destination
appropriate of
user mailboxes if the Mail's are course because you have to verify
destined to a mailbox before
connected to the actually putting them in the
particular server but if it finds mailbox and
that it deals with some kind of errors
the destination address does like
not belong it can check whether the packet
to a particular user in the that has
mailbox of arrived
its own machine own server has any error or not there is a
then it checksum
copies the mail message to an computation or it can also check
outgoing whether
the user mailbox where you are email that the sender can specify
trying to the
put the mail whether it has a exact route well if it does not then
free space like routing each SMTP server
or not many mail servers allow will try
something to find out the best route when the
called a disk quota but the sender can also specify a route
maximum through
amount of space you can use which the mail messages will go
for storage the
of emails is limited and if that sequence of SMTP servers the
quota mail
gets exceeded or filled up no message will Traverse before
more new reaching
messages can be put in there the final destination mail server so
okay so again looking back at the same
that is also an error condition diagram I
and SMTP want to just make one comment
forwarding means you have an here if
SMTP server you look at the first SMTP server
out here it gets a mail as an in
input it this chain the SMTP server which
finds out it has to followed the receives mails directly from the
mail to user
some other SMTP server this is agent this works as a SMTP
a process receiver and
called forwarding now this sender boat it receives mails from
forwarding the
may need to go through a user agent over port number 25 it
number of follows some of the Mail's again
intermediate mail servers in over
general now port number 25 to some other
it is possible in electronic mail SMTP server
in so what I mean to say is that the
the
intermediate SMTP server server the server sends back a
there are dual response
functionality they act as server to the client now let us see what
when this
they're receiving mails command and response messages
somebody else they also act as look like
a what they actually mean and
scientific client when they're represent
forwarding meals to some the first thing is that this command
other SMTP and
server so you see these these response the initiative lies with the
SMTP nodes sender because if the sender is not
intermediate nodes they have a responsive this dialog cannot go
dual role on the
of both client and server process starts by the client
they are client where they're establishing a TCP connection
trying to with the
send the message to another with with the SMTP server of
server they course over
are a server when they are port number 25 there are a number
receiving a of
message from another node commands we shall see it through
which is an
acting as the client okay so this compute example sender can send
is some
what we should remember now command to the receiver an
talking of example
the basic commands that command is hello is one such
SMTP uses well command
there are commands there are hello followed by a domain name
responses followed
the one node sends a command by carriage return and line feed
to the this is
server a client sends a a command and the server after
command to the receiving
the command reacts by may have to go through one or
responding with a more such
reply positive intermediate reply so as to
a typical reply looks like this it reach or arrive at a positive
stacks with a three digit completion
response code reply
followed by the actual string similarly anything starting with
indicating four is
the meaning of this code okay a transient negative completion
for reply
example 250 means requested negative completion means some
mail action failure
okay completed okay but transient means well we are
talking of the three digit codes not very
this 3d sure about it yet maybe this error
h codes can start either two will
three four be recovered but five starting with
or five well any numbers five
starting with means this error is of a permanent
two means positive completion nature and the mail transaction has
that means to
it is a positive response it is be stopped or aborted okay these
successful and the step that it is are the
referring to has been completed meaning of the codes now in terms
successfully of the
well well anything starting dialogue that goes on between the
with three mail
this also means positive but client and the mail server broadly
this is not there
the end of the story we are only are three steps first is the
halfway connection
through the process so this is setup second is a step where a
sometimes number of
like a positive intermediate command and responses are
reply you exchanged
between the client and the by hello message you will see a
server and complete
finally the connection gets transaction very shortly receive I
terminated will
now let us see how these three accept this end as identification by
steps sending back a 250 positive reply
look like well in the in the now if
connection the mail service is not available at
setup step the sender opens a that particular point then instead of
TCP 250 okay so a message like this
connection with the receiver will
this is come 421 indicating this is a
very easy this can be done by negative
the sender completion reply 421 service is
giving an explicit telnet not
command telnet available okay now in the second
followed by the server name step
whatever when we are talking about the
server you are using followed actual
by the Mail Transfer commands there are
port number of SMTP telnet some
server name commands which which identify
followed by 25 this will this the the
will allow email address of the source and
the the
the client to open an smtp destination because email of email
connection address of the destination is
with the smtp server now once required
connected for obvious reason the mail has to
the receiver will identify itself be
by a delivered sometimes email address
message like 220 its domain of
name server this source is also required
ready sender will then identify particularly when error messages
itself have to
be sent back in case of some 250 ok message or if there is
errors the something
receiver might like to send wrong then there will be an
back an appropriate
email message notifying the failure message similarly there
error back will be
to the sender so for that reason a received
the command where you can identify
email address of the sender is the email
also address of the recipients there can
required to be present as part of be
the more than one recipient which is
email message the header so in identified by more than one
the Mail received to
Transfer command these kind commands there will be separate
of messages reply
are used there is a command for each recipient finally there will
called mail there is a command called data
from command which which
identifies this indicates that now the actual body
sender of the email or the of
originator the email starts so after the data
this as I said this is required to command the client can start
provide the reverse path for sending the
error messages which will form the
reporting suppose you have to body of the
send back mail to the mail you can say to the
an error message we can use SMTP
this email server for processing and this
address for doing that and if message
the email can go on continuously the end of
address if it has the proper the
syntax this message will be indicated by a line
is the receiver will will return containing just a full stop or a
with a period
so it is a full stop appearing in use some mail software like
the Outlook many
first column of a line will of us also use a web-based mail
indicate the like
end of the message before that hotmail rediffmail yahoo mail they
you can have
go on typing whatever you a suitable web-based user interface
want okay through which we type means we
and finally when you are trying shall see
to close later how these are implemented in
the connection there are two practice see at some point in the
steps implementation these machines
basically the sender or the where you
client will are sending your mails the body of
be sending a quit command to the
the server mail address is subject whatever to
and we'll wait for the reply they
after the must respond to the SMTP
reply comes back from the requests in
server it responses there must be an SMTP
initiates a TCP flows operation server
the situated somewhere which must be
receiver similarly after sending contacted to send the messages we
the have
response to quit it also initiates typed as an email message okay so
TCP this
flows okay this is how the simple example that we'll show
connection is will
closed well now we try to demonstrate how a low-level
demonstrate an SMTP session
example SMTP session well is carried out well although we
normally the may be
way we send and receive mails using a high-level tool or her or a
is that we high-level package to send the
mail but
actually in internally these are client indicates the mail client so
the after the connection is established
kind of commands that get the
generated server responds by a welcome
automatically and your mail message -
gets sent so 20 suppose the server is hotmail
let us see how the process dot
starts here I comes over I am connecting it to
am assuming that the client is a hotmail.com it will send to 20
simple hotmail
simple window a command comm Simple Mail Transfer
window from Service ready
where I am establishing a something like this now after that
connection the
with my server well this can be client will give a hello message
any mail and
server I am giving a also it will identify the domain
hypothetical name name
server name if you give telnet the client belongs to suppose the
over port client
number 25 this will open a belongs to the domain yahoo.com
TCP so it
connection over port number will respond by sending hello
25 so a TCP yahoo.com
connection gets established the server again will be sending
over port back a
number 25 now after this positive response that well hello
connection is yahoo.com I acknowledge you this
established the dialog can start means
let us that the server has identified or has
see this slide shows you how registered the domain name from
the dialog where
goes on here s indicates the the client is sending
mail server then again the client uses the mail
from
command to identify the sender of the mail has been identified so
of the now
mail here you can specify any let us prepare to send the data so
an email now
address you want well when I the client sends a command data
say any server
email address it is actually an sends back an intermediate
email positive
address you can also write in response
place of 3:54 saying that start mail input
the email address that is end
specified you with dot depending on the server
can even write say for example this
Bill mail message may differ slightly
Gates at microsoft.com you but
can write actually the meaning is the same
anything out there okay so if this is
the syntax intermediate because the Mail
is correct the server will Transfer
respond by is still in progress the body of the
250 okay similarly after that mail is still being tight so it is just
there can an intermediate message asking
be one or more received to the user
common in to type in the message and ending
fact in this example there are it
two where with a full stop or a dot in the first
you can specify the email column so after this the actual
addresses of body of
the recipients again the server the mail can be typed and finally a
will be single dot in the first column will
responding back by 250 okay indicate the end of the main
messages message so
okay so now the sender and the at this point the server will
receiver respond by
a positive response 250 okay a mail message from from say for
then the example
client can send quit and the Bill Gates but without knowing
server will that it
finally send this message and is not really from Bill Gates but
close down some
the connection now the point to of my friends has played a prank
note on me
here is that this is a simple mail it is quite possible but if I look at
dialog I've shown in fact the email header carefully I will
anyone know
we can use this command to that the mail although it is saying
have a it
connection with the mail server is coming from somebody at
which is microsoft.com
available to you for example in but in fact the mail had originated
your in
organization if you have a mail some other place in fact today we
server have
you can directly do a telnet to so many email spam filters which
your are
mail server over port number supposed to block and identify
25 and you spam
can send a mail message by means they will in fact detect this
fabricating kind
any arbitrary source address of you can say mischievious mails
well well let me
if somebody is not that much call it but otherwise this SMTP
familiar does not
with how this email headers check for this kind of what should
and other I say
stuff looks like they might get misuse misuse of mail transfer
confused facility
by receiving a meal for okay so far we have talked about
example if I get how
males can be sent from one a mail server located somewhere
machine to on the
other using SMTP now we are network your mailbox is present
talking on that
about mail access protocol see mail server you have a mail client
here the that
idea is like this you have an mail client should have a
SMTP capability of
protocol running on a machine pulling your mails from the mail
out here server
this is your SMTP server but I into your machine so that sitting
am on
sitting on a computer out here your machine you can view the
and here contents
I may be having a software like of emails okay in fact there are
Outlook two
Express so I can establish a protocols which are used for this
connection purpose one is called the post
with the SMTP server and office
through this protocol version 3 or pop3 pop3 in
connection I can I can access I short
can read the other one is internet mail
and I can send mails sitting on access
my protocol version 4 or IMAP for
computer only I need not have these are
to login the two alternate protocols
into this SMTP server go to the available
SMTP let us look briefly at the
server and check capabilities
means their infect to protocols of this the way the work as I
which mentioned
allow you to access your mails is like this this refers to an SMTP
from a server mailbox this is your mail
remote mailbox the idea is that client
you have
so whenever the mail client other mail client they have an
wants to inbuilt
read mails it sends a request to feature of specifying which mail
the client
SMTP server to in fact not the you want to have and the server
sent pop3
yourself to the machine which software is typically installed on
is running your
the SMTP server and will be mail server the same machine
sending back which runs
the response in the form of the the SMTP server so
mails a client which is the user-agent
and other information you want here
to have a opens a connection with the server
look now in fact this SMTP on
server is one TCP port number 110 this hon 110
program which is running is the
suppose when port number of pop3 then the
you are trying to access a mail client
through authenticates is set with the server
pop3 you must in addition have by
another sending a valid username and
server the pop3 server running password
on the and once the verification of
same machine as the SMTP username
server ok so password has been done the client
first let us talk about pop3 so can
for poxy directly have an access to the
to work the client popsie mails
software must sequentially one by one so the
be installed on the recipient Mail's
machine can be read by the client by
well in fact Outlook Express transferring them from the mail
and the server
one at a time one by one delete messages so in the delete
sequentially mode
now when the Mail's are being fetch and delete work together in
read the
sequentially one after the other keep mode only fetch works not
there delete
are two different modes in okay so the pop3 protocol
which you can provides you
do so one is the delete mode with a basic facility to access mail
delete mode from a remote mail server to read
says that as you are reading the mails
mails into a machine so that you can see
they are getting deleted from them
your mail but if you look at the mail clients
server so that you are not that
unnecessarily are available today it can be
occupying the disk space of a Outlook
mail Express it can be hotmail it can be
server you are freeing the disk read
space as if mail all of them are based on the
soon as you have brought your same technology you will find that
meals to a they
machine for reading but the provide many more facilities than
other option just
is that if you do not want to do reading the mails one at a time so
so there
there is a keep mode where you has to be something more
can leave supported by the mail access
the mails intact in your protocol
mailbox so pop3 than just what pop3 provides and
has basically commands to log in fact
in log out IMAP provides you with the
fetch miss messages without answer
deleting and so IMAP in addition to the
capabilities
provided by pop3 it has the mailboxes on the mail server
following which was
extra features first a user can not possible in pop3 so a user can
simply create multiple mailboxes delete a
check the email headers see in mailbox rename a mailbox or also
pop3 you can
did not have an option you create a hierarchy of mailboxes
have to fetch like
the entire mail to your machine here what I mean is that if you just
and then recall how the typical mail you
view them but using IMAP you can say
can simply mail utility systems work it can be
fetch the headers of the emails out
you just look at it can be Yahoo radio see
view the the headers which one each
you like of these mail servers or let us call
you just click on the header it
now the mail systems they have a facility
mail will get transferred and for
you can the user to specify folders and
view it ok this is one option the subfolders you can manage your
second mails in
is that the user can also search terms of multiple folders you can
the move a
contents of the email for a mail into a folder you can delete
specific mails
string suppose I want to look from folder and so on so these
only at kind of
those mails which has a folder management is directly
specific string supported
as part of its body so I can even by IMAP because IMAP supports
do it modern
that in IMAP and you can day email systems
manage also I have a facility to support it
they they indeed support this thing is that this SMTP cannot
kind of transmit
you can say management of non text messages there are some
folders solutions which were developed
through the iMac capability earlier
now we as ad hoc solutions for example in
talked about multi-purpose some
internet mail UNIX system there was a
extension or mind Nam now let command called
us try to you you encode this converted a
understand why we have to go non text
for another messages into a text equivalent but
protocol because using SMTP it
you can send was not accepted as standard this
mails using pop3 or IMAP you existed only between UNIX
can read systems when
mails on to machine the main you want to transmit something
problem we between
have till now is that the SMTP UNIX systems you could do this
protocol moreover
has a facility of transmitting if we have text that includes
only pure international characters like this
text messages simple text special symbols which are
messages which typically
are encoded as 7-bit ascii but encoded in 8-bit ASCII here also
anything your
beyond that SMTP is incapable your simple SMTP will not be
of allowed
handling so you must have a will not be able to handle this kind
mechanism of
through which these kind of things so for these kind of
non text problems
documents can be handled so the protocol mine was developed
the first mine can handle something more
like many
servers may reject mail over can start a message exchange it
certain but remember mime is a little
size so the mine protocol also different
has a from SMTP in this regard mime is
facility of breaking males into not a
smaller program which is running as a
pieces server and
moreover some SMTP someone can contact with mime
implementation do not and can
adhere to standards like that send and receive something mine
even if it is not
is a text some SMTP running as a server as a demo
implementations will rather
remove all white spaces like mime acts as a translator mime sits
tabs and on
other things replace them with top of SMTP if it is a non text mail
single mine will try to translate it in some
space so your mail formatting way into an equivalent text version
will get along with relevant information so
lost when it reaches the that
destination so the final receiver can decode it
mime tries to keep this mail back
formatting and then it can forward the
intact in addition now let us try message the
to translated message to SMTP
understand what is mine is it a which can
new transfer it this is the basic idea
protocol in the same sense that behind mine now in order to have
SMTP is mime we
C SMTP is a mail transfer must have some additional
protocol it is information in
a program which is running as the translated version I told you so
a server this additional information are
the client can contact the server present
and
in the form of five new what kind of translation you have
message header done
fields in the email messages there can be more than one choice
there is available so the receiver must be
something called mime-version knowing about the translation you
content have
type content transfer encoding done so that it can it can basically
content i translate it back to the original
and content description they form
have their so some of the context types some
they have their own million of the
without content type examples are given
going into details of this I shall here it
be can be a text body it can be a
showing some examples a little multi-part in indicating that the
later so mail
this content type actually has multiple parts with the
means what subtypes
type of content it is whatever is being mixed parallel alternative
following whatever you are message
translating several subtypes image video
is it an image is it a Word audio
document is application there are several others
it a PDF file what it is okay so just example the way it is written
it for
specifies the type of the example image you give this the
content so you type a
can have types and subtypes slash followed by the subtype this
for example is
it is an image subtype it's it is a how you specify the type and
JPEG subtype
image subtype can also be a Jif mime transfer encoding specifies
image so how the
on this transfer encoding tells translation has taken place which
you that in
technical term is called how mostly simple ASCII characters
the male with a
body is wrapped for few non-printable characters these
transmission because non-printable characters can be
male body has to be translated represented by a code followed by
or their
transformed somehow into a hexadecimal equivalent that say
text form so these
that SMTP can transmit it okay are called code printable if you
this is have a
mandatory content transfer special character give a code
encoding can followed
have six possible values out of by its two digit hexadecimal
them equivalent
seven bit 8-bit and binary these okay base64 is perhaps the most
are widely
special cases there are no used technique for transforming
separate arbitrary non-text information into
encoding required for these a
because these header this form which can be handled by
content smtp so it
transfer encoding type directly Maps arbitrary binary input into
tells printer
you what kind of information it block we shall see how this works
is if and X
you are wanting to send them token is a method but the user can
in plain specify its own non-standard
binary you simply send them encoding
seven bit method now to talk about the
8-bit similar there is one base64
method called encoding method it works like this
quoted-printable or code base64 encoding method can
printable here transform any
you use this for documents non text message message into its
which contain
equivalent text message now 10 the digits 0 to 9 and for the last
the way it 2
works is like this it takes three plus and slash these are the 64
bytes characters so each of these 64
of the input message at a time combinations you encode them as
it breaks one of
zipper up into four chunks of 64 esky characters this is how you
six bits encode it and replace each ASCII
so the three bytes of message is character by its 8-bit ASCII
broken equivalent
up into six bits each each of so 24-bit gets translated into 32
these six bits
bits are expanded into eight so this means an expansion in
bits message
through a simple table lookup size by 33% so
process [Music]
the table lookup process is some examples of mime header so
called r64 yes you
it works like this see in six bits can look there are some header
you information there is a boundary
can have 2 to the power 6 or 64 which
combinations so from 0 0 0 contains a string this string
0 2 1 1 1 1 1 1 there are 64 wherever
combinations you have a table it occurs this indicates some
which says boundary
that for the first 26 of these you in the mail message there can be
replace them by the by the several
ASCII code of several such parts in the mine
the letters capital a to capital Z header
for this is another example here also
the next 26 replace them by the there
ASCII is some header here the boundary
code of small a to small Z for name is
the next bound for t2 here there is a
boundary
here there is a boundary here mail they get encoded in the same
there is a way
boundary so the content a for now with this we come to the end
example of
multi-part alternative means today's lecture let us now quickly
there are look
multiple parts in the content at the the answers to the quiz
and questions
alternative means the receiver which were posed as part of the
can last
choose any one of these two lecture solutions to quiz questions
alternatives on
depending on the capability the lecture 9 the questions were what
first is an
one says content type text plain iterative server it is one in which
the the
second one says text enriched client requests are processed one
so if your by one
receiver mail client can display sequentially what is the concurrent
rich server here multiple client requests
text then the second alternative can
can be be handled at the same time
chosen otherwise the first multiple
alternative copies of the server are created
now I suggest you can look at using
the process system call like fork or
headers of some of the mime you can
encoded also use a thread for this purpose
messages to understand more which
about how of client and server must start first
the encoding and the obviously the server what are the
attachments work components of a socket it will be
the attachments when you send protocol local IP local port or
with a protocol
remote IP
port it is also called half server xyz.com over port number
Association one
what is the domain it is a set of point one two three four by a
computers which are related command
either by like this telnet server name
the geographic location or by followed by
the way port number why does FTP use
they function what an MD and more than
nslookup one port numbers the first port
name D refers to the domain number
name server 21 is used for control connection
which runs on the UNIX and
system and the other one is used for actual
nslookup is a command which data
invokes the transfer what are the function of
DNS name resolver through the
nslookup you hash and bin command in FTP this
can actually translate a name hash
into an indicates the status of the file
address how does recursive transfer it displays some hash
name symbols
resolution work host sends a continuously each hash indicates a
request to chunk
a DNS server D this DNS of data transfer either two kilobyte
server or
recursively forwards the four kilobyte or each lower
request to depending on
other DNS server the responses the system and bin selects that you
are sent are
back to the to the initial host trying to transmit a non txt file a
along binary file now some questions on
the same path through is the today's lecture what are the basic
request drawbacks of SMTP which port
that went how can you connect number to
to a
SMTP servers used for now with this we come to the end
accepting client of
requests why does mine does today's lecture in our next lecture
not have any we
port number associated with it shall be starting our discussion on
under the
what condition can an SMTP world wide web which is yet
server also another very
act as a mail client what are the popular application that we have
purposes of the mail from and on the
receive Internet
two commands in SMTP what thank you
is the [Music]
difference between CC and in the last class we were talking
BCC in the about
SMTP header this is something electronic mail which is one of the
I suggest most
you can look up and find out widely used application on the
the Internet
solution today we'll be starting our
why is I'm a preferred over discussion
pop3 a on another very popular
message of size three thousand application
bytes is which I am sure all of you are
encoded using base64 scheme already
what will be familiar with you must have you
the size of the encoded must
message is it have used it in practice and it is
mandatory for the DNS server the
to run on world wide web now this world
the same machine that runs wide web
SMTP server has become so popular that today
how our mail attachments world
handled in mind wide web and Internet they are
used
synonymously sometimes this [Music]
world wide [Music]
web or www is meant to be [Music]
referring to [Music]
Internet or vice versa so there Oh
is an [Music]
impact of the popularity of this
www
Lecture -11 World Wide Web Part-I
popularity of this www now let
us see
[Music] what this world or web actually
you is this
[Music] is of course the latest revolution
in the last class we were talking in
about the internet scenario millions
electronic mail which is one of and
the most millions of people are using the
widely used application on the World
Internet Wide Web today the main
today we would be starting our feature of www
discussion on another very is that it allows us to share
popular multimedia
application which I am sure all documents between machines
of you when you say
are already familiar with you multimedia we say document
must have containing
you must have used it in practice text pictures audio clips video
and it moving
is the World Wide Web objects animation so all these
now this worldwide web has things
become so together can be part of the same
popular that today worldwide document and means we can
web and have this kind
Internet they are used of multimedia information
synonymously which is
sometimes this world wide web available on our desktop which
or www is has been
meant to be referring to Internet displayed on a browser which
or makes this
vice versa so there is an impact application so very interesting
of the and
attractive from the cover of this World
now what this world will do Wide Web
actually is this term has come so the name
this is basically a huge collection World
of Wide Web has come from
documents which are interlinked cobwebs the
interlink means one document is interlinking among documents is
linked so
to some other document this complex and unstructured it
some other resembles a
document may be linked to some cobweb okay now in www the
other documents
document so there can be links reside on web servers well what
between is a web
one document and another you server web server is a server
know that which
whenever link you can click it understands hypertext Transfer
on a Protocol
mouse you go to some other or HTTP so web servers are also
document sometimes known as HTTP
is what link means so these servers and the
documents documents which are residing in
are all linked together okay so web
there servers they are typically written
are billions of documents they in a
are language called hypertext
linked in all arbitrary possible markup
ways language so they're either
and since there is a very written in
complicated HTML or there are some other
interconnection of this document scripts or
using programs which can generate an
this links they resemble a HTML
cobweb and document as the output which is
sent
back to the browser client can send an HTTP request
finally the browser can receive it will
an HTML get back an HTTP
document and display it in a response or reply so let us see
suitably what
formatted way so the purpose of this HTTP requests and
the responses look
browser the browser has the like so first let us try to
main understand
responsibility to receive these HTTP the hypertext Transfer
documents and display it in a Protocol
suitable Transfer Protocol this is a
formatted fashion there are so protocol
many web which the web clients which the
browsers available today I've browsers
listed are typical examples of web
some of them explorer netscape plans
mosaic interact with web servers this is
and conqueror there are many the
others also language using which a browser
available now this HTTP is the and a web
driving server talk among themselves
force behind the World Wide the
Web so when hypertext Transfer Protocol the
we talk about the World Wide first
Web when version at least it is a stateless
you talk about web server it is protocol stateless protocol
the HTTP means no
protocol we are talking about so history is maintained every time
the web a
server is running a program request is sent a fresh connection
which is has
understanding the HTTP to be established ok if you are
protocol any requesting for three documents
from the
same server you have to to some other place there should
establish be a
connection three times not that mechanism inbuilt in the HTTP
you are protocol
connecting only once and which should support this kind
transferring of a
three documents at the same thing now as I have mentioned
time there browsers
of course some subsequent and web server communicate
versions of using HTTP
HTTP which allows the so- the basic steps look like this the
called client first opens a socket
persistent connections where connection
you can to the HTTP server typically the
make multiple transactions over HTTP
a single server runs over port number 80
connection this HTTP transfers but some
hypertext web servers also run over some
across the internet through the other
documents that are stored in the port number like h 0 h 0 or
web something
page as I said there are some else also so you must know the
pages with port in
links to other pages okay these on which the server is running so
are that
called hypertexts so hypertext is you can establish a connection to
a text it
with links to other documents so typically by default the port
this number is
this HTTP protocol allows 80 so after connection
transfer from established the
one document to another using client sends HTTP request to the
this server
hypertext by clicking a link you server will send back response
can go and the
server will immediately closed comes back on the screen and if
down you
connection this is the stateless click on one of those so-called
mode hyperlinks which which links to
where for every connection you other
are documents then what happens
opening and closing the now another
connection if HTTP request goes to fix the
there is another request then the other
whole document the other document
process will will have to repeat it possibly is
again residing on some other web
again start a connection again server and
transact that some other web server will
and then close so just look at this again be
diagram suppose you are sitting sending you back response and
here this will
this is a web client here your continue sending a request
means see getting back
here using a browser here when a response click in the link going
you are to
typing the address of a site say some other server this continue
www.yahoo.com say this is the this is
yahoo.com called web browsing and this
server so an HTTP request is browsing
being sent can take you from one server to
to the yahoo.com server and the the
server other across the world you really
sends back a response which is do not
actually know that from where you have
an HTML page which gets started
displayed on and where you will ultimately
your screen now after the HTML stop in
page this process now talking about
the HTTP
request format a client request to additional data but for those
a methods
server consists of the following which do not need the data that
it part may
consists of a request method not be there so let us look at
there are some of
several request methods we shall the important request methods
be one by one
talking about get head post port gate is the most widely used
etcetera method this
the path portion of the HTTP is the method which is used to
URL is URL fetch a
is a way of specifying the path web page from a server it returns
we shall the
be talking about URL later in the contents of the specified
lecture version number of the document get
HTTP can place any parameter that you
protocol and for some of the need in
request the request header itself it does
methods you may need some not
optional need any additional lines of
header information and in case header
you need information like an example is
to supply some additional data shown
the data here this is the gate command
has to be supplied after a blank you are
line in putting some additional
between this blank line acts as a information out
delimiter between the header here followed by the HTTP
portion and version number
the additional data that you are you see the first part of it CGI
supplying some of the request will be
methods in my script doc CGI this
like post or put they need the specifies a
path to a particular resource my space for rule number one space
script for sex
dot CGI but after that following I have typed in 1 2 3 4 & M and
this this is
question mark there is some what which goes okay this is the
additional data
data role equal to 1 to 64 ampere you get filling you basically fill
cents up in
X equal to M this actually comes the form and the way this roll
from number
so-called forms well we shall be equal to M percent this is called
studying forms later when you you
study HTML are in this is URL encoding this
in detail C form is something we
like you shall study in detail when you
have seen many web pages like talk
the search about CGI scripting and HTML
engines where some blank forms later
form like place come or you can in course of this lecture but this
type in example shows how we can give
something and face entire such this kind
something of information along with a gate
else comes back so whatever command
you are now a very simple illustration of
typing in those boxes empty gate
boxes and where you are trying to retrieve
placing enter you are actually a
filling simple document no sending or
up of form and submitting it form data
when the a simple document C to start
data goes back to the web server with it you
it goes can just open a command
in this form for example there window again and
was one you can start this transaction you
can
give a command telnet you can name of the server it is running
give the 1.1
name of a server to which you version
want to great server type last modified
connect and HTTP you can this
either give document when was it last
HTTP or you can give the modified
default port accept-ranges of course this is an
number 80 whatever this HTTP option we'll talk about it later
will mean content length what is the size of
that the default port number of the
the HTTP document connection close
protocol well after this means this is
connection is the default approach that means
done you get back a screen with after
nothing the transaction is over you
displayed which means that the terminate
server is the HTTP connection this is the
expecting you to type something so
so you called stateless approach that I
type a command like this gate is was
the talking about so instead of close
request method slash test dot you
HTML is can also specify connection keep
the document you're requesting alive
and this that is supported in the HTTP
is the version of the HTTP the version
server 1.1 where you can leave the
will be sending back a response connection
like open by default okay and and
this first you see there are after this
several after these lines come this
lines of header HTTP the HTTP content type
version there is a text of type HTML
here there
is a blank line you see there is a so a typical session with head
blank will look
line in between this blank line like this after doing the telnet
indicates or exacts a delimiter you
that now send a command like this head
the actual data follows so the name of a
actual file followed by Stevie version
content of the file follows after you get
this back only the header portion
this is a very simple HTML file what is
which missing is actually the body of
was created to give you this the
demonstration so the content of contents of the file that you are
the HTML not
file will come after that so you requesting here you are
see requesting only
that this command gate the header portion so only the
command can be header
used to fetch an HTML file from portion is coming
a server back to you and you can have a
if you know of course the name look at
of the the header portion to see what it
file contains
there is another request method if example this file size is one
called four
head which returns only the nine four bytes
header okay right post is another
information well you may not be request
interested to get the whole file method post is again another
but you method
may need some information which is used in conjunction
about the file with the
like the file size when was it last submission of the form so we'd
modified server version etcetera be
talking about post now but you to the CGI script but the way
can this data
actually put it in a proper is sent is different from the gate
country approach that we had discussed
context when we discuss CGI the this
script later uses two additional header types
during our class now this post is content
used type and content length the
to send some additional data to requested
the object is not a resource to
server to be processed typically retrieve
by a rather it is a script and
CGI script CGI script is a executable
program CGI script
stands for common gateway similarly this server response
interface it which
is a program which is running on comes back is not a static file
the but
server side whenever you fill up rather it is the output of the CGI
our program which are saying where
form typically the data submitted the
in a server is not sending you back
form goes to the CGI script the the
CGI contents of a file which is
script reads the data does some already
processing and generates some there rather it is sending you
output back the
which comes back to your plant output of the CGI program for
on the instance
browser it gets displayed there which is receiving the data
this is executing it
how CGI scripts work now this and sending back the output to
post you okay
request method allows you to now the post command can be
send data illustrated
with this simple example well sending user agent the name or
again the
after telnet version of the user agent that is
suppose you give a command running on your machine content
like this type for
post followed by a pot name this type of content it is well
cgi-bin application
/ my script dot cgi this does not something xw form URL
refer encoded these are
to a document or resource which URL encoded see this is the
you want actual
to download rather this is the content the way this has been
name of a encoded
program the CGI script program this is called URL encoding and
for the name
instance which you want to is X www form URL encoded
execute and content
whenever this post command is link the total size is 32 there is a
given and blank line in between followed
this is the additional information by the
you actual body of the this additional
will also have to supply after information so so in get this
post see information is put on the same
in gate or head you give a one line
line after a question mark in post it is
command and a lot of response put
comes back as part of the command after a
but in post you have to give a blank
multiple line now in post you can put as
line command this first is the much
first material as you can so if you
line followed by from you have have a lot
to of data to send post is the
identify yourself from where you preferred
are
approach because then get the you can understand not all web
total size servers
of the string is limited by by allow you uploading facility
usually only a few
256 the maximum size of the web server will allow you to do
string that that and
the machine can support some of course only after proper
other authentication then it is similar
request method put put is used to in the
upload sense that this also makes
the contents of a web page it updation this
replaces can delete a specified document
the contents of the specified this
document also is not used very widely only
with the data supplied along in
with the some servers where you have
command proper
so here the data that we are authentication you can do that
supplying and after
this you can supply exactly like sending the request well there is
the some
post command so after some request header you see that mean
initial that
header give a blank line then means when you are sending the
give me request
your entire webpage which you some request header
want to informations are
upload so the entire thing will be required now after the initial line
the get
data you are trying to send to the post put etcetera so a client can
server the server will handle it send
and it any number of header lines some
will be uploading it but of course of these
as we have illustrated with the
example for
post so after the post command as part of the header content
there length of
were several additional lines of course you have seen number of
header bytes of
followed by the data that were data content type what mine type
supplied of data is there there is a Padma
so this is usually optional for header
some pragma : followed by no cash
request types like gate you do this
not need indicates that if you are
it for some others you need some redirecting
of the your command to a proxy server
common header types are except you are
this saying that you please do not
except followed by a string send me my
indicates requested information from your
that which mime types the client cache
will you try to send me a fresh copy
accept connection connection is from the
the original server
connection type if it is close you so this pragma no cache tells you
are to
asking it to close connection return a fresh document well
after although a
every transaction if it is cached copy may exist you may
keepalive want some
then you are saying that well it time that you want the latest
will update is
not be stateless you will let the updated copy from the original
connection be persistent I can server
send more and for commands which
than one file one transaction requests which
over that requires request data like the
open connection so you can post and
specify this
put so you will have to put a are shown it will either be HTTP
blank line version
followed by the actual data so name 200 ok or version name
there 4:04 not
will be the initial header formed this 204 0 for the error
followed by a codes
blank line then the data part this and ok and not found at the error
will types
be a structure of your overall and after this this initial status
HTTP line
request okay now after the will come the
request is actual content of the response
sent now it is time to get back there
the will be some header at the
responses so the responses look beginning
similar followed by the actual data and
the requests for most of them again as
other than usual there will be a blank line
get there are some standard in
request between so there will be a blank
headers followed by optional line
data the separating them so the header
responses also look very similar looks very
there will be an initial response much like this TV request line
line there
which is also called the status will be some header types
line followed by
response status line it consists of the value the content length
three parts the STP version a connection
three close content type and at the end
digit response code and English you
phrase will get the data that you are
indicating what type it is two requesting and the three-digit
examples status
codes they indicate anything requesting has been moved
starting permanently 3
with 1 indicates that this is only 0 2 means temporarily 4 0 1
for there is
information this is not an error some this authorization problem
message maybe
you would need not have to do you have not supplied the
anything password
special with respect to this this is correctly 4 0 3 some documents
just for your information some some
informational message to access permissions are not there
anything for 0 4
starting with 2 indicates not found' 500 some server error
successful ok now
transaction anything starting in the response header there are
with 3 several
indicates that you have been things which are included like
redirected content
to another URL some servers length you already know and
support specify the
redirection start with 4 mean size of the data in bytes content
some error type
condition 5 means there is some again mime type and subtype
internal what kind of
server error so this kind of errors data is coming date means the
are current
reported by error code which is date when each document that
starting resides on
with this initial digits some of the server
the can also have something like an
common status codes are like expiry
this 200 date associated with it so
means ok 3 0 1 means some whenever you
document of are fetching a document it will
also
contain what is the expiry date information about the session
some some
document may contain expired session ID you continuously
some check
government may not contain if it whether your present session
contains then you will have a variable
look at matches with the session ID
the expired date and find out stored in
whether the cookie if not you give an
this is an obsolete document or error
not message that your session has
there is a last modified the name expired
is something like that so this
obvious what it means and set- cookie can
cookie also be sent back and after the
set-cookie is another information initial
which header again there will be a
is sometimes sent back see blank line
setcookie which will be followed by the
followed by some name value actual
pair see data so the way the requests are
whenever you want to have sent
cookie in your and the responses are sent back
browser cookie as some values are very
name and similar they use the mime format
value pair which are sent from for for
the other the heading a blank line then
side which can be used by your followed
browser by the data there is no upper
to do some kind of local limit to
processing like the data size it can be very big
when you are maintaining a also
session you the two versions of HTTP which
use cookies you maintain some you see
around you today this HTTP 1.0 remaining because active for a
is the long time
older version but most of the it may so happen that the
modern web maximum limit
servers use the later version 1.1 may reach and after that requests
then which
1.0 the server typically closes are coming they will not be
connection after complicating a honored they
transaction that is the default will be denied so for most
well in servers which
1.1 the server keeps the are pretty popularly used they
connection open prefer to
it is persistent so it depends on use stateless or non persistent
the connection type now HTTP
scenario that you are working in version 1.1 let
whether us try to see in what way this is
you want to keep it persistent or different from the HTTP 1.0 the
not STB
see four servers which are very version 1.1 has become an IETF
heavily drop
used keeping a connection standard as early as in 2001 so
persistent details
will add the load on the server about this version is available on
because the
every machine has a maximum net now the improvements that
limit to the have taken
number of connections that it place over HTTP version 1.0 are
can handle this
simultaneously so if it is a version requires a mandatory
precision host
persistent connection and there identification see what is meant
are many is that
connections which are coming in the conventional gate
and command in
version 1.0 you need it only a means there is a single machine
single but more
line but in version 1.1 you also than one domain resides on them
need an like
additional line after that host : what I mean to say is that there
followed by the domain name of is a
the single server computer but on
server what does this mean the same
suppose I computer
want to get a document from a there is one domain name
server I xyz.com there
give a gate command next line I is another domain name say for
give example
following the host type of the ABC com both are residing so
header whenever I
type I follow it with the name of am sending a request to that
the computer I
server but you can argue that must identify that which of the
will two
anyway I am s servers I am actually trying to
Publishing a connection to the send my
server request to so what for this
either by using an explicit telnet purpose
or by explicit server identification is
typing the address on the required and of course there has
browser so why to be a
do I have to specify the name of blank line after that and then
the enter ok
server again see this is required default support for persistent
for connection this I have already
some of the server types which mentioned
we see so that by default multiple
around us today these are called multiple
multihomed servers multi-home transactions take place over a
server signal
connection but if you want you give me in some other PDF
can make format like
the connection type as close and that so these are some
and you preferences which
can make it a stateless support has to be negotiated and this can
for be
content negotiation let's see you negotiated based on some
can initiative made
have several alternate by the browser or also the server
representations both
this may be with respect to the are possible now one interesting
browser thing
this may be the server also so which is to be version 1.1
you can supports
negotiate and find out which of which was not there in 1.0 is that
these browsers can request part of the
are the best among the available document see earlier what
ones happened say
this may be driven by the server for example when you're
this accessing net
may be driven by the browser you're clicking on a link and
like you some file
are looking for a document that was being downloaded suppose
document it was a
may be presented to you in one big file now in between if due to
of some
several formats possibly the error if the connection got
browser can broken then
give a preference that well I again if you have to resume the
prefer the connection you have to start
document in HTML well if it is from the
not beginning because ultimately
possible for you to give an request for
HTML the document has to go as an
HTTP
request that I want that okay then HTTP version 1
document but in allows
this new feature what has been efficient caching support this is
incorporate is that you can another feature which has been
specify that added so
I want this document but you this supports a document
start caching model
sending me this document from that allows both the server and
this the
particular offset maybe a part of client to control the two for tax
this extent
document I already have with you need to maintain the cache
me I want so when
to start downloading from this you say I am maintaining cache
particular point this helps in there are
saving a a number of things what is the
lot of time for download this can size of
be the cache up to how many days I
done by using the range header will
type by maintain information in the
specifying bytes like an example cache what
range : is my cache architecture a lot of
bytes equal to 1200 - 3 5 0 this things
means can be negotiated upon so using
that I want to fetch only bike this
number caching support through some
1200 up to 3500 browsers can specific
ask for headers the clients and the server
more than one range there can be can
several negotiate and fix up exactly
such range lines this as I what kind
mentioned of caching you desire see earlier
this allows us to continue with the
interrupted downloads caching architecture was fixed
statically but here it can be identification is required you
negotiated must
upon and you can fix upon an include the host header with
architecture but in order to have each
all request
this facilities working HTTP 1.1 well persistent connection is
obviously require several extra supported
things by default but but if you want to
from both client and server just have
one the other a stateless transaction
example I have just given that then
explicit you must have this connection
host identification is required close
after option specified in the header
the gate command the client priscila there are some other
must must features
also send that extra host also I am NOT going to detail
command so if but you
you are writing a new client can have a look at the HTTP
today you documentation and try to find
must keep this in mind you must out what
incorporate this new architecture these are there is 100 continued
so response and there is something
just to have a quick look at what called
are chunked data which is also
the different features you need to sometimes
have useful when you are sending a
suppose you are going ahead number of
with the different things together so these
design of an HTTP 1.1 client so are
what are the kind of supports you must
the new requirements you must have from
have first the client if you want to have an
as I said the explicit host HTTP
1.1 1.1 compatible client which and mandatory but others you
can can keep
faithfully talk to an HTTP 1.1 depending on the environment in
server which
and communicate similarly from you want to use this and in order
the point to
of view of the server there are a have backward compatibility
few you should also support 1.0
thing the server must also do like HTTP
it requests and either support
will require a host header from persistent
the connection or include
client it should accept absolute connection close
URLs in header request explicitly in the
a request because most of the request
earlier okay so if due to some reason
servers they only accept a persistent
relative URLs connection cannot be supported
the absolute URL mean you start by the
from the server then connection : close
root HTTP slash slash hostname this must
slash explicitly be present in the
path the complete path that is headers of
absolute every response you generate so
URL then accept requests with that the
junk data clients will know that well this
this again you can have a look particular server cannot support
for this persistent so let me go for
junk data include the date header non-persistent okay
in so talking about HTTP proxy
each response this is the server we'll
additional be talking about proxy servers in
thing support for at least gate more
and head detail later proxy server is
basically
an interface between a client and implement there are a few other
a things
server say here you have a proxy the proxy server will receive
server requests
you have the client out here you from the client on one side and it
have will
this server out here so client followed them to the server on
sends the the other
request to the proxy server proxy side similarly where the
server response comes
sends the request to this server back responses come back from
the the server
server when it sends back the and they are forwarded to the
request client so
request goes to the proxy the you can say that the proxy at the
proxy same
sends the request back to the time is acting both as HTTP
client client as
so proxy works more like a well as HTTP server so
middleman whenever it is
proxy sits in between but what receiving requests from the
does client so on
actually proxy do well the proxy one side it is receiving requests
is a from
number of other features that we the client it is acting in the
shall server on
talk about later it can provide the other side it is forwarding
some that
kind of authentication it can same request to the web server at
provide that
some kind of filtering some kind time it is acting as the client so I
of just mentioned proxy server here
simple firewall configuration it because
can proxy server is an example
where you
need to have both the name so I can look at the
functionalities of particular
HTTP client and server in the file on this path and I can send it
same back
software package software tool a to the requesting client but in a
software program so the details proxy
of the server the situation is different
proxy server you will see later here
but the here every request must contain
point I wanted to emphasize is the
this that complete path along with the
this is one example of a program name of the
where machine which means the
if you want to code complete URL
you must have both the well I will come back to the CL
functionalities shortly
of the server and client in it so complete URL means complete
another thing our proxy server is path
that starting from the name of the
they request from a client to a machine
proxy along with the document say for
server is a little different from example
normal www XYZ com slash dot slash
server why because in a normal ABC door
web text because the proxy server
server - do you establish a will have
connection to forward this request to some
then you specify the path name other
of a server if it does not know which
document okay so the the server server
knows the request is going to how will
that well a connection has you do
already been that if it was just a relative URL
established with me I have this relative path name then it would
part not
know where to forward the to locate some resource on the
request to Internet
okay so that is why a request in the simple case I want to
coming to locate a
a proxy server must be coming particular file on the web server
in a that
complete way so that you will is the example of a URL okay so
see that URL is
in most of the browsers there is a the short form for Uniform
facility for specifying proxy Resource
server you locator so as I mentioned this
can specify that that request this URL
from your is a mechanism or it is a format
browser will go through a proxy whatever you call by which
server documents or
you specify the name or the IP resources can be addressed in
address the
on and the port number in which Internet in the world wide web a
the URL
proxy server is working the way contain several information first
the of
browser will behave is that course the name or the address
whenever it of the
is trying to send something to a site or the server where the
proxy actual
server it will send the complete resource you are trying to
path address is
name to the proxy server so that located secondly what is the type
it can of
handle okay service you want to use to access
now let us finally talk about the the
uniform Uniform Resource resource do you want to use FTP
locator sore do one -
URL the URL are nothing but is HTTP or something else port
mechanisms number of
the service well in most cases whatever we have specified it
some starts
default port number is assumed with this scheme this is a syntax
but you scheme
can explicitly specify a port which access method you are
number using
also and once you have located followed by a colon double slash
or if whether
specified everything you may there is one example where you
also do not
specify a path name on the need this
server which / followed by the address of the
specifies where the resource is machine
located this colon port is optional if you
on that particular server so all want
these to specify an explicit port
things taken together will number if :
actually port followed by a path name
identify where this server will some
actually examples follow the first
what the particular resource you example is a
are URL which says it is an HTTP
trying to address is actually this is the
located on name of the server and this is the
the server now let us see what path
are the of the resource the resource is a
different URL types I have listed b1 dot
with HTML the second one is also
the example of that going into HTTP but it
detail specifies an explicit port number
this URLs are nothing but a form here
of the HTTP server is running on
specifying Internet addresses so port
the number 2 3 4 5 the resource is
rose def
jpg in this path the third is an the user name password are
example missing then
of an email by default it is taken to be
male 2 at the end you have the anonymous
email FTP and this is the address of
address well if you have this the
male 2 URL machine and this is the address
as part of a web page if you click of the
on it document or resource under the
automatically a mail window anonymous
will open directory and this URL can also
where you can type in a mean be used
this is the to send a send a query string like
reason why the male 2 URL is the
required example that we had given
news is one example where earlier for
double-flusher gate well gate is a way to send it
is not required this refers to as an
news as an HTTP string but even
groups FTP is for file transfer in when you type
the a URL on the browser
first case after the slash you give they're also you can explicitly
the specify
user name colon you give the that like like an example follows
password it
then this at the rate sign then the says HTTP this is the name of
machine where you want to do the
an FTP then machine this is the path name of
this is the path name where the the
documented resource is located resource here this path name
the last refers to a
example refers to anonymous CGI script program again a
FTP where question mark
user name password are not followed by some additional
given so if information
now this whole thing is a URL messages for this purpose you
this you need mine
can type on a browser and press and error reporting is not
Enter guaranteed
what the browser will do it will these are the basic drawbacks
generate a get HTTP request number 2
from this which port number 2 SMTP
and it will send it to the servers use for
requested accepting plans requests this is
server so actually what will go to port
the number 25 why does mine does
server will be the same get not have
request as I any port number associated with
had mentioned earlier but this is it well
how as I said mime is not a server
you can also specify in an URL what
as part happens is that suppose this is
of HTTP so with with this we mine
come to the this is your SMTP so mime
end of this first part of our actually
discussion translates a document into an
on World Wide Web now let us alternate
quickly form and gives it to SMTP it is
have a look at the answer to the the SMTP
questions that were posed in our server which is actually sending
last the
class solution to the quiz mail and it is SMTP which is
questions on acting
lecture 9 what are the basic which is residing as a server
drawbacks program ok
of SMTP well in SMTP the so this mime is not a server it is
main drawback a
is that this SMTP cannot send simple translator so under what
non text condition can SMTP server also
act as a
mail client this I mentioned destined to me when I received
when an the mail
intermediate SMTP node is I can also see that well this mail
doing mail was
forwarding receiving a mail also copied to these fellows but
from one if you
server and forwarding it to specify those copies using BCC
another then or blind
it is simultaneously acting as carbon copies CC means Carbon
main Copy BCC
receiver and mail sender both means blind carbon copy then
client and the final
server what are the purpose of recipient will not know that to
the mail whom the
from and receive two commands copies were sent to okay that is
the SMTP how it
mail from will identify who is is blind
sending why is IMAP preferred over
the mail received two we pop3 because
identified to in IMAP there are some
whom you are sending the mails additional
what is features like and check the email
the difference between CC and headers you can search the mail
BCC in the contents
SMTP header C CC and BCC you can manage user mailbox
both are used these are
to send copies of the mail to the main extra features a
some other message has
people for example your primary 3000 bytes you are encoding it
destination may be somebody using
you are base64 what will be the size of
sending copies of the mail to the
someone encoded message now in base64
else if you use CC suppose the if you
mail was
recall every 24-bit of the with appropriate boundary
message gets headers and in
encoded in 32 bits so the total each such attachment there will
size be
will be four thousand bytes is it additional headers which will
mandatory for DNS server to run specify
on same what is the type of attachment
machine as a 70p known DNS whether
can run on it is an image user audio file
any other machine whenever you video
configure file what it is and how they are
your computer you have to encoded
specify the is the encoding technique base64
address of or
the DNS server so whenever something else okay now some
there is a questions
name involved the DNS server from today's lectures why is the
will be traditional HTTP protocol called
will be automatically quad it and stateless what is the hypertext
the IP what is
address obtained from there the default port number of HTTP
Howard mail attachments handle what
in mine does the client request to a
mail attachments are separated HTTP server
by using comprised of how can the gate
the boundary strings mime command be
headers will used to submit forms what is the
be associated with each such purpose
such as I of the head command in what
as as each attached attachment way is post
for different from gate when data is
example your mail has two being
attachments sent to a CGI script how are the
okay there will be two such data
attachments
sent in post command what are our last class we are talking
the about the
connection field in the HTTP HTTP protocol and I mentioned
request that this
header signify what does a HTTP protocol provides the
typical HTTP heart of the
response consist of what are the welded web all transactions that
basic go over
differences in the HTTP 1.1 the Internet today whenever a
version from client
the 1.0 version how does a proxy wants to contact a web server
server and the
act both as a client and a server responses are sent back they are
what done
is the URL syntax for FTP so through the HTTP protocol so
with this today we
we start at the we stop to this would be continuing our
lecture discussion from
in our next lecture we shall be there so Weld wide web part 2 is
talking the
about some other aspect of topic of our discussion today so
world wide we
web subsequent to which we'll start with by looking at the
be talking requirements of a web server for
about example
how we can design web pages if someone asks you to design a
using web
various technologies like HTML server so we try to address the
is P and issues
so on thank you that will be faced by you as a
[Music] designer
we'll be continuing with our what are the things that needed
discussion needs to
on weld wide web now if you be taken care of so let us look at
recall in the
basic requirement of our web another form of net which is
server perhaps the
first now of course the most most popular this is called
basic of overloading
the requirements is that your this in a sense is a special form
web server of
must be able to accept HTTP dynamic net because addresses
requests are not
because because our web is assigned statically to the
based or computers
works on the basis of the HTTP they are somehow access
protocol permissions are
so the first point is absolutely generated dynamically this again
mandatory and for the majority is used
of to map multiple unregistered IP
requests the requests type will be addresses to a single registered
either gate where you are IP
possibly addresses see here there is a
trying to fetch a web page a head difference
where you have a single registered
you are trying to fetch the address not
information multiple as I was discussing in
about a page and if you're the
supporting previous case there is a single
forms then possibly also post valid IP
there are address available with me but I
other HTTP commands also can
recall but support 100 simultaneous
these three are the most basic requests from
that are the private network how I can do
put delete this this I
kind of commands also there but can do this by using the port
these numbers
three are the most basic ones [Music]
there is you
Lecture -12 World Wide Web - Part-II
we'd be continuing with a what are the things that needed
discussion on needs to
World Wide Web now if you be taken care of so let us look at
recall in our the
last class we are talking about basic requirement of our web
the HTTP server
protocol and we had mentioned first now of course the most basic
that this of
HTTP protocol provides the the requirements is that your web
heart of the server
worldwide web all transactions must be able to accept HTTP
that go requests
over the Internet today because because our web is based
whenever a or
client wants to contact a web works on the basis of the HTTP
server and protocol
the responses are sent back so the first point is absolutely
they are mandatory and for the majority of
done through the HTTP requests the request type will be
protocol so today either
we'll be continuing our get where you are possibly trying
discussion from to
there so world wide web part fetch a web page or head where
two is the you are
topic of our discussion today trying to fetch the information
so we about a
start with by looking at the page and if you're supporting
requirements of a web server forms then
for example possibly also post there are other
if someone asks you to design HTTP
a web commands also you recall but
server so we try to address the these three
issues are the most basic there are put
that would be faced by you as a delete
designer
this kind of commands are also get executed that must be
there but mentioned in
these three are the most basic the gator post command and after
ones now execution the outputs of these
if you want to have get and programs
post will be sent back to the browser or
facility where you can submit a the
query client typically this will be in the
string then in addition you will form of a HTML page so this is a
have to simple
have the facility for handling requirement that a web server
so-called must
server-side scripts now surface conform to now in addition there
ID are a
scripts are nothing but some few other things well when a
programs typical web
these are executable which are server is getting installed is being
residing installed you will find that there
on the server machine these are
executables some typical convention for the
can be written in any language directory structures which are
they may followed
be written in some scripting for instance there is something
language called
Perl or may be written in the root directory so all HTTP
languages like files and
C or Java okay and and folders are created under this root
whenever you directory okay so as an example
submit a query string using this
gate or post root directory may be slash home
these executables will get slash
executed of HTTP D for some web server like
course which program you are Apache
trying to this is the default web server root
directory similarly there will be a
directory which will be located programs and other scripts can be
under stored
the root that will be called the well again as an example this
HTTP directory
home directory well home can be home
directory is yebin this is the typical name with
something where all your web now
pages would further files which are stoning
be located ok so whenever you under
are the cgi-bin
putting in some web pages on normally server-side execute
the server permission
it must be under the home is provided for them because the
directory idea is
in contrast the that the files that are stored under
root directory something where the
all the CGI bin directory they are meant
files related to the web server to be
will be executed they will get executed if
stored some of them maybe you
your home is have a gate or a post command
actually webpages some may which is
be other actually specifying a query string
miscellaneous files also so and a
typically script which is located under the
the home directory can be CGI
something as bin directory for example so all
home httpd Docs maybe and these
optionally files must have the execute
there can be another directory permission
under the whenever they are specified the
root under which all the so- programs
called will start executing okay so the
common gateway interface or directory structure looks
CGI script something like
this so on top will be having returned by the server if you are
HTTP root not
under which all the HTTP specifying the document explicitly
drifters and for
folders will be created there example you consider a request
would be like this
the home directory CGI bin get you are simply specifying the
directory name
there can be other directory of a site you are not specifying the
some may be name of any file or the pot name
simple documentation some of that
may be some file directory structure so just as
other library files etcetera and specifying www dot X Y Z dot
your com
web page or website that you're what this command will actually
designing that will be under mean is
this HTTP that the request will be sent to the
home okay so these wave web
folders which server of course and the web
are shown here they will server what
contain the it will do
directory tree structure of your we'll search in its own directory
so structure under the web root and
called we'll
web site this is how the files try to find out whether there is a
are the file
directory folders are located or with that default name present in it
organized in addition there is if
something it is found that default file name is
called a default web page returned to the requesting client
which is and
supported by all all web usually the default file name is
servers there index
is some default web page that dot HTM or index dot HTML they
will get refer to
an HTML document now now written in any language you want
it is possible so this
to change the name of this actually refers to a file that will be
default file executed by the server and the
directory because there is output of
something execution will be sent back to the
called server script client this is how the scripts work
configuration there but
is a configuration file where a how do the server know that
number which script
of options are there you can to run and how to get the input
simply open data and
that file and edit so in that file where to send back the output well
there there
is one line which specifies are two ways the server script may
what is the start
name of your default page so executing in response to either a
instead of get
index dot HTM you can HTTP command where there is a
change it to for question
example default dot HTM so mark in the command line or a
that will be post HTTP
your default base in that case command now we shall see this in
now detail
talking about the scripts the first let us look at the gate
first command
thing our scripts is that they are with a question mark so an
residing on the side of the example is
server they shown here
are server-side scripts and as and so recall get command with a
I've question mark means that
mentioned these scripts they're whatever
nothing follows the question mark this will
but a program this program represent a so-called query string
may be may be so
there will be a number of name to be sent back now if you look at
and value what
pairs separated by ampersand happens internally the server has
for example to
role is a name 1 2 3 4 is the identify this question mark in the
value sex query
is a name M is the value so in the total command line if it is a
there can be gate command and if it finds a
any number of such name question
value pairs you mark then it identifies that
can put in separated by whatever
ampersand and file name is specified before that
whatever comes before this that
question mark is actually a program which is to
this does not refer to a width be
page executed now it starts executing
rather this refers to an the X Y
executable file Z dot does not come this X Y Z
or a script this is how the client dot PL it
can starts executing the X Y Z dot PL
specify which program to run program now the program is
on the written in
server side so you explicitly such a way that it can read in the
specify values of this name value pairs
the name of the script so here which
for are supplied as part of the
instance you are referring to a parameters
file now how this values can be read in
called X Y Z dot PL which is this
residing we shall be discussing later not
under the CGI bin directory now and
this file again the output generated by the
needs to execute it and the XYZ
output has dot PL program that will be sent
back to
the client and as it said data to the web server but in post
typically the again
output is generated in the form the name of the file that you
of a specify
HTML page so that when it is that will be the executable
sent back program ok
to the browser the browser can and here there is one difference
displayed from
a suitably formatted way on the gate is that you do not limit the
screen number
now if it is a post command it of such name value pairs or the
is in a total
voice similar to get but the size of the string that you can send
difference ok
is that the name value pairs and here again the executable
which need program
to be taken as input to the which runs can read in the data
program are values
not present on the command but how this again we shall be
line rather talking
they are present and as data about later because we know that
following the
one or more header lines and a program has to execute it we have
blank explicitly named the program as
line so there will be a number part of
of header the command but when the
lines after the header line there program
will executes how to get the values of
be a blank line after the blank those
line all name value pairs this we shall say
the name value pairs will later
appear ok this when we talk more about the CGI
is the format in which post scripts
sends the and and the way the works and
how they
are actually written ok so an stands for common gateway
example of interface
the post command is shown now these executable programs
here so the can be
first line is the actual post potentially written in any language
command of
which specifies out here the your choice it can be written in
name of the some
CGI script program the name shell script
of the this can be see shell bone shell
executable here the name is my conch
script shell or any other shell it can be
dot CGI this is the name of the written as pearl pearl is a popular
executable file then there are choice for many it can be written
some using
header lines followed by a some scripting language like ASP
blank line or PHP
out here then the name value these are also quite popular they
pairs now may be
this name value pairs can written in in conventional
appear in as programming
many lines as you want languages like C or Java but one
not necessarily they will have thing
to appear you remember in whatever
on a single line you can break language you
it up write the program you must ensure
into your hindrance if you want one
okay now thing that the program when it is
there are a few points which executed on the server side it must
you need to have
remember first thing is that the some support for execution for
executable program that we are example
talking if it is a C program then there has
about the so-called CGI script to
CGI
be a C compiler to compile that have to run it through iis
first if now let us very quickly look at
it is a Java program there has what is
to be a a proxy server and why we use it
Java bytecode interpreter if it is for
a what are the facilities that a proxy
Perl program there has to be a server can provide now a proxy
Perl server we
interpreter so in this way so to had mentioned before that it acts
run a as an
script written in a particular intermediary between a client and
language a
support for that particular server typically in the internet
language scenario
should exist on this side of the the client will be a web browser
server like
this is what you have to Netscape like Internet Explorer the
remember for web
example SP a program written server can be some site from
in ASP it which you
can be run under the Internet are trying to access a page this
Information Service IAS which web
is server is sometimes also called
available under the windows origin
but you server that is the origin of the
cannot directly run it under the document on the resource you are
Apache you are
web server because I is by trying to access now in this
default scenario
supports a speii it can interpret you are having the access through
ASP the
commands directly that is why proxy server which is intercepting
when you all
have and a program within a your requests okay so whenever
spiel you you want
to send a request to the outside receiving a command from a client
world then
your request will first be sent it acts as a web server to the client
to the as
proxy server the proxy server if the client is sending a request to
will be the web server so the proxy server
sending the request on your accepts the request as if it is a web
behalf to server
the outside world this is how but it is not processing that request
the proxy directly and locally rather it is
server works but let us see how forwarding the request to some
well the origin
first thing as I said that it acts server or web server which is
on outside
behalf of other clients and the network now while making
presents this second
requests from other clients to a part of the request the proxy server
server acts as the client and the server
the clients can be on one side located outside that acts as the
of it and HTTP
the server is located on the server so a proxy server has a dual
other side role
of the proxy server now sometimes it is a client sometimes
depending on it is
which mode it is in whether it a server and the most commonly
is used HTTP
receiving a command from a proxy server is a program called
client or squid
sending a request to an external which is freely available and it can
server be
it can sometimes act as a web installed on almost all platforms
server diagrammatically a proxy server
sometimes act as a web client looks
how see like this typically these huge user
the proxy server whenever it is
agents which are shown on this the origin server so the origin
side this server
part belongs to a private after processing the request will be
network this sending back the response to the
is a private network say in proxy
these are the proxy intern will be sending
three computers which are back
located inside the request to the original
the private network these user requesting
agents user agent this is how it works
are nothing but maybe these now now
are simple in addition to this simple request
browsers there are some forwarding and response receiving
commands which a
have been typed on the proxy server typically also
browser and they contains
are possibly referring to some some access rules and cache this
origin we
server maybe this is yahoo.com shall be talking about very shortly
there can these are some additional
be one origin server there can information
be which are maintained inside a
several such origin servers proxy
okay what I server so talking about the
am showing just one origin functions of
server in a proxy first one we have already
this diagram just to illustrate so mentioned it forwards a request
the see when it is forwarding a request
user agents will be sending the it
request also acts as a simple and
to the proxy rudimentary
so requests will be coming like firewall it can allow some requests
this the it
proxy will be forwarding the can deny some requests when
request to someone from
outside is trying to access an by mentioning a list of strings
internal which
node your proxy can stop it so are okay you can say you can only
these access
kind of capabilities can be sites which contain the strings or
programmed access the sites which does not
in the proxy so it can act as a which
simple does not contain the strings so is
firewall and you can have that
access control kind of either way you are
through a proxy access control allowing or
means you denying based on some contents
can allow or deny certain similarly
accesses based you can also control access based
on contents based on location on
now when some location you can specify that
you say based on contents it these
may be are the websites I do not want
based on some string which anybody
appear in the to access from inside so these are
documents which are trying to some
fetch websites which are blocked okay
maybe some string patterns in this
the kind of things can be done very
website name which are trying easily
to access the third thing is that a proxy
depending on the policy of the maintains a HTTP cache
installation you can set some what the cash means is that see
rules that httpd
somebody should not be able HTTP requests are coming to the
to access proxy
this kind of sites or these kind proxy is forwarding the request
of and is
contents typically these are getting back the requester
specified information
maybe the web pages from the reason why we use a net or many-
servers fold
these pages are forwarded back well in the simplest scenario a net
to the allows a single device the single
requesting client but what the device
proxy can be a router it can be a
does is that it also maintains or dedicated
keeps box see this router can act as the
a copy of these pages in its net
local disk this dedicated box can also act as
there is a disk array which is in at
called a these are available commercially
cache where these are so what
maintained or we are saying is that we are
stored the idea is that if some allowing
client this device to act as an
requests for a page which is intermediate
already agent between the internet and a
there in the cache it need not local
send out network now the local network
a request outside and get that were
page calling or we are referring to as the
again it can be directly private network and the internet or
followed it the
from the local cache it of external network were referring to
course saves as
bandwidth and allows for faster the public network now NAT sits
access between
okay now let us talk about a the public network and the private
very network so you may argue that
important device which is used well it sounds very similar to a
in the proxy
Internet this is called a network server but well there are some
address translator or a net now differences this will be clear as we
the go
into the details in the working can have a look at it 1 6 3 1 is the
of the number of the document now if
net C net does not only you are
regulate access using NAT then potentially one
it also manages IP addresses single
see one big unique IP address is sufficient to
problem that many of us face provide connectivity to an entire
today is group
that suppose if we have an of computers of course there are
organization several
which contains say 1000 variations which are possible but
computers but we in
do not have 1,000 valid general even if we have a single IP
registered IP address with you which is a
addresses with us which we registered
can assign to IP address that may be sufficient
these computers rather the for
internet your organizational requirements
service provider through which to have
we have access to the outside world but
obtained internet connection there
they give us only a set of few are some restrictions and we just
addresses see
so how we can manage with later that not all kinds of access l
these few or
addresses NAT is one such maybe accesses from inside the
solution okay network
so NAT tries to address the IP to outside will be allowed but not
address the
distribution problem the way reverse someone from outside
net is your
specified in twerks is specified network may not be able to
in a in directly
an RFC document if you're connect to a computer inside ok so
interested you as I
mentioned NAT resides remember this is a one-to-one
between a private network and mapping
the public which means that if we have n
network which is the Internet number of
now NAT is available as a unregistered IP addresses on n
separate box machines
from the network vendors most then to provide static NAT you
of the would be
routers which also connect up a requiring n registered addresses
private what
network with the public this means is that say internally
network they suppose you have 10 computers
also have the capability to act and you
as a NAT have 10 registers IP addresses with
so NAT can be embedded you
inside a router NAT will provide a
or you can have a separate box correspondence
that can between the internal computers
act as a NAT now let us see and these
what are the IP addresses so that with this IP
various forms of NAT network addresses they can access the
address outside
translation static net well as the world now static NAT is almost
name similar
implies were trying to provide to providing this addresses directly
a static to
address translation so what the computers ok so it is not much
you're useful
trying to do is that you are other than some very specific
trying to needs
provide a mapping of an where you want to assign some
unregistered IP fixed IP
address to a registered IP address to some of the computers
address you inside
like for example inside your registered IP address from a given
network pool
there is one computer which is of registered IP addresses what I
the mean
webserver and you want the to say here is something like this
outside users suppose I have with me 10
that means users or people who registered IP
are address suppose I am the net I
deciding outside your network have 10
they registered IP addresses with me
should also be able and on
to access your web server so the other side in the public
you show network
your web server must have a there are 100 computers so
statically whenever I
assigned IP address okay but get a request from one of the
for others computers
you may not need this for in the private network I assign one
others you of
have alternatives one this 10 addresses to that computer
alternative is to and
go for dynamic network as long as the request is being
address processed that address will be
translation dynamic net statically assigned to that
dynamic net also computer but
provides or maps an once the request processing is over
unregistered IP that
address to a registered IP address will again be de-allocated
address but and
the difference from static net is will be returning back to my pool
that so with this scheme I can have 10
here you do not have any one- simultaneous access connections
to-one at the
mapping rather here you are same time but we are not limiting
getting this the
total number of computers that computers they are somehow
can access
possibly have connections to permissions are generated
the outside dynamically
world in fact hundreds or even this again is used to map multiple
thousands unregistered IP addresses to a
if there are thousand computers single
they can registered IP addresses see here
have access but not more than there
10 at a is a difference you have a single
time registered address not multiple as I
I have only 10 valid addresses was
with me discussing in the previous case
and I am allocating them based there is
on demand a single valid IP address available
so this addresses are assigned with
dynamically you can have any me but I can support hundred
number of simultaneous requests from the
computers but you will be private
having a limit network how I can do this I can do
n depending on the number of this
addresses by using the port numbers so here
you have to the number I am
that can communicate at a using port numbers the different
given time requests will be using different
there is another form of net port
which is numbers because we are using
perhaps the most popular this ports to
is called distinguish the requesting
overloading this in a sense is a computers
special this method is also sometimes
form of dynamic net because called
addresses port address translation or p80 in
are not assigned statically to short
the so effectively in this scheme each
computer on the private with a single remote computer but
network will get several connections can be
translated to the same IP maintained by
address only using different port numbers like
difference is that they will be for
having a example I can have a connection
different port number okay so with a
with this machine X but effectively I can
kind of a scheme you are no have 100
longer connections with X if I if I use 100
limited by the number of IP different port numbers okay now
addresses each of
you have you can have as these hundred connections may
many refer to
simultaneous connections you some different server programs or
desire may be
using this scheme okay this as I the same server program there are
said multiple requests coming to it I
this is widely used so let us can has
look at different port numbers to
NAT overloading in some distinguish
detail so as I right okay now just recall that the
said that using multiple port IP
numbers packet header well including the
you can support several extension header this will contain
simultaneous the
connections this is what is source and destination IP
called addresses and
multiplexing in the transporter the port numbers so the
level of combination of
the tcp/ip protocol stack these four elements will define a
multiplexing means that a complete connection so even if the
computer source IP address and destination
maintains several concurrent IP
connections
address is the same if we can this ATT will have to be
very say maintained by
for example the source port the router or the network address
number then translator while it is carrying out
this for couple will still remain the
unique address mapping and also the port
maybe the other three tuples mapping well now let us look at
have the the
same values but at least one of issue one by one suppose we want
the to
values of the four things must implement simple dynamic net no
change overloading for the timing okay
between the different simple
connections this dynamic NAT means I have a pool
is how we can ensure that of IP
multiple addresses if there are n addresses I
connections can be established can
now some notations we define support n simultaneous
something connections okay
called stub domain stub so for implementation of dynamic
domain means the NAT let
private network so the domain us try to see what should the ATT
which is contain the ATT need only contain
behind the net which is as part the IP
of the addresses of the source and the IP
private organizational network address which has been allocated
that is like
your stub domain and for net you try to understand some
for this computer had
address translation we must sent a request to the NAT that
maintain a computer
table which is called address suppose had an address 10.5 dot
translation table or in short 6.7 say
ATT the NAT assigns a valid address to
it
and in the table makes an entry if you are saying that the request is
that coming with a $10 dress which
10.5 dot 6.7 has been assigned you may
and recall that refers to a private
addressed this so for all the address
requests maybe the external routers will be
which are coming there will be discarding them okay so the
an packet may
intrument in in this table now not reach the net at all
what this so what you can do instead of
table will allow it will allow advertising this private address to
outgoing the
connections of course but it outside world
will also you tell the Oxford Wall that well
allow incoming connections my
why say as net has given me this IP address
long as an entry like this and has
remains in assigned me this so you please
the table you can have a connect
connection from me through this valid IP address
the outside world coming to maybe
you if you they'll be a valid IP address 2203
see that that request is destined dot
to an ten dot 5.17 or something like that
address which is called 10.5 the
dot 6.7 outside agent will be using that IP
then you can possibly followed address the ATT will provide the
that translation and will be forwarding
request to the destination the
machine request to the internal machine
because you know that this internal
particular host so using dynamic address
address is there but there is a mapping
problem you can have some of the entries
in the
table fixed statically say for the needed but when you talk about
web neck
servers I give an example overloading you require port
where you need numbers the
a permanent address which is scenario is like this the internal net
known to over that said it possibly has
everybody but the other non-routable IP addresses or
addresses can be private IP
dynamically assigned I addresses which if it appears as a
changed during destination address in a packet a
the duration of a connection router
only so in will ignore it a router cannot
this way you can have the best follow a
of both packet to an address which is a
worlds you can have some private
addresses which address it will simply ignore it
you need to be accessed from NAT
outside and enable routers or an Add box will
with the other IP addresses contain a registered IP address
available which
you can provide dynamic will be assigned by the internet
access from the authorized access provider address
internal nodes but you cannot provide
have the Eenie so the sir is one single IP
other around a note from address will be sufficient now
outside a host suppose
from outside cannot directly the scenario is like this an internal
access an host say X tries to connect to an
internal node if it does not have outside web server so the request
a will
statically assigned IP address first reach the router the router
stored in will
the table okay fine receive this request packet from X
now in this scheme port okay
numbers are not
the router will now save the IP the destination port number some
address internal computer was sending the
of the requesting computer this packet
is a to the router or the net the now the
private IP address please recall NAT
and the changes the address of the packets
port number which the to
computer was using some address of the outside or also
while sending this request this the
can be address of the source is changed
obtained from the packet that because
was the request has to come back okay
received from X it saves this to now if
into the source address still is that
the table address translation private
table and address the request cannot come
in the packet it will replace the back so
IP it changes the source address by
address which was the private the
address valid IP address that the router
with the routers IP address contains and also port number is a
replace the unique number that it generates
port number by the port automatically so on the other hand
number if the when
entry was already in the table a packet comes back the
or if it destination port
is a new connection you are number of the packet is used to
trying to search
make to generate a unique port the ATT so destination port
number so number as I
you are basically modifying a mentioned was assigned
packet by automatically and
changing the destination IP uniquely so that port number will
address and uniquely identify an entry in the
table
that you can say that will act as stored and also the port numbers
a which
primary key of that ATT okay the source computer were it was
so from using
that table you can obtain the the NAT IP address there is only
source and one
port numbers source address address so this will be the same
and port and
numbers you can accordingly then NAT
change the generates unique port numbers for
source addresses of the IP every
packet and outgoing packet so if whenever an
finally you can forward the incoming packet comes it will
packet to come with
your to the host which was this particular address as the
there in the destination address but this port
internal network so finally the number
packet will be the distinguishing factor so
will get forwarded to the whenever it is coming to port
computer from number two
when the request had then through this table lookup
originated so a NAT will
typical table this this address change this address to this
translation table may look like particular
this address and port number two to
well the first column is not port
really number seventy-five and will be
necessary but for forwarding the packet to the
documentation purposes internal
it is sometimes kept source network this is how through this
computer table
names are stored here when a the net can provide address
request translation
comes the source computer dynamically but one thing you
addresses are remember
this overloading all although it the maximum number of
appears concurrent
to be a very powerful translations that our net may
technique but the provide
only problem is that you this is primarily determined by the
cannot allow a memory size the size of the
permanent address through memory that
which an we use to store this table just to
outside host can access access show
a means a simple calculation but typical
one of your internal servers entry
suppose you in the ATT may take around 160
have one web server you want bits so
to have a if you have 8 megabytes of
public IP address available to it memory
through net you cannot do that available with you then for every
because request we'll be needing about 20
all requests are bytes
processed dynamically by so if we make a calculation these
assigning a are
port number to it so if we want the total number of bits divided by
to have 160
this kind of facility also then this will come to more than 4
you have lakhs
to mix static net and this kind concurrent translations which
of means you
overloading where some can have so many entries in the
entries in the table
table will be permanently fixed potentially and port number will
some never
entries will be assigned port be a constraint for you because
numbers port
and processed dynamically number is a 16-bit number you can
talking about have
up to 65,000 distinct port that private network has to be
numbers okay there in
so the number of distinct the source part which the routers
numbers you will
can have that will ultimately ignore so from the private network
provide you
the upper limit and talking can
about which reach an outside host but not the
addresses to use in the private reverse in order to achieve this
network you
there are some private address have to have a proxy server or a
classes net
which also had mentioned sitting in between the private
before let us address
very quickly brush through it classes just to brush up there is
this has one
will set aside by the address class address 10 dot there are 16
assignment Class
agency as non-routable means B addresses 172 dot 16 through
these are 172 the
unregistered routers will 31 there are 256 Class C addresses
discard this 192
addresses if they are used as 68 0 up to 255 so many addresses
destination which means that a are
packet available to be used as private
from a host within a private addresses depending on the size of
address can your
reach a registered host but not organization and requirements you
the can
reverse possibly select one of these and
because if you are trying to use a
have the proxy server or an 18 can you give
reverse connection then the this
address of to provide access to the outside
world
now other benefits of NAT static and dynamic address
well NAT mapping to
automatically creates some have this flexibility some address
kind of a statically assigned some address
firewall between the internal dynamic
external a question which sometimes arises
networks that
why because NAT only allows is net and proxy server the same
connections but
that has originated from inside technically speaking although they
and work
outside hosts just I've in a similar way they are not the
mentioned cannot same
directly establish a connection why the main difference is that net
with the is
internal hosts because an transparent to both source and
internal host destination hosts neither the
is having a private address and source not
an the destination need to know that a
outside host cannot directly net
specify is present but rather in case of a
that public that particular proxy
private server
address to initiate a connection for example if you are if you're
so for accessing the internet through the
cases where you need proxy
environment mapping server you have to explicitly
as I mentioned just for web mention
server for the name of the proxy server and
example you need static the
address port number it is using in the
assignment in those special configuration for your browser
cases so in that is
general you can have a something which is not transparent
combination of which
you must explicitly specify that completing a transaction and no
this is history
the proxy server I want to use is maintained but again you just
and and recall
the another difference is that we had mentioned that you can
networks have an
in the network layer and a option either close or keep alive or
proxy server you
works at the transport layer or can specify whether you want
above so these kind
with this we come to the end of of stateless transaction or
today's connection
lecture we shall be now as default or you want to have a
looking at the persistent persistent connection
solutions that we pose for the but the
problems connection will remain active over
of the last lecture and we shall successive transactions or requests
also be what
presenting some quizzes for is a hypertext hypertext is a text
today so let which
us first look at the solutions to contains some documents or text
the of
quiz questions on our previous course it also contains links to
lecture other
the first question was why is texts these links to other texts are
the called hyperlinks now in the cont
traditional HTTP protocol in
called Hindi in the context of the World
stateless this server mentioned Wide
that it Web the pages that we see on the
is stateless because the HTTP browser
server they are mostly hyper texts
immediately closes a they are usually typically written
connection after in
HTML there are other of a client request how can the
technologies also gate
but hTML is most popular command be used to submit forms
what is the well
default port number of HTTP this say again we are mentioned
which is today by
port number 80 what does the including a question mark after the
client path
request - HTTP server name and including a query string
comprised of it after
consists of several things that question mark what is the
request purpose
method path portion of the of the head command to return the
URL and the header
version number they must information of the specified
appear on the document
same line depending on the because in many cases the client
command does
depending on the request not need to have the full document
method you may rather the header information this
have optional request headers may
if you be used for a number of wins
have an optional request header applications cases there is one
then application I can decide for
there will be a blank line instance in
followed by case of the web search engines
some additional data if you when they
want for try to maintain an update their
post and put request methods database
you need they simply look at the header
this additional data so this all rather
these than the complete document so the
things taken together are the header
components should contain some information
which
may be useful for the search following the header lines what
engine to does the
update its database in what connection field in the SD be
way is requested
forced different from gate I signify well it specifies whether
when data has you
been sent to a common want to have a stateless kind of a
gateway interface communication or so-called
script well if you recall in post stateful
we do whether you want to close the
not send data as part of the connection
header line immediately after transaction
rather there will be the header whether or
lines whether you want to remain or
then there will be a blank line retain the
as the connection across several
delimiter following the bank transactions
blank what does a typical HTTP
I will specify the query string response
now now consist of response is similar to a
in case of post the size of the request only difference is that the
query initial request header is not there
string can be larger than get but
forget it in place of it there is a initial
is limited to the maximum size response line following the
of this response
string that the machine where line there will be some header
the server lines the
is running supports typically it blank lines followed by the
is 256 requested
256 characters how are the data data so the remaining part is quite
sent in similar to a request the initial
post command well after the response line is only different
blank line what are
the basic differences in HTTP 1.1
version from 1.0 where the now the questions from today's
differences lecture
are host identification defaults well which HTV commands can
support result in
from persistent or keepalive execution of server-side scripts
connection what
content negotiation requests a are the differences between root
part of directory and home directory no
the document caching these are web
the server installation what are the
additional features which the main
version purposes behind the use of proxy
1.1 supports how does a proxy servers
server act name two web servers and one
both as a client and a server proxy
well it is server that are widely used in
a server when it is receiving a static
request net on what factors with the
from an internal client it is a number of
client registered IP addresses depend on
when it is forwarding the for
request to an NAT overloading what are the
external origin server what is typical
the URL entries in the fields of the address
syntax for FTP for FTP it will translation table which of the
is fields
starting with FTP dental would not be required if it is only
specifying the required to implement dynamic
username and password net can a
followed by colon machine with a private IP address
then is at the rate sign symbol communicate with the public host
followed in the
by the pathname of the outside world so these are the
document you are questions
going to transfer
from today's lecture in our next the basic structure of an HTML
lecture document
we shall be starting our next what are the different things what
module on are
webpage design we shall be the different so-called tags and
starting with attributes that a typical HTML file
discussion on the hyper text can
markup contain and we shall see in our
language HTML which is so subsequent lectures what are the
popularly used other
for designing the web pages features that you can support as
that we part of
shall see in our next class thank HTML so the first thing is that
you hTML the
today we shall start our film is hypertext markup language
discussion on so
HTML which is the de facto there are temples to this name one
language for is
designing web pages although hypertext other is markup well
today we hypertext
have several other alternatives we had already talked about earlier
available with us but still hypertext is a kind of textual
HTML remains document
one of the most popular where you can have links to other
choices when it documents in HTML this kind of
comes to the design of web links are
pages so allowed so in that sense hTML is a
could actually we shall be hypertext document
starting with

You might also like