Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 115

Advanced Computer

Networks
ECE 5713

Direct Link Networks


– Shared Links
Dr. Amir Qayyum
The Big Picture
Midterm
exam
(estimated)

You
are
here
2
What we know
• Elements of networks: nodes and links
• Building a packet abstraction on a point-
to-point link
– transmission methods and challenges
– limiting factors on data rates
– defining units of communication data
– detecting transmission errors
– simulating an error-free channel
• Sliding window mechanism

3
What Next ?

• arbitrating access to a shared medium

• After that: network adapters and example


protocols

4
Shared Access Networks

Outline
Bus (Ethernet)
Wireless (802.11)

5
Shared Access Media

• Arbitrating access to a shared media


– Multiple hosts on a single link

6
Multiple Access Media
• Multiple senders on some media
– buses (Ethernet, including links in switched form)
– radio, satellite
– token rings

• Need method to moderate access


– fair arbitration
– good performance

7
Shared Media
• Communication needs vary
– over time
– between hosts
• Network is not fully utilized
• Recall methods for multiplexing
– frequency-division multiplexing (FDM, separate
bands)
– time-division multiplexing (TDM, synchronous time
slots)
– statistical TDM (STDM, time slots on demand)
• STDM most appropriate with stated assumptions
8
Shared Media: Problems & Solutions
• Problem: demands can conflict, e. g. , two hosts
send simultaneously
– STDM does not address this problem - centralized
– solution is a medium access control (MAC) algorithm
• Three solutions (out of many)
– carrier sense multiple access with collision detection
(CSMA / CD)
• send only if medium is idle
• stop sending immediately if collision detected
– token ring/Fiber Distributed Data Interface (FDDI)
pass a token around a ring; only token holder sends
– radio / wireless (IEEE 802.11)
9
Ethernet

10
History of Ethernet
• Developed by Xerox PARC in mid-1970s
• Roots in Aloha packet-radio network
• Standardized by Xerox / DEC / Intel in 1978
• Similar to IEEE 802.3 standard
• IEEE 802.3u standard defines Fast Ethernet
(100 Mbps), now Gigabit Ethernet …
• Switched Ethernet is now mostly deployed

11
Ethernet Topologies
• Bus— all nodes connected to a wire
...

• Star— all nodes connected to a central repeater

• Combinations thereof
12
Ethernet Adaptor
• Segment of up to 500 m Transceiver
• Nodes tap into segments
• Taps must be 2.5m apart Ethernet cable

• Transceiver performs Adaptor

carrier sensing
• Transceiver transmits
and receive signals
• Protocol is implemented
in the adaptor Host

13
Ethernet Components
10Base5 (ThickNet)

controller (Ethernet card)

vampire tap
bus topology

transceiver
14
Ethernet Components
10Base2 (ThinNet)

controller (Ethernet card)

BNC T-junction
transceiver
bus topology

15
Ethernet Components
10BaseT (twisted pair)

controller (Ethernet card)

hub
star topology

16
Ethernet – Multiple Segments
• Repeaters forward the broadcast signal on all out
going segments (10Base5)
• Maximum of 4 repeaters (2500m), 1024 hosts


Repeater


Host


17
Ethernet Repeaters

18
Ethernet – Alternative Technologies
• Can be constructed from a thinner cable (10Base2)
rather than 50-ohm coax cable (10Base5)
• Current technology uses 10BaseT (twisted pair)
– several point-to-point segments coming out of a
multiway repeater called “hub”; same collision domain

19
Ethernet Packet Frame
• Preamble allows the receiver to synchronize with
signal
• Frame must contain at least 46 bytes to detect
collision
• 802.3 standard substitutes length with type field
– Type field (demux key) is the first thing in data portion
– A device can accept both frames: type > 1500

20
Ethernet Address

• Addresses
– unique, 48-bit unicast address assigned to each adapter
– example: 8:0:e4:b1:2
– broadcast: all 1s
– multicast: first bit is 1
– promiscuous mode
• Problem remains for multiple access links: A
distributed algorithm that provides fair access

