You are on page 1of 53

Internet & Web

Technology
Internet
 The network formed by the co-operative
interconnection of a large number of
computer networks.
 Network of networks.
 No one owns the internet
 Every person who makes a connection
owns a slice of the Internet.
 There is no central administration to the
Internet
Network of Networks

NW-4

NW-1

NW-3
NW-2
So Internet ….
 A community of people
 A collection of resources
 A setup to facilitate collaboration
 Use the of standard protocol - TCP/IP
protocol.
The Web…
 …is a distributed document delivery
system that uses Internet protocols
 …links documents stored in computers
communicating by the Internet
 Main authority is the W3 Consortium
www.w3.org
Layered Network
Technology
 Open systems interconnection (OSI)
reference model.
 Seven layer model.
 Communication functions are partitioned into a
hierarchical set of layers.
 Objective:
 Systematic approach to design.
 Changes in one layer should not require
changes in other layers.
OSI Model – 7-layer
Layer Functions
 Physical
 Transmit raw bit stream over a physical
medium.
 Data Link
 Reliable transfer of frames over a point-to-
point link (flow control, error control).
 Network
 Establishing, maintaining and terminating
connections.
 Routes packets through links.
Layer Functions (contd)
 Transport
 End-to-end reliable data transfer, with error
recovery and flow control.
 Session
 Manages sessions.
 Presentation
 Provides data independence.
 Application
 Interface point for user applications.
Network data flow
TCP/IP Model
TCP/IP Model – Data flow
TCP/IP Family
Communication between
Applications
Basic Definitions
 Web server – machine that services Internet
request
 Web client – machine that initiates Internet
request
 Browser – software to interact with Internet
data at the web client
 TCP/IP – internet data protocol
 FTP – internet file transfer protocol
 HTTP – hypertext transfer protocol
 HTML – hypertext markup language
Servers and Clients
 Servers – computer systems at the end of
a network that store files and provide
other services

 Clients – computer systems that are end


points for users of the data
Client-Server Model
 Standard model for developing network
applications.
 Notion of client and server.
 A server is a process that is offering some
service.
 A client is a process that is requesting the
service.
 Server or client may be running on different
machines.
 Server waits for requests from client(s).
Client-Server Model (contd)
Client-Server Model
Typical scenario:

 The server process starts on some computer


system.
 Initializes itself, then goes to sleep waiting for a client request.
 A client process starts, either on the same system
or on some other system.
 Sends a request to the server.
 When the server process has finished providing
its service to the client, the server goes back to
sleep, waiting for the next client request to
arrive.

The process repeats.


Client-Server Model & WWW
 Cloud model
 TCP/IP
 HTTP and MIME (Multipurpose Internet Mail Extensions)
types
 FTP
 Protocol stacks
Client-Server Model
Internet Model Layers
Application layer
Communication services (FTP, telnet, e-mail)
Transport layer
Transmission of messages end-to-end
Network services layer
Transmission of messages sequence of links
Data Link layer
Transmission of packet across one link
Physical layer
Where the signals move
Internet Layer Model
Application layer http ftp smtp telnet rlogin

Transport layer TCP UDP

Network Services IP

Data Link layer LAN link

Physical layer Physical Connection


Application Layer
 FTP
 HTTP
 SMTP
 Telnet
 etc.
TCP/IP Model
 Suite of protocols made the standard for the
Internet

 facilitates communication between


heterogeneous and similar networks that are
connected together

 reliable, connection oriented, byte stream


protocol
Transport layer: TCP & UDP
TCP UDP
 transmission control
 user datagram protocol
protocol  connectionless
 full duplex byte stream
 no acknowledgements
 no flow control
 virtual path (connected)
 no resending of erroneous
 error free packets
 uses  some error detection
acknowledgements  16 bit port addresses
 16 bit address of ports
Data Flow and Headers
Network Layer: IP

 Delivers packets up to 64 Kb, 1 at a time


 Each packet has a header
 sending host and intended host network
addresses
 32 bit addresses
 IP layer (like UDP)
 unreliable
 connectionless
Data Encapsulation
TCP/IP applications
TCP/IP software usually includes:
 remote terminal client using TELNET protocol
for remote login
 electronic mail client using SMTP protocol to
