Transcript Chapter 5

Chapter 5
Data Link Layer
A note on the use of these ppt slides:
We’re making these slides freely available to all (faculty, students, readers).
They’re in powerpoint form so you can add, modify, and delete slides
(including this one) and slide content to suit your needs. They obviously
represent a lot of work on our part. In return for use, we only ask the
following:
 If you use these slides (e.g., in a class) in substantially unaltered form,
that you mention their source (after all, we’d like people to use our book!)
 If you post any slides in substantially unaltered form on a www site, that
you note that they are adapted from (or perhaps identical to) our slides, and
note our copyright of this material.
Computer Networking:
A Top Down Approach
Featuring the Internet,
2nd edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2002.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2002
J.F Kurose and K.W. Ross, All Rights Reserved
5: DataLink Layer
5a-1
Chapter 5 outline
 5.1 Introduction and
 5.6 Hubs, bridges, and





services
5.2 Error detection
and correction
5.3Multiple access
protocols
5.4 LAN addresses and
ARP
5.5 Ethernet



switches
5.7 Wireless links and
LANs
5.8 PPP
5.9 ATM
5.10 Frame Relay
5: DataLink Layer
5a-1
5a-2
Hubs
Physical Layer device
 Simplest way to interconnect LANs
 Operates on bits rather than frames
 When a bit comes into a hub interface, the
hub broadcasts the bit on all the other
interfaces.
5: DataLink Layer
5a-2
5a-3
Interconnecting with hubs
 Multi-tier hub design (hierarchy)
 Backbone hub interconnects three academic depts or “LAN
segments”
 Depts have a 10BaseT Ethernet that provides network access
 Hosts have point-to-point connections to departmental hub
5: DataLink Layer
5a-3
5a-4
Hubs: Benefits
 Provides interdepartmental communication
 Extends the max distance betw any pair of nodes
 Multi-tier design provides a degree of graceful
degradation
 If one dept malfunctions, the backbone hub can
detect the prob and disconnect the dept hub
5: DataLink Layer
5a-4
5a-5
Hubs: Limitations
 When departmental LANs are interconnected by a
hub, then the independent collision domains
become one collision domain.
 If depts use different Ethernet technologies, may
not be able to interconnect them
 Each Ethernet technology has restrictions on




max # of nodes in collision domain
max distance between two hosts
max # of tiers
Constrains # of hosts as well as geographical reach of
the multi-tier LAN.
5: DataLink Layer
5a-5
5a-6
Bridges
Link layer device
 Operate on Ethernet frames unlike hubs
 are full-fledged packet switches that forward and
filter Ethernet frames using the LAN destination
addresses
 examines frame header and selectively forwards
frame based on MAC dest address
 when frame is to be forwarded on segment, uses
CSMA/CD to access segment
5: DataLink Layer
5a-6
5a-7
Bridges: traffic isolation
 Bridge installation breaks LAN into LAN segments
 bridges filter packets:
 same-LAN-segment
frames not usually
forwarded onto other LAN segments
 segments become separate collision domains
collision
domain
collision
domain
bridge
LAN segment
= hub
= host
LAN segment
LAN (IP network)
5: DataLink Layer
5a-7
5a-8
Forwarding
How do determine to which LAN segment to forward
frame?
• Looks like a routing problem...
5: DataLink Layer
5a-8
5a-9
Self learning
 A bridge has a bridge table
 entry in bridge table:
(Node LAN Address, Bridge Interface, Time Stamp)
 stale entries in table dropped (TTL can be 60 min)
 bridges learn which hosts can be reached through
which interfaces
 when frame received, bridge “learns” location of
sender: incoming LAN segment
 records sender/location pair in bridge table

5: DataLink Layer 5a-10
5a-9
Filtering/Forwarding
When bridge receives a frame:
index bridge table using MAC dest address
if entry found for destination
then{
if dest on segment from which frame arrived
then drop the frame
else forward the frame on interface indicated
}
else flood
forward to all but the interface
on which the frame arrived
5: DataLink Layer 5a-10
5a-11
Bridge example
Suppose C sends frame to D and D replies back with
frame to C.
 Bridge receives frame from from C
 notes in bridge table that C is on interface 1
 because D is not in table, bridge sends frame into interfaces
2 and 3
 frame received by D