21
Ethernet MAC – CSMA/CD
• Multiple access
– Nodes send and receive frames over a shared
link
• Carrier sense
– Nodes can distinguish between an idle and busy
link
• Collision detection
– A node listens as it transmits to detect collision

22
CSMA/CD MAC Algorithm
• If line is idle (no carrier sensed) …
– Send immediately
– Upper bound message size of ~1500 bytes
– Must wait 9.6us between back-to-back frames
• If line is busy (carrier sensed) …
– Wait until the line becomes idle and then transmit
immediately
– Called 1-persistent (special case of p-persistent)
• If collision detected
– Stop sending data and jam signal
– Try again later

23
Collision Detection
my-machine your-machine

start start
transmission transmission
at time 0 at time T

almost there collision !!!


at time T
How to ensure that my-machine knows about the collision?
24
Collision Detection

25
Constraints on Collision Detection
• In our example, consider
– my-machine’s message reaches your-machine at T
– your-machine’s message reaches my-machine at 2T
• Thus, my-machine must still be transmitting at 2T
• Specifics of IEEE 802.3
– bounds 2T to 51.2 microseconds
– packet must be at least 64B long
• Jam after the collision, for 32 bits, then stop
transmitting frame (runt frame of 96 bits)
– ensures that all hosts notice collision
26
Ethernet Min. Frame Size

• RTT on a maximally configured Ethernet of


2500m, with 4 repeaters is about 51.2 μs
– 2500m / 2 x 108 m/s = 12.5 us
– 2 x 12.5 = 25 us + repeater delays
• 51.2 μs on 10 Mbps corresponds to 512 bits
• 512 bits are 64 bytes
• Therefore, the minimum frame length for
Ethernet is 64 bytes (header + 46 bytes of data)
27
Collision Detection
my-machine your-machine

start start
transmission transmission
at time 0 at time T

almost there collision


at time T

my-machine notices collision before transmission ends at 2T


28
Collision Detection

29
Retry After the Collision
• How long should a host wait to retry after a
collision ?
– Binary exponential backoff
• maximum backoff doubles with each failure
(exponential)
• after N failures, pick an N-bit number
• 2N discrete possibilities from 0 to maximum
– Delay and try again algorithm
• 1st time: 0 or 51.2us
• 2nd time: 0, 51.2, or 102.4us
• 3rd time51.2, 102.4, or 153.6us
• nth time: k x 51.2us, for randomly selected k=0..2n -
1
• Give up after several tries (usually 16)
30
Binary Exponential Backoff

choices after choices after


1 collision 2 collisions
0 Ts 2Ts 3Ts

time

time of last • Why used fixed time slots ?


collision
• How long slots should be ?
31
Binary Exponential Backoff
• Ts is 51.2 microseconds for IEEE 802.3
• Consider that k hosts collide
– each picks random number from 0 to 2( N-1)
– if minimum value is unique
• all other hosts see busy line
• remember that Ethernet RTT < 51.2 microseconds
– if minimum value is not unique
• hosts in minimum value slot collide again
• following slot idle
• consider next smallest backoff value

32
Ethernet Frame Reception
• Sender handles all access control
• Receiver simply pulls frames from network
• Ethernet controller/card
– sees all frames
– selectively passes frames to host processor
• Acceptable frames
– addressed to host, or to multicast address to which host
belongs or to a broadcast address
– anything if in promiscuous mode (packet sniffing and
tcpdump requirement)
33
Ethernet Collision Detection
• Bus topology Ethernets
– Transceiver handles
• Carrier detection
• Collision detection
• Jamming after a collision
– Transceiver sees voltage sum
• Outgoing signal
• Incoming signal
– Looks for voltages impossible for local alone
• Attenuation can prevent detection
• Limits segment length

34
Ethernet Collision Detection
• Hub topology Ethernets
– Controller/card handles carrier detection
– Hub handles
• Collision detection
• Jamming after a collision
– Detect transmission activity on each line
– If more than 1 line (host) active
• Assert collision to all lines
• Continue until no lines active
– Attenuation is less critical

