Internet and Routers - Illinois State University

Download Report

Transcript Internet and Routers - Illinois State University

Chicago
CNY
Boston
Seattle
NYC
SF
LA
Denver
ARPANET ‘60s
CSNET
NSFNET
ANSNET
Houston
WAN (Wide Area Network ) , but not really
Chicago
Boston
Seattle
NYC
SF
LA
Denver
Houston
Local Area Network Emerged, 1970’s
Chicago
CNY
Boston
Seattle
NYC
SF
LA
Denver
Houston
ARPANET
CSNET
NSFNET
ANSNET
WAN  Backbone Network (early ‘80s)
Internet and Routers
SU
Chicago
CNY
Boston
Yale
Seattle
NYC
ISU
Colgate
Denver
SF
UCB
LA
Houston
UCLA
Address for a postal mail to Taiwan
Chung-Chih Li
Box 5150
Illinois State University
Normal, IL 61790
USA
李中志 先生收
永和市 福和路 152號 11樓 之 1
Taipei, 23438
Taiwan
Post Office as the Router
USA
Local
Post Office
Mailman
Mailman
Regional
Post Office
Air Port
Air Port
Taiwan
Regional
Post Office
Local
Post Office
Mailman
Internet and Routers
SU
Chicago
Boston
CNY
Yale
Seattle
NYC
ISU
ISU
Denver
SF
XYZ
ITK
Lab
LA
Houston
UCLA
TCP/IP
IP Address: (4 bytes)
Transmission Control Protocol/
Internet Protocol
0
255
0
255
0
0
255
255
256  256  256  256 = 4,294,967,296
128.10.2.1
128.230.208.46
128.230.18.55
149.43.80.141
149.43.3.23
Domain Name System
DNS
128.10.2.1
128.230.208.46
128.230.18.55
138.87.246.1
149.43.3.23
149.43.1.7
…………..
Arthur.cs.purdue.edu
apollo.syr.edu
rodan.syr.edu
ilstu.edu
cs.colgate.edu
colgate.edu
…………..
………….
( some IP may not have a
domain name)
The table is huge, we don’t want to maintain this table in every computer.
Domain Name Server :
• A computer that provides DNS services.
• One can let his/her computer uses a specific DNS or let it
arbitrarily use an available one.
Routers and IP Address
Chicago
128.230
CNY
Boston
Yale
Seattle
NYC
DNS
………..
149.43.1.7
149.43.3.23
149.43.2.1
………….
cs.colgate.edu = 149.43.3.23
………..
3
Denver
SF
2
DNS
LA
………..
Houston
cs.colgate.edu = 149.43.3.23
………..
1
UCLA
cs.ucla.edu/~xxx  http://cs.colgate.edu/~chungli
………….
131.179.128.25
131.179.128.25/~xxx  http://cs.colgate.edu/~chungli
………….
Traveling trough the Internet
5
Chicago
4
128.230
6
Boston
CNY
Yale
Seattle
7
DNS
………..
cs.colgate.edu = 149.43.3.23
………..
3
149.43.1.7
149.43.3.23 8
149.43.2.1
………….
Denver
SF
131.179.128.25/~xxx  http://cs.colgate.edu/~chungli
131.179.128.25/~xxx  http://149.43.3.23/~chungli
2
LA
Houston
1
UCLA
………….
131.179.128.25
………….
NYC
Traveling trough the Internet (2)
5
Chicago
4
Seattle
128.230
6
11
3
1
12
Houston
13
UCLA
………….
131.179.128.25 14
………….
7
NYC
149.43.1.7
149.43.3.23 8
149.43.2.1
…………. 131.179.128.25/~xxx  (index.html)
Denver
SF
LA
Yale
10
9
2
Boston
CNY
Dynamic IP addresses
home.twcny.rr.com
207.211.212.39.
CNY
………………………
dennisliattwcny
………………………….
………………………
dli : ([email protected])
………………………
seanyboy : ([email protected])
gbush : ([email protected])
…………………………..
…………………………..
twcny.rr.com
24.24.1.140
66.24.2.170
66.24.3.190
66.24.3.180
192.168.0.188
192.168.0.190
192.168.0.196
How do computer talk to each other?
At what level?
OSI Model
International Organization for
Standardization (1984):
Open Systems Interconnection reference model.
The model modulizes a sequence of tasks for inter-exchanged
information between computers into 7 layers:
•
•
•
•
•
•
•
Application layer (7)
Presentation layer (6)
Session layer (5)
Transport layer (4)
Network layer (3)
Data Link layer (2)
Physical layer (1)
• Each layer should be viewed as a job
(task) description but not the actual
rules or methods to do the job
OSI Model Analogy
Knight Lancelot
King Arthur
Secretary
Secretary
Servant
Servant
Captain
Captain
OSI, Peer-Layer Communication
John
H7
Token
Ring
1. Physical
Data 5
Data 7
Data 8
4. Transport
3. Network
2. Data Link
1. Physical
Ethernet
H6
2. Data Link
Data 4
5. Session
Server
H5
Server
3. Network
Data 3
6. Presentation
Unix
H4
4. Transport
Data2
7. Application
Netscape
5. Session
Data
Header1
Header2
Win 2K
6. Presentation
H3
IE
7. Application
Mary
WWW
Original purpose of the World Wide Web was
to locate and display information
• Created by Tim Berners-Lee in 1990-91 at the European
Laboratory for Particle Physics (CERN) in Geneva,
Switzerland.
•Purpose: to easily access cross-referenced documents,
through a method called hypertext linking
•Hypertext link (hyperlink): contains a reference to a Web
page that can be accessed by a click (URL)
Terminologies
• Web page: a document on the Web
• Web site: refers to a location on the Internet of Web
pages and related files that belong to a company,
organization, or individual
• Web browser: a program for displaying Web pages
• Request: when the user’s browser asks a Web server for a
Web page
• Web server: a computer that delivers Web pages
• Response: what the Web server returns to the Web
browser
Terminologies
• Uniform Resource Identifier (URI): a generic term for
many types of names and addresses on the Web
• Uniform Resource Locator (URL): a unique address on the
Web
http://www.itk.ilstu.edu/faculty/chungli/ITK368-485/index.html
Protocol://…....Domain name…./………….…Directory………….……/…Filename…
• Uniform Resource Name (URN): a name (identity) of a
resource on the Web
urn:isbn:0451450523
Urn : Namespace : nameString
Cosmetics
Tools or materials to make up faces
Face + (???)
HTML Document = Hypertext = Text + HTML Tags
HTML
•
Hypertext Markup Language (HTML): a markup
language used to create Web pages (HTML pages)
•
Markup language: a set of characters or symbols that
define a document’s logical structure and how to
display the document
•
HTML is based on Standard Generalized Markup
Language (SGML)
•
HTML documents are text documents that contain
formatting instructions called tags
HTML:
•
A tool to make up HyperText
•
•
HyperText Markup Language
HyperText: text, tables, frames, pictures,
images, links, scripts, etc.
A formal language for a Web author to:
1. Provide information to Search Engines
2. Instruct web browsers.
•
How:
•
Use tags to distinguish the text and
instructions.
Structure of HTML document
<html>
<head> Section

