Lecture 4, 20-755: The Internet, Summer 1999 1 20-755: The Internet Lecture 4: Internetworking I David O’Hallaron School of Computer Science and Department of Electrical and Computer Engineering Carnegie Mellon University Institute for eCommerce, Summer 1999
54
Embed
Lecture 4, 20-755: The Internet, Summer 1999 1 20-755: The Internet Lecture 4: Internetworking I David O’Hallaron School of Computer Science and Department.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Theoretical limit for modulated signals is approx 35 Kb/s:
Shannon's law: max bits/s = H log2(1 + S/N), where H is bandwidthand S/N is signal to noise ratio. For phone network, H~3,600 bpsand 10 log10 (S/N) = 30 dB. Thus max rate is ~35 Kb/s.
Lecture 4, 20-755: The Internet, Summer 1999 20
T1 carrier (1.544 Mb/s)
Digital part of phone system based on the T1 carrier:
193 bit frame (125 us, 8000 samples/s, 8 bits/sample/channel)
channel 1 channel 2 channel 3 channel 24
8 data bitsper channelbit 1 is a
framing code
Each channel has a data rateof 8000 samples/s * 8 bits/channel = 64 Kb/s
Lecture 4, 20-755: The Internet, Summer 1999 21
56KB “Modems”
– Asymmetric: home to SP uses conventional v.34 modem
– SP has digital connection into phone system
» Channel sending 8000 samples / second, up to 8-bits/sample
– DAC encodes each sample with 92 or 128 voltage levels
» Not enough precision on analog side to handle finer resolution
– Receiver converts samples back to digital values
» Must match frequency & phase of senders DAC
» Establish using “training” signals from sender
digital (short cable or bus)
DACDAC
digital digital
Analog Samples:92 or 128 levels8000 samples/second
1.544 Mb/s (T1 carrier)
local office
tolloffice
home computerhome computerService Provider
(ISP)
Service Provider(ISP)
InterfaceInterface
V.90 modemreceiver
V.90 modemreceiver
ADCADC
Binary Signal:56,000 bits/second
Key: no analogconversion at ISP
Lecture 4, 20-755: The Internet, Summer 1999 22
Connecting nearby computers using Ethernet
• History– 1976- proposed by Metcalfe and Boggs at Xerox PARC
10Base5 thick coax 500 m 100 good for backbones10base2 thin coax 200 m 30 cheapest10Base-T twisted pair 100 m 1024 easy maintenance10Base-F fiber 2000 m 1024 best between bldgs
– frames addressed to broadcast address (all 1’s).
– frames addressed to multicast address (1xxx...), if it has been instructed to listen to that address
– all frames, if it has placed in promiscuous mode
• Passes to the host OS (via the exception mechanism) only those packets it accepts.
Lecture 4, 20-755: The Internet, Summer 1999 26
Ethernet sending algorithm (CSMA/CD)• Problem: how to share one wire without centralized control.
• Ethernet solution: Carrier Sense Multiple Access with Collision Detection (CSMA/CD):
• 1. Adapter has frame to send and line is idle:– then send frame immediately
• 2. When adapter has frame to send and line is busy:– wait for line to become idle, then send frame immediately.
• 3. If “collision” (simultaneous sends) occurs during transmission:
– send at least 1024 bits
– send “jam signal” to notify receivers
– wait some period of time (binary exponential backoff)
– retry
Lecture 4, 20-755: The Internet, Summer 1999 27
Binary exponential backoff
FrameFrame
Contention Slots (51.2 us per slot)
Idle
Binary exponential backoff algorithm:
• after 1st collision, wait 0 or 1 contention slots, at random.
• after 2nd collision, wait 0, 1, 2, or 3 contentio slots at random.
• etc up to 1023 slots.
• after 16 collisions, exception.
FrameFrameFrameFrameFrameFrame
Contention interval
Lecture 4, 20-755: The Internet, Summer 1999 28
Why the 64 byte minimum packet size?
AA BB
Assume propagation delay from A to B is tau microseconds (us).
A sends to B at time 0
AA BBpacket almost at B at time tau-eps
AA BBB sends at time tau: collision
AA BBNoise burst gets back to A at time 2*tau
Conclusion: Senders must take morethan 2*tau seconds to send their packets.
For ethernet, 2*tau is specified by standard(2500 m cable w/ 4 repeaters) to be 51.2 us,which at 10 Mb/s is 512 bit times, or 64 bytes.
Rough estimate: propagation through copperis about 20 cm/ns. With a 2500 m cable,tau is 12.5 us and 2*tau is 25 us.
As speeds increase there are two possibilities:1. increase packet sizes2. decrease maximum cable length
Neither is particularly appealing.
Lecture 4, 20-755: The Internet, Summer 1999 29
Ethernet pros and cons
• Pros:– simple
– robust
– cheap ($50/adapter in 1998)
• Cons:– no quality of service guarantees
» OK for data
» not always OK for real-time bit streams like video or voice
– fixed bit rate
» not keeping up with faster processors
» workstations can produce data at 10-50 MBytes/sec
– prone to congestion
» processors getting faster
» bridged Ethernets can help
Lecture 4, 20-755: The Internet, Summer 1999 30
Break time!
Lecture 4, 20-755: The Internet, Summer 1999 31
Today’s lecture
• Connecting computers (50 min)
• Break (10 min)
• Connecting networks (50 min)
Lecture 4, 20-755: The Internet, Summer 1999 32
The internetworking idea (Kahn, 1972)
• Build a single network (an interconnected set of networks, or internetwork, or internet) out of a large collection of separate networks.
– Each network must stand on its own, with no internal changes allowed to connect to the internet.
– Communications would be on a best-effort basis.
– “black boxes” (later called routers) should be used to connect the networks.
– No global control at the operations level.
Lecture 4, 20-755: The Internet, Summer 1999 33
Internetworking challenges
• Challenges:– heterogeneity
» lots of different kinds of networks (Ethernet, FDDI, ATM, wireless, point-to-point)
» how to unify this hodgepodge?
– scale
» how to provide uniques names for potentially billions of nodes? (naming)
» how to find all these nodes? (forwarding and routing)
• Note: internet refers to a general idea, Internet refers to a particular implementation of that idea (The global IP Internet).
Lecture 4, 20-755: The Internet, Summer 1999 34
Internetworking with repeaters
r
r
r
r
Repeaters (also called hubs)(r in the figure) directly transferbits from their inputs to their outputs
Lecture 4, 20-755: The Internet, Summer 1999 35
Internetworking with repeaters
Host on network A
Host on network B
Telnet, FTP, HTTP, email application
transport
network
data link
physical
application
transport
network
data link
10Base-T physical
Repeater(forwards bits)
Lecture 4, 20-755: The Internet, Summer 1999 36
Internetworking with repeaters:Pros and cons
• Pros– Transparency
» LANS can be connected without any awareness from the hosts.
– Useful for serving multiple machines in an office from one ethernet outlet.
• Cons– Not scalable
» ethernet standard allows only 4 repeaters.
» more than 4 would introduce delays that would break contention detection.
– No heterogeneity
» Networks connected with repeaters must have identical electrical properties.
Lecture 4, 20-755: The Internet, Summer 1999 37
Internetworking with bridges
b
b
b
b
Bridges (b In the figure) maintain a cache of hosts on their input segments.
Selectively transferethernet frames from their inputs to their outputs.
Lecture 4, 20-755: The Internet, Summer 1999 38
Internetworking with bridges
Host on network A
Host on network B
Telnet, FTP, HTTP, email application
transport
network
data link
physical
application
transport
network
data linkCSMA/CD
10Base-T physical
Bridge(forwards ethernet
frames)
Lecture 4, 20-755: The Internet, Summer 1999 39
Bridges
A B C
X Y Z
bridge
Ethernet A
Ethernet X
adapter (interface)
port 1 (really just another adapter)
port 2
Unlike repeaters (which operateat the physical level), bridges operate at the data link level(or link level).
By link level, we mean that theycan parse and understand e.g. ethernet frames (as opposed to IP packets).
Basic forwarding algorithm (flooding): copy each received frame to all other ports.
Lecture 4, 20-755: The Internet, Summer 1999 40
Learning bridges
Problem: Flooding is wasteful
A B C
X Y Z
bridge
Ethernet A
Ethernet X
port 1
port 2
Optimization: Forward packets only when necessary by learning andremembering which hosts are connected to which bridge ports.
Lecture 4, 20-755: The Internet, Summer 1999 41
Learning bridges (cont)
Learning algorithm:
1. start with empty hash table T that maps hosts to ports2. receive frame from host src on port p3. add (src,p) to T4. delete old entries
Forwarding algorithm: 1. receive frame f from host src to host dst on port p 2. if T(dst) = n/a then flood f. else if T(dst) = p then discard f else forward f on port T(dst).
Lecture 4, 20-755: The Internet, Summer 1999 42
Learning bridges (example)
A B C
X Y Z
bridge
Ethernet A
Ethernet X
1
2
host portA 1
A -> C
flood 2 & 3
host portA 1B 1
B -> A
discard
host portA 1B 1X 2
X -> A
forward on 1
P Q R
3 Ethernet P
Lecture 4, 20-755: The Internet, Summer 1999 43
Cycles in bridged networks
1. host writes frame Fto unknown destination
B2B1
F1
2. B1 and B2 flood
F2
B2B1
F
B2B1
F1
4. B1 and B2 flood
F2
B2B1
F1
3. B2 reads F1, B1 reads F2
F2
B2B1
F2
5. B1 reads F1 B2 reads F2
F1
B2B1
F1
6. B1 and B2 flood
F2
Lecture 4, 20-755: The Internet, Summer 1999 44
Spanning tree bridges
B3
A
B4 B5
B
G
B2
B1
C D
E
F
B3
A
B4 B5
B
G
B2
B1
C D
E
F
• Networks are graph nodes, ports are graph edges• Tree is constructed dynamically by a distributed “diffusing computation” that prunes ports.• “spanning” refers only to networks, not bridges
Lecture 4, 20-755: The Internet, Summer 1999 45
Portion of the bridged CMU internet
ATM
PSCpitt.edu
AT&T Sprint
es-weh-cle-4.net.cs(PDL/CMCL Labs)
7th floorWean
es-weh-cl6-2.net.cs
gw.cs
poconos.cmcl
backbone-1.net.csinterlink.sw.net
8th floor Wean
baker porterrtrbone.net
cmu-fddi.psc.net
cyert host
Lecture 4, 20-755: The Internet, Summer 1999 46
Internetworking with bridges:Pros and cons• Pros
– Transparency
» LANS can be connected without any awareness from the hosts
» popular solution for campus-size networks
• Cons– Transparency can be misleading
» looks like a single Ethernet segment, but really isn’t
» packets can be dropped, latencies vary
– Homogeneity
» can only support networks with identical frame headers (e.g., Ethernet/FDDI)
» however, can connect different speed Ethernets
– Scalability
» tens of networks only
– bridges forward all broadcast frames
– increased latency
Lecture 4, 20-755: The Internet, Summer 1999 47
Internetworking with application gateways
• application gateways (g in the figure) connect different networks for particular applications.
• Example: – User on host x posts
news item to gateway machine on network A.
– Gateway on A passes item (along with others) to gateway B.
– User on host y reads message from gateway on B.
g x
g y
Network A
Network B
phone system
Lecture 4, 20-755: The Internet, Summer 1999 48
Internetworking with application gateways
Application gatewayon network A
host on network B
usenet news application
data link
physical
application
data linkmodem
phone physical
Application gatewayon network B
transport
network
Gateway program
Lecture 4, 20-755: The Internet, Summer 1999 49
Internetworking with application gateways:
Pros and cons• Pros
– Heterogeneous
» can connect different types of networks
– Simple
» modems + gateway software
• Cons– Not general-purpose
» each solution is application-specific
Lecture 4, 20-755: The Internet, Summer 1999 50
Internetworking with routers
• Def: An internetwork (internet for short) is an arbitrary collection of physical networks interconnected by routers to provide some sort of host-to-host packet delivery service.
internetinternet
hosthost
hosthost
hosthost
hosthost
Lecture 4, 20-755: The Internet, Summer 1999 51
Building an internet
XX YY ZZ
network 2 (ECE)
adaptoradaptor adaptoradaptoradaptoradaptor
AA BB CC
network 1 (SCS)
adaptoradaptor adaptoradaptoradaptoradaptor
We start with two separate, unconnected computer networks (subnets), which are at different locations, and possibly built by different vendors.
Ethernet ATM
Question: How to present the illusion of one network?
Lecture 4, 20-755: The Internet, Summer 1999 52
Building an internet (cont)
XX YY ZZ
network 2 (ECE)
adaptoradaptor adaptoradaptoradaptoradaptor
AA BB C (router)C (router)
network 1 (SCS)
adaptoradaptor adaptoradaptoradaptoradaptor
Next we physically connect one of the computers, called a router (in this case computer C), to each of the networks.
Finally, we run a software implementation of the Internet Protocol (IP)on each host and router. IP provides a global name space for the hosts, routing messages between network1 and network 2 if necessary.
IP addresses:128.2.250.0128.2.80.0128.2.250.2 128.2.80.1 128.2.80.2 128.2.80.3
Lecture 4, 20-755: The Internet, Summer 1999 54
Building an internet (cont)
internetinternet
128.2.250.1128.2.250.1
128.2.80.3128.2.80.3
128.2.80.1128.2.80.1
128.2.250.0128.2.80.3
128.2.250.0128.2.80.3
128.2.250.2128.2.250.2128.2.80.2128.2.80.2
At this point we have an internet consisting of 6 computers built from2 original networks. Each computer on our internet can communicatewith any other computer. IP provides the illusion that there is just one network.