35
Experience With Ethernet
• Number of hosts limited to 200 in practice,
standard allows 1024
• Range much shorter than 2.5 km limit in standard
• Round-trip time is typically 5 or 10 μs, not 50μs
• Higher-level flow control (i.e., TCP) limits load
– 30% maximum load recommended
– Large packets recommended
• Star topologies easier to administer than Bus
– Failure isolation, node addition w/o complex topology
• (Backwards) Compatibility more important than
elegance or raw performance (1 > 0)
36
Token Ring

37
Token Ring Overview
• Token Ring network “was” a candidate to replace
Ethernet; used in some MAN backbones
– 16Mbps IEEE 802.5 (based on earlier 4Mbps IBM ring)
– 100Mbps Fiber Distributed Data Interface (FDDI)

38
Token Ring Rationale
• Why emulate a shared medium with
point-to-point links?
• Why a shared medium?
– convenient broadcast capabilities
– switches are costly
• Why emulation?
– simpler MAC algorithm: only have 2 wires
– fairer access arbitration
– fully digital (802.3 collision detection
requires analog)

39
IBM Token Ring – IEEE 802.5
• Data flows in a particular direction
– a node receives frames from its upstream neighbor
– a node forwards frames to its downstream neighbor
• Ring is viewed as a single shared medium
– each node is allowed to transmit according to some
distributed algorithm for medium access
– all nodes see all frames; destination saves a copy of
frame as it flows past
• The term “token” indicates the way the access
to shared channel is managed
40
Token Ring State Diagram
No token
(pass frames along)

get token release token

Token
(insert new frames)

41
Token in a Token Ring
• Token is a special bit pattern that rotates around
the ring
– A node must capture token before transmitting
– A node releases token after done transmitting
• Immediate release- token follows last frame (FDDI)
• Delayed release – after last frame returns to sender
• Remove your frame when it comes back around
– Transmit another frame or re-insert the token
• Stations get round-robin service as the token
circulates around the ring

42
Token Release

Token Token Fra


m
e e
a m
Fr

(a) immediate release (b) delayed release

43
Physical Properties
• A node is connected into the ring using a relay
– Relay is open as long as the station is alive (a)
– Relay closes and bypasses the station if it is dead (b)

Host Host

From previous To next From previous To next


host host host host

Relay Relay
(a) (b)

44
Physical Properties
• Several relays are packed into a single box: multi
Station Access Unit (MSAU)
– Stations can be added/removed by plugging/unplugging
– IBM token ring requires MSAU but 802.5 does not
• Data rate can be 4 Mbps or 16 Mbps
• Encoding of bits uses differential Manchester
• Ring may have up to 250 (802.5) or 260 (IBM)
nodes
• Physical medium is twisted pair (IBM Token Ring)

45
MSAU
Host

MSAU

Host Host

From previous
MSAU

To next Host
MSAU

46
Token Ring MAC
• Network adaptor contains the receiver, transmitter
and some storage of bits between them
• Token circulates if no station has anything to send
– Ring must have enough capacity to store entire token
– At least 24 stations with 1-bit storage for 24-bit long
token (if propagation delay is negligible)
– This situation is avoided by designating a monitor

47
Token Ring MAC

• Any station that has a data to send can seize


token
• In 802.5, simply 1 bit in second byte token is
modified
• First two bytes of modified token become
preamble for the next frame

48
Token Ring MAC
• The station is then allowed to send one or more
frames
• Destination address may be a multicast or a
broadcast address
• Intended recipient copies the frame into a buffer
• Sender is responsible for removing these frames
• Frame longer than the capacity of ring is drained
by the sender while still transmitting its later part

49
Frame Format
• “Illegal” Manchester codes in the start and end
delimiters
• Frame priority and reservation bits in access
control byte
• Demux key in frame control byte
• A and C bits for reliable delivery, in status byte

8 8 8 48 48 Variable 32 8 8
Start Access Frame Dest Src Body CRC End Frame
delimiter control control addr addr delimiter status

