Reading: Chapters 12 and 13
Number of host computers on the Internet
^
|
100,000,000 | 16,000,000 Jan 1999: 43,200,000
| #
10,000,000 | #
| 1,100,000 #
1,000,000 | # #
| # #
100,000 | # #
| 28,000 # #
10,000 | # # #
| # # #
1,000 | # # #
| 213 # # #
100 | # # # #
| # # # #
+----+----+----+----+---->
'81 '87 '92 '97
How does my message get
through the Internet?
A bit is a single binary digit, either 0 or 1.
Think:
electricity through wire = 1
no electricity through wire = 0
A byte is a binary number of 8 bits.
00000000(2) = 0(10) 11111111(2) = 255(10)
(A kilobyte is 210=1,024 bytes.
A megabyte is 220=1,048,576 bytes.
Characters are translated into bits using the ASCII standard (American Standard Code for Information Interchange - not that it matters).
letter binary code decimal 'A' 01000001 64 + 1 = 65 'B' 01000010 64 + 1 = 66 : 'Z' 01011010 64 + 26 = 90
On one level... The Internet is a network of wires connected with computers.
On another... The Internet gives programs the capability to communicate between computers.
We'll see how the Internet
bridges this gap.
To simplify the matter, we split the bridge into four layers:
Each layer adds a header explaining how to handle the message.
+----------+--------------+-----------+------------------------------+ | physical | internetwork | transport | application | | header | header | header | message | +----------+--------------+-----------+------------------------------+ <--- front
Of the physical layer we will say little: It magically sends a message across a single network.
The Internet is a network of networks.
/--------\ /------------\
| CMU CS | ---- | CMU Andrew |
\--------/ \------------/
\ /
\ /-----\ /
| PSC |
\-----/
|
/-----\ /----\
| MCI | ---- | OU |
\-----/ \----/
Each network can deliver messages within itself directly. Messages
between networks must find their way - without a map!
Networks have gateways, computers that route messages between networks.
/---------\ /------------\
| CMU CS | | CMU Andrew |
| | --- gw.cs --- |
| gs88.sp | | truffle.bh |
\---------/ \------------/
|
rtrbone.net
|
/------\ /-------\
| | | PSC |
| Pitt | -- pitt-ip-fddi -- | |
| | | mario |
\------/ \-------/
|
nss5.psc
|
/-------\
| MCI |
\-------/
Packets travel gateway to gateway until reaching destination
network.
Now we look at the internetwork layer, implemented using IP (Internet Protocol).
IP provides best-effort delivery: It makes a good try to get packet to destination computer but may lose (drop) it.
Reasons for dropping a packet include
Packet drops are frequent (50% not uncommon). The endpoints negotiate and resend until all packets make it.
Before a message is sent, it is divided into packets.
1011011011100010010000...
original message
| | | |
v v v v
...|1011011 ...|0111000 ...|1001000 ...|... packets
^
header
Each packet has about 1,000 bytes.
Each gateway has a routing table telling where to send packets.
/----------\
| 10.*.*.* | rest of
\----------/ Internet
| |
| 10.0.0.5 /----------\
o | 40.*.*.* |
| 20.0.0.5 \----------/
| |
/----------\ 20.0.0.6 30.0.0.6 /----------\ 30.0.0.7 | 40.0.0.7
| 20.*.*.* | -------- o -------- | 30.*.*.* | -------- o
\----------/ \----------/
The routing table for 20.0.0.6/30.0.0.6 in this network would be
if destination then route network is... to... 20.*.*.* destination directly 30.*.*.* destination directly 10.*.*.* 20.0.0.5 40.*.*.* 30.0.0.7 otherwise 30.0.0.7
Periodically gateways tell their neighbors about the best routes they know to destination networks.
When a gateway receives this information, it updates its routing table and forwards information about any changes to its neighbors.
The following is a version 6 header.
byte 0 IP version number (in this case, 6)
byte 1
ignore
byte 4 length of packet
byte 6 transport protocol
byte 7 hop limit (subtract 1 each gateway, drop if 0, to avoid immortal packets)
byte 8
source computer IP address
byte 24
destination computer IP address
byte 40
: transport layer message
Machines have two names: a mnemonic English name
jasmine.bh.andrew.cmu.eduand a 4-byte IP address
128.2.124.152The IP address is used to describe the destination of a message.
Obviously a host can't store translations for every other host!
Each domain has a domain name server to translate mnemonic names to hosts or subdomains.
________.________
/ / \ \
_____edu___ com gov uk
/ \ | | |
_____cmu_____ ou dec sandia ac
/ | \
cs andrew mcs
| | |
sp bh www-pgss
| |
gs88 jasmine
Conceptually, translation proceeds top-down. Actually, caching allows
bottom-up translation.
We return to the Alice-Bob subplot: Alice is trying to send a message to Bob, and Eve wants to interfere.