Internet Protocol - Computer Science

Download Report

Transcript Internet Protocol - Computer Science

( THE
CS 115: COMPUTING FOR
SOCIO-TECHNO WEB
HOW THE INTERNET WORKS:
HTTP, TCP/IP AND OTHER PROTOCOLS
HOW DOES THE INTERNET
WORK?
Begin with Internet Addresses
YOUR ADDRESS IS
ENUMERATED
Every server is enumerated in an IP address
IPv4: 32 bits written as 4 decimal numerals up to 256,
e.g. 149.130.12.213 (Wellesley College)
• How many addresses can it represent?
• IPv6: 128 bits written as 8 blocks of 4 hex digits each,
e.g. AF43:23BC:CAA1:0045:A5B2:90AC:FFEE:8080
• How many addresses are in IPv6?
Client translates URLs to IP addresses,
e.g. cs.wellesley.edu  149.130.136.19
• Uses authoritative sites for address translation
a.k.a: “Domain Name Server” (DNS)
WHAT IS *YOUR* IP
ADDRESS?
WhatIsMyIP.com
U-R-L
Static URL
http://www.wellesley.edu/Resources/about/index.html
Access method



Server and domain
Uniform Resource Locator

T. B-L wanted URI: Universal
Resource Identifier
It tells you where something is
located, i.e.,
the name of the server that has it
It also tells you how you could get it
Path
•
•
•
•
•
•
•
•
Document
gov - Government agencies
edu - Educational institutions
org - Organizations (nonprofit)
mil - Military
com - commercial business
net - Network organizations
ca – Canada
kz–…
Harvard Bits
6
2/11/2009
URL INVOKING A WEB
PROGRAM
Dynamic URL
https://www.linkedin.com/edu/school?id=19934&trk=vsrp_universities_hero
Access method
Server and domain
Web program
Parameters
Dynamic fake URL
http://wiki.answers.com/Q/What_does_URL_mean
Access method
Server and domain
Web program and parameter
CLIENTS AND SERVERS
Web Server
Web Server
e-mail Server
www.wellesley.edu
cs.wellesley.edu
firstclass.wellesley.edu
THE INTERNET
upload
Client Computers
8
download
WHAT IS THE INTERNET?
“Ten movies streaming across that, that Internet, and what
happens to your own personal Internet? I just the other day
got...an Internet was sent by my staff at 10 o'clock in the
morning on Friday. I got it yesterday [Tuesday]. Why?
Because it got tangled up with all these things going on the
Internet commercially.
[...] They want to deliver vast amounts of information over
the Internet. And again, the Internet is not something that
you just dump something on. It's not a big truck. It's a
series of tubes. And if you don't understand, those tubes
can be filled and if they are filled, when you put your
message in, it gets in line and it's going to be delayed by
anyone that puts into that tube enormous amounts of
material, enormous amounts of material.”
Senator Ted Stevens, Chair,
Comm. on Commerce, Science and Transportation
(charged with regulating the internet)
WHAT IS THE INTERNET?
NO REALLY, WHAT IS IT?
https://www.youtube.com/watch?v=ewrBal
T_eBM
A NUTS AND BOLTS VIEW OF
INTERNET
The Internet is a network of networks
consisting of:
routers
• hosts (can be can be either
modem
clients or servers)
client
• communication links
of varying bandwidths
• routers (switching devices)
• modems translate bits to travel correctly
through wires and air
A client program running
on a host, following a protocol,
requests and receives a file
from a server program
running on another system
server
Network Protocols and HTTP
1-12
We call such programs processes
Network Protocols and HTTP
1-14
Handshake
SENDING AND RECEIVING
INFORMATION
15
IP ~ Lower
Level Protocols
TCP ~ Higher Level Protocols
TCP/IP VS POSTAL
MAIL PROTOCOLS
TCP/IP: BASIC
PROTOCOLS
TCP: Transport Control Protocol
• Creates logical connection b/w two machines on the network
• Makes connected machines think
that they are directly connected
• Provides reliable, perfect transport of messages
IP: Internet Protocol
• Breaks data into packets to move through routers
• Tries hard, but may drop packets
We usually talk about TCP/IP
16
• TCP uses IP and guarantees delivery
MESSAGE PIPELINING
1-17
When the message is segmented into packets, the network is said to pipeline
message transmission.
PACKET SWITCHING
Messages are broken into packets each of which travels from the source to destination
through a maze of routers and links.
1-18
Packet switching achieves much higher efficiency than full-file travel
TRACEROUTE FROM
UMASS TO FANTASIA
3 delay measurements
1-19
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms
2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms
3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms
4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms
5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms
6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms
7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms trans-oceanic
8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms
link
9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms
10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms
11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms
12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms
13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms
14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms
15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms
16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms
17 * * *
no response
18 * * *
19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms
PROTOCOL STACK
HTTP: HYPERTEXT TRANSFER
PROTOCOL
HTTP is the Web’s client/server
protocol.
User agent (browser)
implements the client side of
HTTP.
1-21
Web pages generally consist of
an HTML file which references
other objects (JPEG, Java applet,
video, audio clips).
HTTP/1.0 NONPERSISTENT
CONNECTION
HTTP://WWW.SOMESCHOOL.EDU/SOMEDIR/FILE.HTML
2.
4.
Client sends
HTTP request for file
/someDir/file.html
Client receives response.
terminates connection,
examines file, and may
request other files.
1b. Server at host
www.someSchool.edu
accepts connection
and acknowledges.
3.
Server receives
message, finds and
sends file
in HTTP response.
5.
Steps 2, 3, 4 are
repeated for each
requested file.
1-22
1a. Client initiates
a TCP connection to
www.someSchool.edu
HTTP REQUEST MESSAGE
request line
(GET, POST,
HEAD commands)
header
lines
GET /someDir/file.html HTTP/1.0
Host: www.someSchool.edu
User-agent: Mozilla/4.0
Connection: close
Accept-language:en,fr
1-23
Carriage return,
line feed
indicates end
of message
HTTP RESPONSE
MESSAGE
header
lines
requested
HTML file
HTTP/1.0 200 OK
Connection: close
Date: Thu, 06 Aug 1998 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
Last-Modified: Mon, 22 Jun 1998 …...
Content-Length: 6821
Content-Type: text/html
data data data data data ...
1-24
status line
(protocol
status code
status phrase)
TESTING HTTP USING
TELNET
Type:
Type:
GET /~cs115/index.html HTTP/1.0
Opens TCP connection to port
80
Issues a GET request to HTTP
server
(you must hit carriage return
twice at the end).
1-25
telnet cs.wellesley.edu 80
SOME HTTP RESPONSE
STATUS CODES
200 OK
request succeeded, requested object in this message
301 Moved Permanently
requested object moved, new location specified in this message
(Location)
400 Bad Request
request message not understood by server
404 Not Found
requested document not found on this server
1-26
505 HTTP Version Not Supported
NET NEUTRALITY