50
Token Ring MAC Issue
• A node captures the token and sends as
much data as it has …
– A node could keep the token for arbitrarily long
time, and other nodes are not given the turn
– Favors nodes with large data over nodes having
a small message to send

• How much data a node is allowed to


transmit each time it capture the token ?

51
Timed Token Algorithm
• Token Holding Time (THT)
– Upper limit on how long a station can hold the token
– A node checks before putting each frame on ring that
its transmit time would not cause THT to exceed
– Long THT achieves better utilization with few senders
– Short THT helps when multiple nodes have data to send
• Token Rotation Time (TRT)
– How long it takes the token to traverse the ring.
– TRT <= ActiveNodes x THT + RingLatency

52
Reliable Delivery
• The A and C bit in the packet trailer for reliability
• Both bits are initially set to 0
• Destination sets A bit if it sees the frame and sets
C bit if it copies the frame into its adaptor
• If sender receives bit A=0, it assumes destination
is absent (not functioning)
• If A bit is set but not bit C, it means destination is
unable to accept the frame
– Sender retransmits this frame later

53
Token Ring Packet Priorities
• Token contains 3-bit priority field
• Token priority changes over time by using
reservation bits in the frame header
• A station willing to send priority n packet can set
reservation bits to n, if this makes it lower in value
– it captures the token when the current sender releases it
with priority set to n
• Strict priority scheme: no lower-priority packets
get sent when higher priority packets are waiting

54
Token Maintenance
• Token rings have a designated monitor node
• Any station can become the monitor according to
a well defined procedure
• Monitor is elected when the ring is first
connected, or when the current monitor fails
• Monitor periodically announces its presence
• Claim token sent by a station seeing no monitor
– if the sender receives back the claim token, it becomes
monitor
– if another station is also contending for monitor, some
rule defines the monitor
55
Monitor’s Role
• May add additional delay into the ring
• Assures that a valid token is present in the
ring because token may be lost:
– No token when initializing the ring
– Bit error corrupts token pattern
– Node holding the token crashes
• Maintains a timer to detect the missing token
– Timer = NumStations x THT + RingLatency
– When times expires, it creates a new token

56
Monitor’s Role
• Checks for corrupted frames
– checksum error, invalid format, may circulate
forever
– Monitor drains them off the ring
• Checks for orphaned frames
– sending station died before removing the frame
– “Monitor” bit is used to detect orphaned frames
– Initially 0, and set to 1 when a frame passes the
monitor
– If the monitor sees a frame with this bit set, it
drains it off

57
Fiber Distributed Data
Interface (FDDI)

58
Fiber Distributed Data Interface
• Similar to 802.5/IBM token rings but runs on fiber
• Consists of a dual ring: two independent rings that
transmit data in opposite directions at 100Mbps
• Tolerates a single link break or node failure (self-
healing ring)

(a) (b) 59
FDDI - Concentrator
• Allows nodes to attach using a single cable - SAS
• Dual connected nodes still exist - DAS
• Concentrator attaches several SASs to dual ring
– Uses optical bypass to isolate failed SAS

Upstream Downstream
neighbor (DAS) neighbor (DAS)

Concentrator (DAS)

SAS SAS SAS SAS

60
FDDI – Physical Properties
• Variable size buffer (9 - 80 bits) between input
and output interfaces (10 ns bit time)
– not required to fill buffer before starting transmission
• Maximum 500 stations, maximum 2 km distance
between any pair of stations
• Total 200 km fiber: dual nature implies 100 km
cable connecting all stations
• Physical media can be coax or twisted pair cable
• Uses 4B/5B encoding

61
Timed Token Algorithm
• Token Holding Time (THT)
– upper limit on how long a station can hold the token
– configured to some suitable value
• Token Rotation Time (TRT)
– how long it takes the token to traverse the ring (time
since a host released the token)
– TRT <= ActiveNodes x THT + RingLatency

• Target Token Rotation Time (TTRT)


– “agreed-upon” or negotiated upper bound on TRT
62
MAC Algorithm
• Each node measures TRT between
successive token arrivals
• If measured-TRT > TTRT
– Token is late
– Can not send data
• If measured-TRT < TTRT
– Token is early so OK to send
– Send data for remaining time until either
• No more data to send
• THT >= (TTRT – measured TRT)

