Professional Documents
Culture Documents
Datalink Layer
Datalink Layer
Link Layer
5.7 PPP
5.8 Link virtualization:
MPLS
Datagram transferred
by different link
protocols over
different links:
e.g., Ethernet on first
link, frame relay on
intermediate links,
802.11 on last link
Transportation analogy
Tourist = datagram
Transport hop =
communication link
Flow control
Error detection
Error correction
host schematic
application
transport
network
link
cpu
memory
controller
link
physical
host
bus
(e.g., PCI)
physical
transmission
network adapter
card
Adaptors Communicating
datagram
datagram
controller
controller
receiving host
sending host
datagram
frame
Sending side:
Encapsulates datagram in
frame
Adds error checking bits,
rdt, flow control, etc.
Receiving side
Looks for errors, rdt, flow
control, etc.
Extracts datagram, passes
to upper layer
5.7 PPP
5.8 Link virtualization:
MPLS
Error Detection
EDC= Error Detection and Correction bits (redundancy)
D = Data protected by error checking, may include header fields
otherwise
Receiver:
Compute checksum of
received segment
Want:
D.2r XOR R = nG
Equivalently:
D.2r = nG XOR R
Equivalently:
If we divide D.2r by
G, want remainder R
.2r
D
R = remainder[
]
G
CRC Standards
Gcrc-32 = 100000100110000010001110110110111
5.7 PPP
5.8 Link virtualization:
MPLS
shared RF
(e.g., 802.11 WiFi)
shared RF
(satellite)
humans at a
cocktail party
(shared air, acoustical)
4. Simple
Channel Partitioning
Random Access
Taking turns
FDM cable
frequency bands
Slotted ALOHA
Assumptions:
Operation:
All frames same size When node obtains fresh
Time divided into equal frame, transmits in next slot
size slots (time to
If no collision: node can
transmit 1 frame)
send new frame in next
slot
Nodes start to transmit
If collision: node
only slot beginning
retransmits frame in each
Nodes are synchronized
subsequent slot with prob
If 2 or more nodes
p until success
transmit in slot, all
nodes detect collision
Slotted ALOHA
Pros
Single active node can
continuously transmit
at full rate of channel
Highly decentralized:
only slots in nodes
need to be in sync
Simple
Cons
Clock synchronization
Idle slots
Nodes may be able to
detect collision in less
than time to transmit
packet
At best: channel
used for useful
transmissions 37%
of time!
Transmit immediately
= 1/(2e) =than
.18
Even worse
slotted Aloha!
CSMA Collisions
spatial layout of nodes
Collision:
Note:
Collision detection:
Easy in wired LANs
data
poll
master
data
slaves
token overhead
latency
single point of failure
(token)
(nothing
to send)
data
Channel partitioning
Taking turns
5.7 PPP
5.8 Link virtualization:
MPLS
MAC Addresses
32-bit IP address:
Network-layer address
Used to get datagram to destination IP subnet
LAN Addresses
Each adapter on LAN has unique LAN address
1A-2F-BB-76-09-AD
71-65-F7-2B-08-53
LAN
(wired or
wireless)
Broadcast address =
FF-FF-FF-FF-FF-FF
= adapter
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
137.196.7.78
1A-2F-BB-76-09-AD
137.196.7.23
137.196.7.14
LAN
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
137.196.7.88
ARP is plug-and-play:
nodes create their ARP
tables without
intervention from net
administrator
88-B2-2F-54-1A-0F
74-29-9C-E8-FF-55
A
111.111.111.111
E6-E9-00-17-BB-4B
1A-23-F9-CD-06-9B
222.222.222.220
111.111.111.110
111.111.111.112
222.222.222.221
222.222.222.222
B
49-BD-D2-C7-56-2A
CC-49-DE-D0-AB-7D
74-29-9C-E8-FF-55
E6-E9-00-17-BB-4B
111.111.111.111
1A-23-F9-CD-06-9B
222.222.222.220
111.111.111.110
111.111.111.112
CC-49-DE-D0-AB-7D
222.222.222.221
222.222.222.222
B
49-BD-D2-C7-56-2A
5.7 PPP
5.8 Link virtualization:
MPLS
Ethernet
Dominant wired LAN technology:
Cheap ($20) for NIC
First widely used LAN technology
Simpler, cheaper than token LANs and ATM
Kept up with speed race: 10 Mbps 10 Gbps
Metcalfes Ethernet
sketch
switch
star
Preamble:
7 bytes with pattern 10101010 followed by one
byte with pattern 10101011
Used to synchronize receiver, sender clock rates
Addresses: 6 bytes
Exponential Backoff:
CSMA/CD Efficiency
efficiency
1
1 5t prop /t trans
Efficiency goes to 1
as tprop goes to 0
MAC protocol
and frame format
100BASE-TX
100BASE-T2
100BASE-FX
100BASE-T4
100BASE-SX
100BASE-BX
copper (twisted
pair) physical layer
Manchester Encoding
Used in 10BaseT
Each bit has a transition
Allows clocks in sending and receiving nodes to
synchronize to each other
No need for a centralized, global clock among nodes!
5.7 PPP
Hubs
physical-layer (dumb) repeaters:
bits coming in one link go out all other links at same rate
all nodes connected to hub can collide with one another
no frame buffering
no CSMA/CD at hub: host NICs detect collisions
twisted pair
hub
Switch
Transparent
Plug-and-play, self-learning
B
1 2
3
6
5 4
C
B
Switch Table
B
1 2
3
6
5 4
C
B
Switch: Self-learning
Source: A
Dest: A
A A A
B
1 2
3
6
5 4
C
B
MAC addr
interface
TTL
60
Switch table
(initially empty)
Self-learning,
Forwarding:
example
Source: A
Dest: A
A A A
C
frame destination
1 2
3
A6A
5 4
unknown: flood
Destination A
location known:
selective send
A A
B
1
4
60
60
Switch table
(initially empty)
Interconnecting Switches
S3
S2
D
F
E
I
G
single-switch case!)
1
S1
A
B
S2
D
S3
F
I
G
S 2, S 3, S 4
Institutional Network
to external
network
mail server
router
web server
IP subnet
5.7 PPP
5.8 Link virtualization:
MPLS
802.11n
802.11a,g
data
802.11b
802.16 (WiMAX)
UMTS/WCDMA-HSPDA, CDMA2000-1xEVDO
3G cellular
enhanced
802.15
.384
.056
3G
UMTS/WCDMA, CDMA2000
2G
Indoor
Outdoor
10-30m
50-200m
Mid-range Long-range
outdoor
outdoor
200m 4 Km
5Km 20 Km
10-1
10-2
10-3
BER
10-4
10-5
10-6
10-7
10
20
30
SNR(dB)
QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
40
C
Cs signal
strength
As signal
strength
space
Signal attenuation:
802.11g
C
A
C
Cs signal
strength
As signal
strength
space
802.11 receiver
- if frame received OK
sender
receiver
DIFS
data
SIFS
ACK
QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
operating point
10-1
10-2
10-3
BER
Rate Adaptation
Base station, mobile
dynamically change
transmission rate
(physical layer
modulation technique)
as mobile moves, SNR
varies
10-4
10-5
10-6
10-7
10
20
30
SNR(dB)
40
More Wireless!
Power management
Other protocols: Zigbee, 3G, WiMax
Mobility
Security
Link Layer
5.7 PPP
5.8 Link virtualization:
MPLS
Putting-it-all-together: synthesis!
browser
Comcast network
68.80.0.0/13
school network
68.80.2.0/24
web page
web server
64.233.169.105
Googles network
64.233.160.0/19
DHCP
UDP
IP
Eth
Phy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
UDP
IP
Eth
Phy
router
(runs DHCP)
Ethernet demuxed to IP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
UDP
IP
Eth
Phy
router
(runs DHCP)
DNS
UDP
IP
ARP
Eth
Phy
ARP
ARP reply
Eth
Phy
DNS
UDP
IP
Eth
Phy
DNS
DNS server
Comcast network
68.80.0.0/13
DNS
DNS
DNS
DNS
DNS
UDP
IP
Eth
Phy
HTTP
TCP
IP
Eth
Phy
SYNACK
SYN
SYNACK
SYN
SYNACK
SYN
SYNACK
SYN
SYNACK
SYN
SYNACK
SYN
TCP
IP
Eth
Phy
web server
64.233.169.105
HTTP
TCP
IP
Eth
Phy
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
TCP
IP
Eth
Phy
web server
64.233.169.105
IP datagram containing
HTTP request routed to
www.google.com
IP datgram containing
HTTP reply routed back to
client
Chapter 5: Summary
(except PHY)
Solid understanding of networking
principles, practice
.. could stop here . but lots of interesting
topics!
Wireless
Multimedia
Security
Network management