ppt - The Stanford University InfoLab

Download Report

Transcript ppt - The Stanford University InfoLab

History and Infrastructure
Computer Science 01i
Introduction to the Internet
Brian Cooper
23 January 2001
1
Some web statistics
• More than 1 billion pages
• Web languages
 86.55% English
 2.36% French
 0.54% Dutch
• http://www.inktomi.com/webmap/
• Today: 1,326,920,000 web pages indexed by
Google (http://www.google.com)
2
1,000,000,000?!
from a 1964 book about a near-infinite library that
contained all the 500 page books that could be
generated by permuting the alphabet:
“The certitude that any book exists on the
shelves of the library first led to elation, but
soon the realization that it was unlikely to be
found converted the feelings to a great
depression.” [Luis Borges: The Infinite Library]
3
Today’s Outline
• Quick look at some terms
• Infrastructure
 LANs and WANs
 Packets and Ethernet
 Routing, IP, and Standards
• HTML Introduction?
• Today’s Project!
4
Some “Terms”
• http:// vs. www.
• When and why does one use slash, dot, tilde,
etc?
• Why do some addresses have ”.html" at the end
and others do not?
• Example:
http://www-db.stanford.edu/~nsample/cs01/
5
Some “Terms”
(continued)
• Who assigns the .com, .edu, .org, .gov., .x and
can you choose?





.com = commercial
.gov = government
.edu = educational
.ie = Ireland
New domains: .aero, .biz, .coop, .info, .museum,
.name, .pro
• How are names registered? www.InterNIC.net,
www.icann.org for more information
6
What is the internet anyway?
• Good question
• The internet is not just the “world wide
web” anymore than UPS is the interstate
highway system.
• But, we will focus on services available on
the ‘Net such as the world wide web.
7
So? What is it?!
The internet is a collection of
local area networks combined into one
extremely large wide area network.
8
Local Area Networks (LANs)
• A small network of computers in close
proximity to each other.
• Roughly a single building’s worth of
computers connected together
• Usually via ethernet, but other ways are
possible (token ring, local talk, etc.)
9
Circuit Switching
• Classic phone system
• Even when no information is exchanged, a
connection still ties up the system
• Inefficient use of bandwidth even when
information is exchanged
• Absolutely guarantees a minimum amount
of bandwidth and latency
 very good for interactivity
10
Packet Switching
• Messages are broken into small pieces
and then transmitted one at a time.
 Packets on the internet are usually 0.5-1.5
kilobytes
 Each packet must have an address and some
error correction information-its “header”
• Can interleave one message with another
11
Ethernet
• Original design in 1973 by Bob Metcalf,
Xerox PARC
• How can I get bits from one computer to
another cheaply, easily, and above all,
quickly?
• Could have phone system style setup
12
Ethernet Design
• Each computer has a unique address
• All computers are connected to a single
wire (but can be any medium, like radio)
• All computers listen to every message
• Wait until the line is free to broadcast
• If there is a collision, wait a random
period of time then try again.
This is the breakthrough.
13
Wide Area Networks (WANs)
•
•
•
•
Connect physically distant computers
Often connect physically distant LANs
Usually involve phone companies
There are a wide variety of ways to do
this, but some significant companies
include:
 Cisco Systems and 3Com (build hardware)
 AT&T and Sprint (own the pipes)
14
WAN Design
• Probably very high bandwidth
• Probably fairly low latency
• Pre-Internet, WANS were more or less all
proprietary
15
Why make the distinction?
• Because the issues are very different
 You have full control over the wires on a LAN
 You probably have a contract with a phone
company on a WAN
• LANs are relatively cheap to grow
• WANs are expensive to grow
 What does it take to run a cable from one
side of the street to the other?
16
Routers
• Connect two physically different networks
 an ethernet and a token-ring network
 a modem connection and an ethernet
 a LAN and a fiber optic cable
• Translate electrical requirements
• Translate between the two addresses
17
How Routers Work
• Look to other computers like just another
machine on the LAN
• Looks at all packets on the LAN and
forwards those destined for the outside
world
• You often need the IP address of your
local router when configuring your
internet connection (the gateway)
18
The internet is a giant WAN
• Many computers of various…
 Types: Intel, Sun, Palm Pilots, Atari, Apple,
embedded systems, etc.
 Operating Systems: Windows 3.11, 95, 98,
NT, 2000, UNIX, Linux, MacOS’s, etc.
 Sophistication: Space Shuttle to PCs
 Speeds: 16MHz 8086’s to 1 GHz machines
• How do I get all of them talking together?
19
Protocol
• A way for machines to talk to one another
• Like Korean or ASL or PASCAL
• Hundreds of different protocols operate
together to make the internet work
properly
 Each is responsible for a different service
 Each is built on some protocol below
20
Internet Protocol (IP)
• The most basic protocol of the Internet
• Designed to get a single packet from one
computer to another
• Abstracts the physical connection between
two machines
21
IP Addresses I
• Every computer on the Internet has one
• Represented by four numbers between
0 and 255 (ie, four bytes)
 My home machine:
 My office machine:
 My office router:
216.132.81.61
171.65.75.234
171.64.75.1
22
IP Addresses II
• An IP address is like a phone number
 A neighborhood like a phone exchange code:
• 171.64.75. =
(650) 723-1963
 A machine number is like the last four digits
• .234
=
(650) 723-1963
 Not always this straight forward…
the “dash” floats
• Move your machine neighborhood and it
will need a new IP address
23
More about IP
• IP actually promises to do very little
• Try to get a single packet from one computer
to another
• Does not guarantee a packet’s




arrival
timing
error free transmission
route
• Has no idea about a packet’s content, but does
know its length
24
This is actually very powerful
• Any physical media that can implement IP
can get on the internet completely!
 It is possible to implement IP over radio
waves (ricochet modems)
 It has even been proposed to implement IP
over carrier pigeon!
25
The problem with IP
• 32 bits long means that the maximum size of
the Internet is 4,294,967,296 computers
 sounds like a lot, but isn’t
 Ran out of addresses in late 1994 or early 1995
 Currently using tricks to circumvent that limit
• A new version called IPv6 is coming to augment
the current IPv4
 128-bit addresses, other optimizations
 2128 vs. 1080 (< 284 = number of particles in the known universe)
26
Routing Packets
• No router knows how to get from any one
computer to any other
• If a router doesn’t know the destination,
it passes the packet to another router
believed to be closer
• This router repeats the process
• So a packet hops from router to router
until it finds the destination
27
More on Routing
• The routing system is extremely flexible
and decentralized
• Downside: One bad router in a certain
place can really screw up a portion of the
Internet
 This is often what crackers mean when they
talk about “bringing down the internet”
 Bring down enough routers to really mess
things up (BBNPlanet)
28
Why was IP designed that way?
• A product of the cold-war nuclear threat
• The Internet descended from military
research to develop a wide-area network
able to withstand a nuclear war: ARPAnet
 Because a packet’s route, timing, etc. isn’t
guranteed, the Internet is extremely reliable in
the face of local catastrophic failure
 Problems (other than nuclear war) take down
local sections of the internet everyday, but IP
adapts automatically
29
Aside: Open Standards
• Every Internet protocol is publicly known
 Most generated through standards bodies and
research institutions
 Anyone can implement the standard for free
 Anyone who does knows it will work with the
entire Internet
 Contrast to proprietary systems
• industry alone could never make IP successful
30
Transmission Control Protocol (TCP)
• Almost always mentioned in the same
breath as IP (TCP/IP)
• Fakes a reliable connection over an
unreliable one
• Delivers an entire message to a particular
destination
 How is this different from IP’s guarantees?
 Why is it nice that TCP is built on top of IP?
31
How TCP Works
• Adds certain information to an IP packet




Packet 1 of 10
Time sent
Error correction information
Destination application (email, web, etc.)
• the “port” number
• The destination computer asks the original
computer to resend any missing or corrupted
packets
• Resorts the packets into the proper order
32
More TCP/IP
• How does the TCP protocol compare to
the IP protocol below it?
 Low bandwith
 High latency
 But reliable!
• Other protocols built directly on top of IPsuch as UDP- are often referred to as
TCP/IP anyway
33
To capitalize or not
“An internet” vs “The Internet”
For almost everyone in the world, there is
only one internet
34
Project: putting the web to work!
• How long will I be around?
www.northwesternmutual.com/games/longevity/index.html
• Calculator Madness
physics.hallym.ac.kr/education/lecture/SEP/HSG/RefCalculators.html
• Results! [email protected]
(good site, bad site? A calculation of some sort?)
35