63
FDDI MAC Issue
• If a node has lots of data, it holds the
token for the maximum allowed time
• When a downstream neighbor gets the
token, its measured TRT >= TTRT
– It cannot transmit its frame

• What if the downstream neighbor has


some urgent data to send ?

64
FDDI Traffic Classes
• Synchronous traffic
– Latency sensitive
– Gets higher priority
– Can always send data
• Asynchronous traffic
– Sensitive to throughput rather than delay
– Lower priority
– Can send only if token is early
• May cause the time to exceed by one FDDI frame

65
Bounded Priority Traffic
• If a node has large amount of synchronous data
– It will send regardless of measured TRT
– TTRT will become meaningless !!!
• Therefore, total synchronous data during one
token rotation is bounded by TTRT
• Worse case: 2xTTRT between seeing token
– One TTRT is consumed first by asynchronous data
– Another TTRT is then consumed by synchronous data
• Back-to-back 2xTTRT rotations not possible

66
Token Maintenance
• Monitoring for the lost token
– No token when initializing ring
– Bit errors corrupt token pattern
– Node holding the token crashes
• Monitoring for a valid token
– Should periodically see valid transmission
(frame or token)
– Max. gap = ring latency + max frame <= 2.5ms
• Set 2.5ms timer; start negotiations if it fires

67
Token Maintenance
• The procedure is executed when a node
– joins the ring (startup)
– suspects a failure
• Claim frame is used in order to
– Generate a new Token
– Agree on TTRT (so that an application can
meet its timing constraints)
• A node can send a claim frame without
holding the token

68
Token Maintenance Procedure
• A node sends a claim frame including its TTRT bid
• When a node receives a claim frame, it compares the
bid with its own bid
– If its bid is higher, it updates TTRT & forward the frame
– If its bid is lower, it replaces with its own claim frame
– If the bids are equal, higher address node wins
• If a node’s claim frame returns back to it, it knows:
– its bid was the lowest
– everyone knows TTRT
– it can now insert new token

69
Frame Format
• 4B/5B control symbols for start and end of frame
• Control Field
– 1st bit: asynchronous (0) versus synchronous (1) data
– 2nd bit: 16-bit (0) versus 48-bit (1) addresses
– last 6 bits: demux key (includes reserved patterns for
token and claim frame)
• Status Field
– from receiver back to sender; error in frame
– recognized address; accepted frame (flow control)
8 8 48 48 Variable 32 8 24
Start of Control Dest Src Body CRC End of
frame addr addr frame Status

70
Feedback

• Error detection
– Host attaches “error” marker to frame
– Sender detects error marker, resends later

• Flow control
– Host attaches “my address but did not copy”
– Sender detects problem, resends later (backs off)

71
Wireless LANs

72
Wireless Networks
• Wired vs Wireless
– Issues of bit errors (Unpredictable noise environment)
– Power issues
• Channel access issues
– Wireless links share the same medium
– Band allocations by FCC
– ISM bands
• Classification
– Mesh, Ad Hoc, Sensor, MANET, VANET, etc.
73
Wireless LANs
• IEEE 802.11 standard
– Designed for use in a small area (offices, campuses)
• Bandwidth: 1, 2 or 11 Mbps
– Up to 56Mbps in newer 802.11a standard
• Targets three physical media
– Two spread spectrum radio (2.4GHz frequency)
– One diffused infrared (10m range, 850 nm band)

74
Spread Spectrum
• Spread signal over wider frequency band
– Uses more frequency spectrum than strictly necessary
• Originally designed to thwart jamming/interference
– Pseudo-random sequence, signal looks like a noise
• Introduce pseudo-random component into signal
• Sender and receiver share
– Pseudorandom number generator and the seed
• Frequency Hopping
– Transmit over pseudo-random sequence of frequencies
– 802.11 uses 79 x 1MHz-wide frequency bands

