Transcript Get|Post
GETTING CONNECTED
Session III
11:15 - 12:15
Dr Deepak B Phatak,
IIT Bombay
MODERN INFORMATION
DELIVERY MECHANISMS
Early
Networks
Modern Network Components
Emerging Network Scenario
Dr. Phatak, IIT Bombay
Getting Connected
2
EARLY NETWORKS
Computer
–
to Devices
RS. 232, Parallel Centronics port
Computer
–
to Intelligent Devices
Escape Sequences, Disk Read/Writes
Computers
Dr. Phatak, IIT Bombay
to Computers
Getting Connected
3
LOCAL AREA NETWORKS
Within A Building,
Campus
Ethernet, Packet Switched Network
TCP/IP Protocol
IP Address 144.16.111.248
Typical LAN 10/100 Mbps
Network Switches, Hubs
“Nodes” Connected Through RJ42
Dr. Phatak, IIT Bombay
Getting Connected
4
WIDE AREA NETWORKS
Same
Principle, Stretched Across
cities, countries and the globe
Variety of Media
– Telephone lines (PSTN)
– Microwave, Radio Links
– VSATS
Dr. Phatak, IIT Bombay
Getting Connected
5
MODEMS AND DATA
COMMUNICATION
Modulation
Standards (V.32, V.32bis,
V.fast)
Interface Specifications (RS232, V.24,
X.21)
Error Correction (MNP Class 4, V.42)
Data Compression (MNP Class 5,
V.42bis)
Dr. Phatak, IIT Bombay
Getting Connected
6
ASYNCHRONOUS DATA
TRANSMISSION
High Overhead (20%)
Slower Speeds
Simpler Circuitry Lower Cost
Dial-up Lines
Dr. Phatak, IIT Bombay
Getting Connected
7
SYNCHRONOUS DATA
TRANSMISSION
Low
Overhead (Much Less Than
20%)
High Speeds
Complex Circuitry Higher Cost
Leased Lines
Dr. Phatak, IIT Bombay
Getting Connected
8
SATELLITE
COMMUNICATIONS
History
Sputnik (1957), Explorer (1958),
Intelsat, Comsat, .... INSAT
Geo-Stationary Orbit (35,680 km)
Footprint (30% of Earth’s Surface)
Low-Orbit (Iridium, Inmarsat)
Rotating Antenna, Out Of Range?
Dr. Phatak, IIT Bombay
Getting Connected
9
SATELLITE
COMMUNICATIONS
Frequency
Bands (Transponders)
C Band Clashes With Terrestrial
Radio
Ku Band Affected By Rain
(Dampening)
Dr. Phatak, IIT Bombay
Getting Connected
10
MODERN NETWORKS
Content
Independent Delivery
Mechanism
–
Like Postal Service
Addressing
Dr. Phatak, IIT Bombay
and Connectivity Issues
Getting Connected
11
MODERN NETWORKS
Bandwidth
–
–
–
needs
CD audio 706 kbps, Digital Phone 64
kbps
Motion Video 96 Mbps
MPEG-2, 6 Mbps
Dr. Phatak, IIT Bombay
Getting Connected
12
MODERN NETWORKS
More
–
–
–
Bandwidth Issues
Bandwidth on Demand
Virtual Circuits
Isochronous Network Environment
Needed (Low and Predictable Node to
Node Delays)
Dr. Phatak, IIT Bombay
Getting Connected
13
MODERN NETWORKS
The
Glue That Holds Things
Together
–
–
Software in Switches, Routers
Protocol Stacks (Software) Within a
Computer
Dr. Phatak, IIT Bombay
Getting Connected
14
EMERGING NETWORK
SCENARIO
Indian:
64 Kbps, 2 Mbps
Global: T3, E3
Address Bottleneck, IP-V6
Frame Relay
ATM - the Ultimate Winner?
Dr. Phatak, IIT Bombay
Getting Connected
15
LAN-WAN DIVIDE
Why?
– Functionality Same
– Move Bits From Point A To Point B
Obvious
Differences
– Distance, Ownership
– Speeds (10 - 100 Mbps Vs Kbps)
– Protocols
Dr. Phatak, IIT Bombay
Getting Connected
16
LAN-WAN DIVIDE
LAN
Is Shared Media
WAN Is Point-to-point Link
No Buffering Needed For LAN
Memory Needed In WAN Routers!
Dr. Phatak, IIT Bombay
Getting Connected
17
EVOLUTION OF INTERNET
ARPANET
of 60’s
TCP/IP included in BSD UNIX
Extensively Used for E-Mail and
News Groups
Reducing Cost of Bandwidth
Address Bottleneck
Dr. Phatak, IIT Bombay
Getting Connected
18
INTERNET GROWTH
Number
– 1969
– 1971
– 1977
– 1984
– 1987
– 1989
Dr. Phatak, IIT Bombay
of Host Machines
4
23
111
1024
28174
130000
Getting Connected
19
INTERNET GROWTH
Number
of Host Machines
– 10/1992
– 10/1993
– 01/95
– 01/96
– 01/97
Dr. Phatak, IIT Bombay
1,136,000
2,056,000
4,852,000
9,472,000
16,146,000
Getting Connected
20
ARRIVAL OF WWW
Traditional
Network Utilisation
– E-mail, FTP, Telnet / rlogin, Gopher,
News Groups
HTTP
and HTML Proposed
– 1989 Tim Berners-Lee at Cern
– Hyper Text Transfer Protocol
– Hyper Text Mark-up Language
Dr. Phatak, IIT Bombay
Getting Connected
21
ARRIVAL OF WWW
Hyper
Links Within Documents
Browser as Front-End
– NCSA Mosaic, 1993
– Marc Andreessen, Netscape, 1994
Dr. Phatak, IIT Bombay
Getting Connected
22
GROWTH OF WWW
Number
of Web Sites
– 06/1993
– 12/1993
– 06/1994
– 12/1994
– 06/1995
Dr. Phatak, IIT Bombay
130
623
2,738
10,022
23,500
Getting Connected
23
GROWTH OF WWW
Number
of Web Sites
– 01/1996
– 06/1996
– 01/1997
– 06/1997
Dr. Phatak, IIT Bombay
100,000
252,000
646,000
1,117,000
Getting Connected
24
DIMENSIONS OF WWW
Basic
Characteristics
– Hyperlinks - Distributed Documents
– URL : Uniform Resource Locator
– Multimedia data
Software
Becomes Mobile
– “Applets” in Java Language
Dr. Phatak, IIT Bombay
Getting Connected
25
INTRANET
A WAY OF CARRYING
OUT ALL
INTERNAL CORPORATE
ACTIVITIES USING INTERNET
DERIVED TECHNOLOGIES
WHILE INTERACTING WITH
CUSTOMERS ON INTERNET
Dr. Phatak, IIT Bombay
Getting Connected
26
CORPORATE ENTITIES
NEED
Distributed
Systems with Site
Autonomy
Access to these distributed databases
on-line for Business
Security against outsiders trying to
access or change our corporate Data
Dr. Phatak, IIT Bombay
Getting Connected
27
SOMETHING MORE
Apart
from the above, INTRANET
ALSO MEANS:
– A Common Interface to All End-users
of the Corporation, Typically Based on
a Browser
– Ability to Navigate Through Different
Data Bases
Dr. Phatak, IIT Bombay
Getting Connected
28
SECURITY IN INTRANET
IP Network
Is Inherently “Unsafe”.
– IP Addresses Can Be Faked
Access
to Your INTRANET
GATEWAY May Permit Access to
Your Corporate Data!
Dr. Phatak, IIT Bombay
Getting Connected
29
FIREWALLS
What
is a Firewall:
– System That Acts As a Security Buffer
Between Your Intranet and The
Outside Internet
Dr. Phatak, IIT Bombay
Getting Connected
30
PROPERTIES OF
FIREWALLS
Filtering
and Screening Capabilities
Authentication Levels
Logging and Accounting
Transparency and Flexibility
Manageability
Dr. Phatak, IIT Bombay
Getting Connected
31
APPLICATIONS ON
INTERNET
What
Is A Socket?
Analogy With Telephone
Instrument, Number, Line
Dr. Phatak, IIT Bombay
Getting Connected
32
EXAMPLE APPLICATIONS
From/etc/services on Unix
Connection Oriented (TCP)
– Mail, Telnet, FTP
– WWW Browser
Connectionless
(UDP)
– SNMP
– NFS
Dr. Phatak, IIT Bombay
Getting Connected
33
WEB MODEL
Hyber-Text
Transfer Protocol
(HTTP)
Browser Decides How To Display
Dr. Phatak, IIT Bombay
Getting Connected
34
WWW CONTENT
Static
Content
– Text, Data, Pictures, Sound
– Viewer Has No Control
Dynamic
Content
– Interactive Games, Teaching Software,
Drawings
– User Interacts/Controls Content
Dr. Phatak, IIT Bombay
Getting Connected
35
WWW DIMENSIONS
How
To Get Non-static Information?
User Chooses Content He Desires To
See
Gives Much More Power To WWW
Dr. Phatak, IIT Bombay
Getting Connected
36
UNIFORM RESOURCE
LOCATOR
Name
Used For
http
Hypertext (HTML)
(http://www.cse.iitb.ernet.in)
ftp
FTP
(ftp://ftp.cc.iitb.ernet.in/pub/unix)
file
Local File
(/usr/pg96/graj/prog.c)
Dr. Phatak, IIT Bombay
Getting Connected
37
WWW CLIENT SOFTWARE
Browsers
– Netscape, IE, Lynx
Other
– wget, WWW By Email!
Dr. Phatak, IIT Bombay
Getting Connected
38
BROWSERS
Features
Supported
– Multimedia, Frames
– Styles Sheets
– Java Applets
– Javascript
– Secure Transactions
Dr. Phatak, IIT Bombay
Getting Connected
39
BROWSERS
Performance
Availability
Cost
Open
Source Model!
In The Future: Browser Is
Everything!
Dr. Phatak, IIT Bombay
Getting Connected
40
POPULAR BROWSERS
NCSA Mosaic
Arena/Amaya
(W3C)
Red Baron (RedHat)
Lynx
Internet Explorer
Netscape Navigator/Communicator
Dr. Phatak, IIT Bombay
Getting Connected
41
HTML TAGS
<HTML> ... </HTML>
Declares The Web Page To Be
Written In HTML
<HEAD> ... </HEAD>
Delimits The Page’s Head
<B> ... </B>, <I> ... </I>
Set ... In Boldface, In Italics
Dr. Phatak, IIT Bombay
Getting Connected
42
HTTP
Hyper Text Transfer Protocol
RFC 1945 By T. Berners-Lee, R.
Fielding, H. Nielsen, “Hypertext
Transfer Protocol - HTTP/1.0”,
05/17/1996
Fielding, et. al., RFC 2068 HTTP/1.1
January 1997
Dr. Phatak, IIT Bombay
Getting Connected
43
HTTP REQUESTS
GET
Fetches The Specified Document
POST Sends User-specified Data To A
Script And Returns The Results
HEAD Requests Header Information
About The Specified Document
PUT Places A Document On The Server
DELETE Deletes A Document On The
Server
Dr. Phatak, IIT Bombay
Getting Connected
44
HTTP REQUEST HEADERS
HTTP REQUEST
HEADERSAccept
Which MIME Types The Client Will
Accept
Accept-Encoding, Accept-Language
Compress, gzip
Authorization Username And
Password
Dr. Phatak, IIT Bombay
Getting Connected
45
HTTP REQUEST HEADERS
Content-length:
Specify How Many
Bytes It Is Sending via POST
Content-type: Application
From: User’s Email Address
(Privacy!)
Dr. Phatak, IIT Bombay
Getting Connected
46
HTTP REQUEST HEADERS
If-Modified-Since
Pragma:
“no-cache”
User-Agent: Mozilla (Netscape),
Lynx, ...
Dr. Phatak, IIT Bombay
Getting Connected
47
HTTP RESPONSE HEADERS
Date:
The Current Date
Last-Modified: The Last Time The
Requested Document Was Modified
Expires: The Date Which The
Requested Document Expires
Dr. Phatak, IIT Bombay
Getting Connected
48
WEB SERVER SOFTWARE
Cern
httpd [European Laboratory
For Particle Physics (CERN)]
NCSA HTTPd
Microsoft IIS
Netscape Server
Dr. Phatak, IIT Bombay
Getting Connected
49
WEB SERVER SOFTWARE
Apache
– King Of All Web Server
– 53% In Jan 1999
– Descended From NCSA httpd
– www.apache.org
– Open Source Model
Dr. Phatak, IIT Bombay
Getting Connected
50
STEPS IN ONLINE FORM
PROCESSING
Have
The User Fill Out An HTML
Form
Have The Browser Pass The Info To
A CGI Script
Have The Script Process The Info
And Send An Acknowledgement To
The User
Dr. Phatak, IIT Bombay
Getting Connected
51
HOW TO MAKE AN ONLINE
FORM
Use
Various HTML Form Elements
To Get The Desired Info In A
Convenient Manner
Specify The Script Which Is To
Process The Filled-in Info And Also
The Method By Which To Send The
Info
Dr. Phatak, IIT Bombay
Getting Connected
52
STRUCTURE OF FORM
ELEMENTS
Textarea
Menus
Element
With INPUT Tag
Commonality In All These Elements
Note That Each Element Has Basically a
NAME And When The User Interacts
With It Gets Some VALUE
Dr. Phatak, IIT Bombay
Getting Connected
53
TWO WAYS TO RECEIVE
DATA FROM FORMS
Syntax:
Form Action=“URL of
Script”
Method=[Get|Post]]
Dr. Phatak, IIT Bombay
Getting Connected
54
GET
The URLencoded Data Is Made
Available To The Script In The
Environment Variable QUERY
STRING
Dr. Phatak, IIT Bombay
Getting Connected
55
POST
In
This, The URLencoded Data Is Passed
Onto The STDIN. So The Script Has To
Read STDIN. The Number Of Bytes To
Be Read Is Given By the Content-Length
Environment Variable.
The CGI Interface Accepts A Couple Of
Lines Of Info That Tell The Browser
What It Should Be Doing.
Dr. Phatak, IIT Bombay
Getting Connected
56
GIVING INFO TO THE
BROWSER
After Giving This Type Info, Send A
Blank Line To Let The Browser
Know That You Are Now Going To
Send The Actual Info. To Be
Displayed
Dr. Phatak, IIT Bombay
Getting Connected
57