The author may want to provide information about his/her
web pages to the web browsers or search engines.
</head>
<body> Section
Here the web author puts the material for
his/her readers.

</body>
</html>
Tags
In general, a tag is an instruction to instruct the
web browser how to present the objects ;
<h1> This is H1 </H1>
start
tag
end tag
End tag closes the effect
of start tag.
Some tags do not have end tags,
e.g. <br> : line breaking
Questions:
•
What will happen if we miss some end tags?
•
What kind of problem we will face if we
want to type “<h1>” in our text. What
should we do?
Attribute of Tag
Some tags use attributes to specify how to
perform their functions.
<font color=“green”> Turn me into green
</font>
Attribute Attribute
name
value
We can specify more than one attribute in a tag. E.g.
<font color=“green” size=+2> Turn me bigger and
green
</font>
<HR> tag
Some tags generate objects for the web browser.
<hr size=10 color=“green" align="left" width=20%>
<hr size=10 color=“red" align=“center"
width=50%>
<head>
<title> Basic HTML </title>
<meta http-equiv="Content-Type"
content="text/html; charset=big5">
<meta name="Author" content="Chung-Chih Li">
<meta name="GENERATOR" content="Microsoft FrontPage
3.0">
</head>
More on HTML tags, go to the web page of this class
Static HTML
IE
file6,
file9,
file100,
…….
need file20
click
file1, file2, file3, file4,
file5, file6, file7, file8,
file9, file10, file11, file12,
file13, file14, ………….
………………..
………………..
………………..
………………..
………………..
………………..
File server
need file34
click
Internet
Client
Server
Dynamic HTML
program 8
IE
file9,
outputs of prog4,
program 3,
……
file1, file2, file3, file4, file5,
file6, file7, ………….
………………..
program1, program2,
program3, program4,
………………..
data1, data2, date3, 1022
………………..
program 4
Program 7
File server
Name: Jane ..
Tel: 315 …
need file34
Internet
Client
Security!
Server
Form, CGI, Scripts
Files (html, ..)
CGI programs
Java scripts
IE
data
html,
html (java scripts)
html,….
CGI prog
CGI prog.
File server
form (data)
need html
Internet
Client
Server
CGI
Common Gateway Interface
Interface between Client and Server
Standardize:
• I/O format
• Common used environmental variables
On server side, programs must follow the CGI standards, and
hence they are called CGI programs.
CGI Scripts and Programs
Scripts
Interpreter
Results
• Perl, Vbasic, Java Scripts.. (they are stored in ASCII files)
Exe programs
Results
• (they are machine codes)
Program source
compiler
• C, C++, Java, Fortran ………….
Exe programs
Java Scripts in HTML documents
• Literally, a client computer runs nothing
but browsers.
• Thus, a client computer receives HTML
documents only.
<html>
……
<script type=“text/javascript”>
Javascripts
</script>
……
</html>
Dynamic HTML
IE
<form name=“x” method=“post”
action="http://cs.colgate.edu/cgi-bin/generic-grader.pl"
…..
100quiz.html
out of 100 are
</form>correct..
file1, file2, file3, ..
quiz.html
…….
Program1….
cgi-bin/generic-grader.pl
………………..
data1, data2, date3, 1022
………………..
result.html
generic-grader.pl
file server
answers.txt
Form
x …….
? quiz.html
? answers.txt
Internet
Client
ASP.NET does not go beyond the
structure but make the job much easier.
Server