75
Direct Sequence Spread Spectrum
• Add redundancy for greater tolerance of interference
• For each bit, send XOR of the bit and n random bits
– Random sequence is known to sender and receiver
• n random bits are called n-bit chipping code
– 802.11 defines an 11-bit chipping code 83MHz band

76
Overview of Wireless Technologies
Blutooth Wi-Fi Wi-Max 3G
IEEE 802.15 IEEE 802.11 IEEE 802.16 Cellular
Typical Link 10 m 100 m 10 km Tens of Km
Length
Typical 2.1 Mbps 54 Mbps 70 Mbps 384+ kbps
Bandwidth (shared) (shared) (shared) (per
connection)
Typical Use Link a Link a Link a Link a cell
peripheral to a computer to building to a phone to a
computer a wired base wired tower wired tower
Wired
Technology USB Ethernet Coaxial cable DSL
Analogy

77
Wireless Network with Base Station

78
Adhoc or Mesh Wireless Network

79
IEEE 802.11 / Wi-Fi
• Designed for use in limited geographical area
(home, office buildings, campuses)
• Key challenge: mediate access to a shared medium
• IEEE 802.11a/b/g/n variants
– Wi-Fi is a trademark, owned by the Wi-Fi Alliance
• Physical properties
– Multiple physical layers: different radio band /data
rates
– Original 802.11 provides frequency hopping and spread
spectrum, both provide data rate up to 2Mbps 80
IEEE 802.11 Variants

Max Range Range


Freq.
802.11 Release Throughput bitrate Modulation (Indoor) (Outdoor)
(GHz) (m) (m)
(Mbit/s)

– Jun 1997 2.4 0.9 2 DSSS ~20 ~100


a Sep 1999 5 23 54 OFDM ~35 ~120
b Sep 1999 2.4 4.3 11 DSSS ~38 ~140
g Jun 2003 2.4 19 54 OFDM ~38 ~140
Sep 2009 2.4
n 130 600 OFDM ~70 ~250
(expected) 5
y Nov 2008 3.7 23 54 OFDM ~50 ~5000
81
802.11 MAC: CSMA/CA
• Similar to Ethernet …
– Defer the transmission until the link becomes idle
– Take back off if collision occurs
• Uses ‘Collision Avoidance’
– Transmitters do not guarantee that collision will not
occur
– Explicit Ack from receiver
• Is it sufficient ?
– All nodes are not always within reach of (hear) each
other

82
Hidden and Exposed Nodes
• Hidden nodes
– Sender thinks its OK to
send when its not (false
+ve)
– A and C are hidden nodes in
the figure

• Exposed nodes
– Sender does not send when
its OK to send (false –ve) A B C D

– B and C are exposed nodes


in the figure
83
Multiple Access with Collision
Avoidance (MACA)
• Sender transmits RequestToSend (RTS)
frame
– contains intended time to hold the medium
• Receiver replies with ClearToSend (CTS)
frame
• Neighbors of the receiver …
– hear CTS: keep quiet for the intended duration
(or till the ACK is heard)
• Neighbors of only the sender
– hear RTS but not CTS: OK to transmit

84
MACA for Wireless (MACAW)
• Receiver sends an ACK when it receives a
frame
– Signal for neighbors to start their transmission
– Its neighbors are silent until they hear ACK
• Collision detection
– No active collision detection
– Known only if CTS or ACK is not received
– Binary exponential back off (BEB) is used in
case of collision, like in Ethernet

85
802.11 - Supporting Mobility
• Suitable for an ad hoc configuration of nodes
– May or may not be able to communicate with all
other nodes
– Depends upon how far apart the nodes are
• Nodes are free to move around
– Set of directly reachable nodes may change over
time (partial connectivity)
– Topology changes over time

86
802.11 - Distribution System
• Nodes roam freely but operate within a structure
– Tethered by wired network infrastructure (Ethernet ?)
– Each access point (AP) services nodes in some region
– Each mobile node associates itself with an AP

Distribution system

AP-1 AP-3
AP-2 F
A B G
H

C E
D