transfer e-mail to remote system
 file transfer client using FTP protocol to
transfer files between two machines
HTTP - HyperText Transport
Protocol
 Native protocol for WWW
 Sits on top of internet’s TCP/IP protocol
 HTTP is a four step process per transaction
 Uses a predefined set of document
formats
HTTP - contd
 Hyper Text Transfer Protocol
 A protocol using which web clients (browsers)
interact with web servers.
 It is a stateless protocol.
 Fresh connection for every item to be
downloaded.
 Transfers hypertext across the Internet.
 A text with links to other text documents.
 Resembles a cob-web, and hence the name
World Wide Web (WWW).
HTTP - contd
HTTP
Connection

1. Client
 Makes an HTTP request for a web page
 Makes a TCP/IP connection
2. Server accepts request
 Sends page as HTTP
3. Client downloads page
4. Server breaks the connection
HTTP is Stateless!
 Each operation or transaction makes a
new connection
 each operation is unaware of any other
connection
 each click is a new connection
HTTP Header fields
 General-header fields
 used for both requests and responses

 Request-header fields
 used for responses
 extra client information for use by server
 optional
Full Request
 Uses HTTP version and more methods
 method tells server what to do to the
resource requested
 Methods
 GET
 POST
 HEAD
GET Method
 Request server to retrieve object specified
 conditional GET
 request message includes
 If-Modified-Since in header
HEAD Method
 Like GET but does not return the object
 returns a header about the resource
requested (meta information)
 good way to test link validity
POST Method
 Include an object in the request
 server should use that object in processing
the request
 must include a Content-Length in header
HTTP Response Message
 HTTP protocol version
 3 digit status code
 reason phrase
 CRLF
 optional header fields
 CRLF
Understanding STATUS
Codes
 1xx – for information only
 2xx – action successful
 3xx – further action needed (redirect)
 4xx – client request error
 5xx – server error
HTTP Transaction
1. Client and server establish a connection

3. Client makes a request

5. Server makes a response

7. Server terminates connection


 Step 1 establish connection
 TCP/IP connection set up
 uses a port number as application reference
 usually port 80
 ports ≤ 1024 are privileged (>1024 are open)

 Step 2 client request


 HTTP message sent with a request line
 request-line = method URL HTTP version
 Step 3 Server response
 server sends HTTP message and optionally
requested data
 resp-message = HTTP version status code
reason-phrase [optional stuff]
 Step 4 connection terminated
 usually the server
 sometimes the client “stops” it
 anything else, whoever notices terminates
Some Port Assignments
 21 FTP
 23 Telnet
 25 smtp (mail)
 70 gopher
 79 finger
 80 HTTP
World Wide Web (WWW)
 Where do the documents reside?
 On web servers.
 Also called Hyper Text Transfer Protocol (HTTP) servers.
 They are typically written in
 Hyper Text Markup Language (HTML).
 Documents get formatted/displayed using
 Web browsers
 Internet Explorer
 Netscape
 Mosaic
 Konquerer
Requirement of Web Server
 Simple requirements:
 Able to accept HTTP requests, and respond to
them.
 Support for GET and HEAD, possibly also
POST.
 Able to handle server-side scripts.
 Executables residing on the server.
 They get executed when specified.

 Their output sent back to the client; typically as a

HTML page.
Web Server directory
structure
 When a web server is installed:
 A http root directory gets created.
 For example, “/home/httpd”
 There is a directory under the http root that
acts as the http home directory.
 For example, “/home/httpd/docs”
 There is a directory under the http root under
which all the CGI and other scripts are to be
stored.
 For example, “/home/cgi-bin”
 Server-side exec permission provided
Web Server directory structure
- contd
Default webpage
 There is a default web page that gets
returned by the server if no explicit
document path is specified.
 index.htm or index.html.
 Any other name can also be specified through
server script configuration.

 Can be accessed as:


 GET www.xyz.com HTTP/1.0
Proxy Server ?
 What is a proxy server?
 Acts on behalf of other clients, and presents
requests from other clients to a server.
 Acts as a server while talking with a client, and
as a client while talking with a server.
 Commonly used HTTP proxy server:
 Squid
 available on all platforms.
Proxy Server

You might also like