5: DataLink Layer 5a-12
5a-11
Bridge Learning: example
C
D
 D generates frame for C, sends
 bridge receives frame


notes in bridge table that D is on interface 2
bridge knows C is on interface 1, so selectively forwards
frame to interface 1
5: DataLink Layer 5a-13
5a-12
Bridges Spanning Tree
 for increased reliability, desirable to have
redundant, alternative paths from source to dest
 with multiple paths, cycles result - bridges may
multiply and forward frame forever
 solution: organize bridges in a spanning tree by
disabling subset of interfaces
Disabled
5: DataLink Layer 5a-14
5a-15
Some bridge features
 Isolates collision domains resulting in higher total
max throughput
 Can have limitless number of nodes and
geographical coverage
 Can be used to combine Ethernet segments using
different Ethernet technologies with Ethernet
bridges
 10Base2, 100BaseT, 10Base2 = can use a Gigabit bridge
 Transparent (“plug-and-play”): no configuration
necessary
5: DataLink Layer 5a-15
5a-16
Interconnection without backbone
Not recommended for two reasons:
- single point of failure at Computer Science hub
- all traffic between EE and SE must path over
CS segment
5: DataLink Layer 5a-16
Backbone configuration
Recommended !
Backbone:
a network that has direct connections
to all the LAN segments
5: DataLink Layer 5a-17
Bridges vs. Routers
both store-and-forward devices
routers:
network layer devices (IP Address)
bridges are link layer devices (LAN Address)
routers maintain routing tables, implement
routing algorithms
 bridges maintain bridge tables, implement filtering,
learning and spanning tree algorithms
5: DataLink Layer 5a-18
Routers vs. Bridges
Bridges Pros
+ Bridge operation is simpler resulting in high
packet filtering and forwarding rates.
+ Bridge tables are self learning
+ “plug-and-play”
Bridges Cons
- All traffic confined to spanning tree, even
when more direct (but disconnected) path.
- Bridges do not offer protection from broadcast
storms
5: DataLink Layer 5a-19
Routers vs. Bridges
Routers Pros
+ arbitrary topologies can be supported, cycling is
limited by TTL counters (datagram)
+ provide protection against broadcast storms
Routers Cons
- require IP address configuration (not Plug-and-play)
- require higher packet processing
 bridges do well in small (few hundred hosts) while
routers used in large networks (thousands of hosts)
- Pronunciation
5: DataLink Layer 5a-20
Ethernet Switches
Essentially a multi-interface bridge
layer 2 (frame) forwarding,
filtering using LAN addresses
Switching: A-to-A’ then
B-to-B’ simultaneously
No collisions (full duplex mode)
 often: individual hosts,
star-connected into switch
 Dedicated Access
5: DataLink Layer 5a-21
Ethernet Switches
frame forwarded from
input to output port without awaiting for
assembly of entire frame
cut-through switching:
slight
reduction in latency
ex. Caravan
 combinations of shared/dedicated,
10/100/1000 Mbps interfaces
5: DataLink Layer 5a-22
Not an atypical LAN (IP network)
Dedicated
Shared
5: DataLink Layer 5a-23
Summary comparison
hubs
bridges
routers
switches
traffic
isolation
no
yes
yes
yes
plug & play
yes
yes
no
yes
optimal
routing
cut
through
no
no
yes
no
yes
no
no
yes
5: DataLink Layer 5a-24
Chapter 5 outline
 5.1 Introduction and




services
5.2 Error detection and
correction
5.3Multiple access
protocols
5.4 LAN addresses and
ARP
5.5 Ethernet
 5.6 Hubs, bridges, and




switches
5.7 Wireless links and
LANs
5.8 PPP
5.9 ATM
5.10 Frame Relay
5: DataLink Layer 5a-25
Wireless Links
 The wave of the future for
networking: wireless links
 Examples of end systems:


Portable PCs, PDAs, airport
hubs, wireless telephony (such
as the cellphone pictured)
Future appliances may include
cameras, automobiles, pets,
security systems, kitchen
appliances, and plants.
 IEEE 802.11b – most popular
standard wireless LANs
 Bluetooth – new standard that
allows devices to communicate
with each other
 Three classifications:



Power, range, data rate
Bluetooth – low, short, low
802.11 – high, medium, high
5: DataLink Layer 5a-26
IEEE 802.11 Wireless LAN
 802.11b
 Currently most popular