87
Managing Connectivity/Roaming
• How the wireless nodes select an Access Point ?
• Scanning (active search for an AP)
– node sends Probe frame
– all AP’s within reach reply with Probe Response
frame
– node selects one AP; sends it Associate Request
frame
– AP replies with Association Response frame
– new AP informs old AP via wired backbone

88
Managing Mobility
• Scanning is used only when node has no AP
• Consider
– Node moves out of range of it’s AP and initiates scanning
for new AP
– Scanning takes 2+ round-trip times
– No service until new AP found
• However
– Node was probably in range of new AP before leaving
range of old AP
– Scanning too expensive to use continuously
• How handoff between APs managed as users move?
89
Managing Connectivity
• Active scanning: when a node join or move
• Passive scanning: AP periodically sends
Beacon frame, advertising its capabilities

Distribution system

AP-1 AP-3
AP-2 F
A B G
H
C
C E
D

90
Managing Mobility
• Solution to handoff: AP’s send periodic beacon
frames
• Node may switch AP in response to beacon
– if signal strength is better from new AP
– using geographical information
– any other reason …
• 802.11 frames contain four addresses
– actual sender and receiver (source and dest.)
– AP for sender and receiver (routing in backbone)

91
Frame Format
• Control field contains three subfields:
– 6-bit Type field (data, RTS, CTS, scanning);
– 1-bit ToDS; and
– 1-bit FromDS
• A single frame contains up to 2312 bytes of data
16 16 48 48 48 16 48 0– 18,496 32

Control Duration Addr1 Addr2 Addr3 SeqCtrl Addr4 Payload CRC

ToDS=0, FromDS=0 C A
ToDS=1, FromDS=1 E AP-3 AP-1 A
92
Bluetooth IEEE 802.15.1
• Short range communications
– Between mobile phones, PDAs, laptop computers, etc.
• 2.45 GHz band, 10 m range, 1 to 3 Mbps
• Also called Personal Area Network (PAN)
• Basic network configuration is called Piconet
– A master device with up to seven slave devices
• ZigBee 802.15.4
– Used where bandwidth requirement are low
– Power consumption is low to give long battery life
– Cheaper than Bluetooth 93
Bluetooth Piconet

94
WiMax 802.16
• Worldwide Interoperability for Microwave Access
– Last-mile technology, provides upto 70 Mbps bit rate
– Originally no mobility support, but 802.16e supports it
• IEEE 802.16 Base Station architecture
– OFDM modulation technique, spread spectrum, MIMO
– MAC, control plane, user plane
MAC
• Manage resources on air interface Control
• QoS, ARQ, mobility management P MAC Plane
H Data
• Radio resource management Y Plane Service
Specific CS
e.g.
95 IP
WiMax Applications

96
IEEE 802.16 Variants
IEEE 802.16 IEEE 802.16 IEEE 802.16e
Rev’d
Release December 2001 May 2004 2005
Spectrum 10-66 GHz 2-11 GHz 2-6 GHz
Application Backhaul Wireless DSL & Mobile Internet
Backhaul
Channel Condition Line of Sight Non-Line-of-Sight Non-Line-of-Sight
Required
Bitrate 32-134 Mbps at 28 Upto 75 Mbps at Upto 15 Mbps at 5
MHz 20 MHz MHz
Modulation QPSK, 16 QAM, OFDM, QPSK, 16 OFDM, QPSK, 16
64 QAM QAM, 64 QAM QAM, 64 QAM
Bandwidth 20, 25 & 28 MHz Selectable Selectable
between 1.5 & 20 between 1.5 & 20
MHz MHz
97
Cell Phone Technologies
• An approach to mobile communication
– Frequency bands vary around the globe
• Europe: 900/1800 MHz, N.America: 850/1900 MHz
• Area covered by a Base Station is called a Cell
– Adjacent cells usually overlap like 802.11 WiFi
• Handoff mechanism
– During communication, moving from one cell
to another