form of wireless LAN:
wireless Ethernet, Wi-Fi
 2.4-5 GHz unlicensed
radio spectrum
 up to 11 Mbps
 physical layer and Media
Access Control (MAC)
layer for wireless local
area network


direct sequence spread
spectrum (DSSS) in
physical layer
• all hosts use same
chipping code
• Not a multi access
protocol (does not
coordinate channel
access from multiple
hosts
widely deployed, using
base stations
5: DataLink Layer 5a-27
IEEE 802.11 Wireless LAN
 Other wireless standards
802.11a – operates on 5-6GHz range and uses OFDM
(orthogonal frequency-division multiplexing, not DSSS
 Speeds can get up to 54Mbps
 802.11g – operates at 2.4GHz
 Speeds up to 54Mbps
 All use CSMA/CA for multi-access and have base stations
and ad-hoc network versions

5: DataLink Layer 5a-28
Base station approch
 Wireless host communicates with a base station
 base station = access point (AP)
 Basic Service Set (BSS) (a.k.a. “cell”) contains:
wireless hosts
 access point (AP): base station
 BSS’s combined to form distribution system (DS)

5: DataLink Layer 5a-29
Ad Hoc Network approach
 No AP (i.e., base station)
 wireless hosts communicate with each other
to get packet from wireless host A to B may need
to route through wireless hosts X,Y,Z
 Applications:
 “laptop” meeting in conference room, car
 interconnection of “personal” devices
 battlefield
 IETF MANET
(Mobile Ad hoc Networks)
working group

5: DataLink Layer 5a-30
IEEE 802.11: multiple access
 Collision if 2 or more nodes transmit at same time
 CSMA makes sense:
 get all the bandwidth if you’re the only one transmitting
 shouldn’t cause a collision if you sense another transmission
 Collision detection doesn’t work: hidden terminal
problem
5: DataLink Layer 5a-31
IEEE 802.11 MAC Protocol: CSMA/CA
802.11 CSMA: sender
- if sense channel idle for DISF
sec.
then transmit entire frame (no
collision detection)
-if sense channel busy
then binary backoff
802.11 CSMA receiver
- if received OK
return ACK after SIFS
(ACK is needed due to hidden
terminal problem)
5: DataLink Layer 5a-32
Collision avoidance mechanisms
 Problem:
 two nodes, hidden from each other, transmit complete
frames to base station
 wasted bandwidth for long duration !
 Solution:
small reservation packets
 nodes track reservation interval with internal
“network allocation vector” (NAV)

5: DataLink Layer 5a-33
Collision Avoidance: RTS-CTS
exchange
 sender transmits short
RTS (request to send)
packet: indicates duration
of transmission
 receiver replies with short
CTS (clear to send) packet

notifying (possibly hidden)
nodes
 hidden nodes will not
transmit for specified
duration: NAV
5: DataLink Layer 5a-34
Collision Avoidance: RTS-CTS
exchange
 RTS and CTS short:
collisions less likely, of
shorter duration
 end result similar to
collision detection
 IEEE 802.11 allows:
 CSMA
 CSMA/CA: reservations
 polling from AP

5: DataLink Layer 5a-35
Cellular vs Wireless LAN
 3G Cellular mobile
 2Mbps indoor
 384kbps outdoor
 Licensed radio freq (1885
– 2025 and 2110 – 2200
MHz)
 Cons
 3G is more costly ($2000
for radio freq licenses)
 Competition from
wireless LAN tech.
 IEEE 802.11b wireless
LAN enjoys more
widespread usage




802.11 LAN capable
cards will be installed in
most all prepackaged
computers
Continue with other
devices
Bulk of traffic local
termination
Handles GSM/GPRS
5: DataLink Layer 5a-36
A word about Bluetooth
 Low-power, small radius,
wireless networking
technology

10-100 meters
 omnidirectional
 not line-of-sight infared
 Interconnects gadgets
 2.4-2.5 GHz unlicensed
radio band
 up to 721 kbps
 Interference from wireless
LANs, digital cordless
phones, microwave
ovens:

frequency hopping helps
 MAC protocol supports:
 error correction
 ARQ
 Each node has a 12-bit
address
5: DataLink Layer 5a-37