98
Generations of Cell Phone
Technologies
Generation Technology
3rd Generation •Wideband Code Division Multiple Access (W-CDMA)
•CDMA 2000
•UMTS FDD, TDD, EVDO
2.5 G •CDMAOne
•General Packet Radio Service (GPRS) (30-70 Kbps)
•Enhanced Data Rates for Global Evolution (EDGE)
2nd Generation •Time Division Multiple Access (TDMA)
•Code Division Multiple Access (CDMA)
•Global System for Mobile Communications (GSM)
•High-Speed Circuit-Switched Data (HSCSD)

1st Generation Analog Communication

99
Network Adaptors

100
Now you know …
• How the direct link networks functions
• You know what the design issues are

• Most of the issues of direct link networks


are handled by the network adaptors
• Lets have a quick look on design issues of
these pieces of hardware

101
Overview
• Also called network interface card (NIC)

• Components (high-level overview)


• Options for use
– Data motion
– Event notification
• Potential performance bottlenecks
• Programming device drivers

102
Typical Workstation Architecture

communication ?
CPU

Cache $
Network
memory adaptor to network
bus

I/O bus
Memory
Typically where data link
functionality is implemented
103
Components of a Network Adaptor
• Bus interface communicates with a specific host
– Bus defines protocol for CPU-adaptor communication
• Link interface speaks correct protocol on network
– Implemented by a chip set, in software or on FPGA
• Buffering between different speed bus and link
Host I/O bus

Bus Link
network
Interface Interface

Network Adaptor

104
Host Perspective
• Adaptor is ultimately programmed by CPU
• Adaptor exports a Control Status Register (CSR)
• CSR is readable and writable from CPU at some
memory address
• CSR write: CPU instructs Adaptor (e.g., transmit)
• CSR read: Adaptor informs CPU (e.g., receive
error)
• Host CPU either poll CSR or interrupted by OS
– Interrupt handler routine disables interrupts and is short

105
Data Motion Options for Network
Adaptor Use
• Transfer frames between adaptor and host memory
• Direct memory access (DMA)
– Adaptor gets buffer descriptor lists by host for
read/write
– Processor is not involved: free to do other things
– Can be faster than memory copy through CPU
– Start-up cost
• Programmed input/output (PIO)
– Processor manages itself each access (loads/stores)
– Faster than DMA for small amounts of data
106
Data Motion - DMA
100

1400

1500

1500

1500

Buffer Memory buffers


descriptor
list

107
DMA: Scatter Read, Gather Write

Adaptor memory Host memory

Host memory Adaptor memory

Scatter Read Gather Read


108
Data Motion - PIO
• Frames are buffered at adaptor
until CPU transfers them
CPU

Memory

Adaptor Memory

• Adaptors have 128-512 KB of


Host
expensive dual-port memory

109
Data Motion

Data movement
CPU
path using PIO

Cache $
Network
memory adaptor to network
bus

I/O bus
Memory Data movement
path using DMA
110
Network Adaptor: Event Notification
• Hardware interrupts
– Processor free to do other things
– Events delivered “immediately”
– State (register) save/restore expensive
– Context switches more expensive
• Event polling
– Processor must periodically check
– Events wait until next check
– No extra state changes

111
Device Drivers
• Operating system routines anchoring protocol
stack to network hardware
• Initialize device, transmit frames, field interrupts
• Code contains device specific details
– Difficult to read but simple in logic
• Translates host’s message into format expected
by the device
• Sets CSR (e.g., to instruct device to transmit)

112
Programming Device Drivers

• Sample device driver in P&D section 2.9.3


• Better device driver(s) in Linux source
• Key features
– Memory-mapped control registers
– Interrupt-driven
– Handler code must execute quickly
– Logically concurrent with other processes

113
Performance Bottlenecks

• Link capacity
• I/O bus bandwidth
– Overhead involved in each bus transfer
• Memory bus bandwidth
– Memory hierarchy with cache levels
– Memory accesses results in multiple
memory copies in different buffers
• Processor computing power

114
Memory Bandwidth on an Alpha

I/O bus
956 Mbps
Main
800
memory
4.48 Gbps Mbps

CPU
16 Gbps L2
L1 cache
cache crossbar

115

You might also like