Chapter 5-1. Chapter 5-2 CHAPTER 5 COST - VOLUME - PROFIT Managerial Accounting, Fourth Edition.
Chapter 5
-
Upload
tiger-cunningham -
Category
Documents
-
view
23 -
download
0
description
Transcript of Chapter 5
1
Chapter 5
The Medium Access Sublayer
2
The Medium Access Layer
• 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs
• 5.2 Multiple Access Protocols - ALOHA, CSMA, CSMA/CD, Collision-free protocols, Limited-c
ontention protocols, Wireless LAN protocols
• 5.3 Ethernet - Cabling, MAC sublayer protocol, Backoff algorithm, Performance,
Gigabit Ethernet, 802.2 Logical Link Control
• 5.4 Wireless LANs - 802.11 protocol stack, physical layer, MAC sublayer protocol, fra
me structure
3
• 5.5 Broadband Wireless
- Comparison of 802.11 with 802.16, protocol stack, frame structure
• 5.6 Bluetooth
- Bluetooth architecture, Application, Protocol stack, Frame structure
• 5.7 Data Link Layer Switching
- Bridges from 802.x to 802.y, Local internetworking, Spanning tree bridges, Remote bridges
4
What is MAC• Network assumption: Broadcast channel
– One channel, many stations
– Competition, interference among stations.
• MAC: Medium Access Control– Also known as Multiple-Access Control
– The protocol used to determine who goes next on a shared physical media
• Classification of MAC protocols– Channel allocation (centralized)
– Contention based protocols (distributed)
– Contention – free protocols (distributed)
5
Medium Access Sublayer Key issue for broadcast network
– who can use the channel when there is competition for it
Medium Access Control: – a sublayer of data link layer that controls the access of no
des to the medium.
Broadcast channels are also referred as multiaccess channels or random access channels
Allocation of a single broadcast channel among competing users:– Static – Dynamic
6
Static Channel Allocation
FDMA
– The whole spectrum is divided into sub-frequency. TDMA
– Each user has its own time slot. CDMA
– Simultaneous transmission, Orthogonal code
– Analogy:
5.1 The Channel Allocation problem
7
The M/M/1 Queue• Average number of customers
• Applying Little’s Theorem, we have
• Similarly, the average waiting time and number of customers in the queue is given by
1
0 0 0
2
(1 ) (1 )
1(1 )
(1 ) 1
n nn
n n n
N np n n
N
11LT
1 and
1 2
qqq WNTW
L
E[ ] = L
8
Example: Slowing Down
M/M/1 system: slow down the arrival and service rates by the same factor m
Utilization factors are the same stationary distributions ⇒the same, average number in the system the same
Delay in the slower system is m times higherAverage number in queue is the same, but in the 1st system
the customers move out faster
/
1 1 /
/
( / )
/ /
N N
N mT mT
m
mW mW
m m
/ m/ m
/
1 1 /
1
/
N
NT
W
9
Example: Statistical MUX-ing vs. TDM or FDM
• m identical Poisson streams with rate λ/m; link with capacity 1; packet lengths iid, exponential with mean 1/μ
• Alternative: split the link to m channels with capacity 1/m each, and dedicate one channel to each traffic stream
• Delay in each “queue” becomes m times higher
Statistical multiplexing vs. TDM or FDM
When is TDM or FDM preferred over statistical multiplexing?
mT mT
/ m/ m
/ m/ m
m
1T
10
The Channel Allocation problem5.1.1 Static channel Allocation in LANs and WANs
Frequency Division Multiplexing (FDM)
11
12
Both FDM and TDM are not good when traffic is bursty!
13
5.1.2 Dynamic Channel Allocation in LANs and WANs
Five Assumptions
1. Station Model. The model consists of N independent stations, each generates the frame with probability in an interval . Once a frame is generated, the station is blocked.
2. Single Channel Assumption. A single channel is available for all communication.
3. Collision Assumption. If two frames are transmitted simultaneously, they are destroyed and must be retransmitted again later. There are no other errors.
t t
14
4a. Continuous Time. Frame transmission can begin at any instant.
4b. Slotted Time. Time is divided into slots. Frame transmission always begin at the start of a slot.
5a. Carrier Sense. Stations can tell if the channel is in use before trying to use it. (ex. LANs)
5b. No Carrier Sense. Stations cannot sense the channel before trying to use it. (ex. satellite network due to long propagation delay)
15
5.2 Multiple Access Protocols
ALOHA
Carrier Sense Multiple Access Protocols
Collision-Free Protocols
Limited-Contention Protocols
Wavelength Division Multiple Access Protocols
Wireless LAN Protocols
16
ALOHA Users send whenever they want to send. If it fails, w
ait random time and resend it.
Independent stations
Single channel assumption
Collision occurs
Types of ALOHA– Pure ALOHA: stations transmit at any time (Continuous t
ime)
– Slotted ALOHA: Transmission can only occur at certain time instances
– carrier sense vs no carrier senses
17
Pure ALOHA• Users transmit whenever they have data to be sent.• The colliding frames are destroyed.• The sender waits a random amount of time and sends it again.
1970s from University of HawaiiPure ALOHA (infinite population)
In pure ALOHA, frames are transmitted at completely arbitrary times.
18
Pure ALOHA (2)
Vulnerable period for the shaded frame.
19
Poisson pmf (1) Suppose we are observing the arrival of jobs to a large co
mputation center for the time interval (0, t] Assume that for each small interval of time t, the probabi
lity of a new job arrival is t, where l is the average arrival rate..
If t is sufficiently small, the probability of two or more jobs arriving in the interval of duration t may be neglected.
Divide (0, t] into n subintervals of length t/n, and suppose the arrival of a job in any given interval is independent of the arrival of a job in any other interval.
n very large => the n intervals constitutes a sequence of Bernoulli trials with the probability of success p = t / n
Bernoulli trials: P(X = 0) = p, with P(X = 1) = 1p
20
Poisson pmf (2)
The Probability of k arrivals in a total of n intervals each with a duration t/n is approximately given by
As n -> infinity =>
Let t be a frame time => t = G
knk ppk
nntnk
1)/,;(b
!/)( ket tk
21
22
– efficiency: 18.4 % for channel utilization at best Assume that infinite population of users generates new frames according to
a Poisson distribution with mean S frames per frame time, where 0 < S < 1. Assume that the probability of k transmission attempts per frame time, old a
nd new combined, is also poisson, with mean G per frame time. P0: probability that a frame does not suffer a collision
throughput S = G * P0 (Offered load times transmission succeeding prob.)
vulnerable interval: t0 ~ t0+2t (See Fig. 5-2)
probability that k frames are generated during a given frame time is given b
y the Poisson distribution Probability of no other traffic during the vulnerable period, P0 = e -2G , 2G: mean of two frame time. S = Ge -2G (See Fig. 5-3)
Pure ALOHA (2)
!/][ keGkP Gkr
02 222 GGG GeeGedG
d
184.02/1 ,5.0 max eSG
23
Throughput versus offered traffic for ALOHA systems.
0.184
0.368
24
Slotted ALOHA
25
26
27
28
29
30
31
32
33
34
35
36
5.2.2 Carrier Sense Multiple Access Protocols
37
38
39
Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various random access protocols.
40
41
CSMA/CD• Abort transmission as soon as they detect a collision
– saves time and bandwidth– waits a random time and tries again
• Fig. 5-5– minimum time to detect collision: the signal propagates from one statio
n to the other– worst case: 2t (t : propagation time between two farthest stations)– model the contention interval as a slotted ALOHA system with slot =
2t– special signal encoding: to detect a collision of two 0-volt signals
• No MAC sublayer protocol guarantees reliable delivery. Packets may be lost due to– collision– lack of buffer space– missed interrupt
42
CSMA with Collision Detection
CSMA/CD can be in one of three states: contention, transmission, or idle.
43
5.2.3 Collision-Free Protocols
• Collision is serious (affects performance) as.– large t: long cable
– short frames: high bandwidth (propagation dominate the delivering time.
• Bit-Map Protocol (See Fig. 5-6)– A cycle consists of a contention period and a data transmission
period.
– Contention period contains N slots, one bit for a station
– a station inserts 1 at its slot when has data. After the contention period, stations transmit data in the sequence in the contention period.
– problem: overhead is 1 bit per station
44
5.2.3 Collision-Free Protocols
4-6.
The basic bit-map protocol.
45
• Binary Countdown– Give priority to higher address by OR bit-by-bit
addresses of the stations waiting for transmission.
– virtual station number: to change priority
Collision-Free Protocols (2)
The binary countdown protocol. A dash indicates silence.
46
47
5.2.4 Limited-contention Protocols
48
Limited-Contention Protocols
49
50
51
52
5.8
5.8.
5.8.
Success prob. decreases as readystation number increases.
53
Adaptive Tree Walk Protocol(Method for testing soldiers for syphilis)
Fig. 5-9 The tree for eight stations.
Light loadlevel 0; 8/20 below it.
Depth first search
Collision #
Heavy loadlevel 3
54
55
i
i
i
i2
iq 2
qi2
56
WDMA Protocols (1)
Channel allocation schemes:– divide the channel into subchannels using FDM,
TDM, or both, and dynamically allocate them as needed
– commonly used in fiber optic LANs: different conversations to use different wavelengths (frequencies) at the same time
57
WDMA (2)
Each station is assigned two channels : control channel (narrow) and data channel (broad)
m slots in control channel and n+1 slots in data channel.
Support three classes of traffic• constant data rate connection-oriented traffic
• variable data rate connection-oriented traffic
• datagram traffic: UDP packets
58
WDMA Protocols (3) Each station has
– fixed-wavelength receiver for its own control channel
– tuneable transmitter to other station’s control channel
– fixed-wavelength transmitter to output data frames
– tuneable receiver: selecting a data transmitter to listen to
Communication from A to B– A inserts a Connection Request in a free slot on B’s con
trol channel.
– If B accepts, A sends its data on its data channel.
59
Wavelength Division Multiple Access Protocols
Fig. 5-10 Wavelength division multiple access.
60
5.2.6 Wireless LAN Protocols
61
5-11.
62
5-11
5-11
63
5-12.
5-12
5-12
5-12,
64
5-12.
65
66
67
5.3 Ethernet Ethernet Cabling Manchester Encoding The Ethernet MAC Sublayer Protocol The Binary Exponential Backoff Algorithm Ethernet Performance Switched Ethernet Fast Ethernet Gigabit Ethernet IEEE 802.2: Logical Link Control Retrospective on Ethernets
68
Ethernet Cabling
The most common kinds of Ethernet cabling.
69
Ethernet Cabling (2)
Three kinds of Ethernet cabling.
(a) 10Base5, (b) 10Base2, (c) 10Base-T.
Three kinds of Ethernet cabling.
(a) 10Base5, (b) 10Base2, (c) 10Base-T
70
Ethernet Cabling (3)
Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.
71
Manchester Coding• Encoding (See Fig. 5-16)
– Binary encoding: can not be used– Manchester encoding
• synchronous in the middle
• requires double bandwidth
• used by all 802.3 baseband systems: + - 0.85v
– Differential Manchester encoding• better noise immunity
• more complex
72
Ethernet Cabling (4)
(a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.
73
802.3 MAC Sublayer Protocol Frame format (See Fig. 5-17)
– high order bit of destination address• 0: ordinary address
• 1: group address for multicasting
– broadcasting: all 1 bits Valid frame must be 64 bytes long
– from destination address to checksum– pad field– all frames must take > 2 to send (See Fig. 5-18)
Checksum
74
Ethernet MAC Sublayer Protocol
Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.
SOF: Start of frame
DIX (DEC, Intel, Xerox)
7 1
0101010148 bits
75
Ethernet MAC Sublayer Protocol (2)
Collision detection can take as long as 2 .
76
Binary Exponential Backoff• After i collisions, random number 0 ~ 2i - 1 1023
– time slot = 2 (51.2 us)– after 16 collisions: failure, recovery by higher layers
• Acknowledgement– destination verifies checksum (for fear of noise)– ACK frame (not include in the protocol)– the 1st contention slot following successful
transmission
77
5.3 Ethernet Performance
Assumptions
a. Heavy and constant load, that is, stations always ready to transmit
b. Each station transmits during a contention slot with probability
The probability A that some station acquires the channel in that slot is
A is maximized when ,
with as
p
k
1)1( kpkpA
kp 1
eA 1 k
78
The probability that the contention interval has exactly slots in
it is
so the mean number of slots per contention is given by
Since each slot has a duration , the mean contention interval
Assuming optimal , i.e.
as
If the mean frame takes seconds to transmit then
channel efficiency =
where B: bandwidth
F: frame length
L: cable length
C: propagation speed
j,)1( 1 jAA
AAjA
j
j 1)1(
0
1
2Aw 2
pkp 1
eA
1
k eA
1 4.52 ew
p
Ap
p
2
CF
BLeeCL
BF
BF
21
1
)(2
79
Ethernet Performance
Efficiency of Ethernet at 10 Mbps with 512-bit slot times.
80
Switched 802.3 LANs System
– high speed backplane: over 1 Gbps– plug-in line cards
• several connectors– 100/10 BaseT single host
– hub (Fig. 5-20)
– traffic: on the same card or via backplane Collision domain
– each card: all ports on the same card are wired together to form a local on-card LAN
– each port: each port is buffered, all ports receive or transmit in parallel
81
Switched Ethernet
A simple example of switched Ethernet.
100/
82
Fast Ethernet
The original fast Ethernet cabling.
The reasons for fast Ethernet
1. The need to be backward compatible with existing Ethernet LANs
2. The fear that a new protocol might have unforeseen problems
3. The desire to get the job done before the technology changed
All fast Ethernet systems use hubs and switches
100 Base-T4 uses 8B/6T coding and 100 Base-TX uses 4B/5B coding
83
Gigabit Ethernet
(a) A two-station Ethernet. (b) A multistation Ethernet.
• All configurations of gigabit Ethernet are point-to-point
• Gigabit Ethernet supports full-duplex mode (with switch) and half-duplex-mode (with hub)
• CSMA/CD protocol is required for half- duplex mode operation (maximum distance is 25 meters)
• When carrier extension (512 bytes frame) and frame bursting are used the distance can be 200meters
84
Gigabit Ethernet (2)
Gigabit Ethernet cabling.
•Gigabit Ethernet supports both copper and fiber cabling
•Two wavelengths are permitted = 0.85μm and 1.3μm
•Three fiber core diameters are permitted = 10, 50, and 62.5μm
85
IEEE 802.2: LLC Logical Link Control
– all 802 LANs and MAN: best-effort datagram services
– on top of all 802 LANs and MAN: Fig. 4.33– a single format and interface to the Network
Layer Three service options of LLC
– unreliable datagram service– acknowledged datagram service– reliable connection-oriented service
86
IEEE 802.2: Logical Link Control
(a) Position of LLC. (b) Protocol formats.
87
Retrospective on Ethernet
1. Ethernet is simple and flexible
- reliable, cheap, easy to maintain, easy
to install
2. Ethernet interworks easily with TCP/IP
3. Ethernet has been able to evolve in certain crucial ways
- speeds gone up
- hub and switches introduced
88
Wireless LANs
The 802.11 Protocol Stack The 802.11 Physical Layer The 802.11 MAC Sublayer Protocol The 802.11 Frame Structure Services
89
802.11 Protocol Stack
Part of the 802.11 protocol stack.
FHSS: Frequency Hopping Spread Spectrum (dwell time < 400ms)
DSSS: Direct Sequence Spread Spectrum (up to 2 Mb/s)
OFDM: Orthogonal Frequency Division Multiplexing ( up to 54 Mb/s)
HR-DSSS: High Rate Direct Sequence Spread Spectrum (11Mb/s)
90
802.11 MAC Sublayer Protocol
(a) The hidden station problem.(b) The exposed station problem.
91
The 802.11 MAC Sublayer Protocol (2)
The use of virtual channel sensing using CSMA/CA.
NAV: Network Allocation Vector
92
802.11 MAC Sublayer Protocol802.11 supports two modes of operation: DCF and PCF
A. Distributed Coordination Function (DCF)
uses CSMA/CA (CSMA / with Collision Avoidance) (a) The first mode supported by CSMA/CA
(1) When a station wants to transmit, it senses the channel
(2) If it idle, it just starts transmitting (The sender does not sense the channel while transmitting)
(3) If the channel is busy, the sender defers until it goes idle and then starts transmitting
(4) If a collision occurs, it wait a random amount of time (exponential back off) and then try again later
93
(b) The second mode of CSMA/CA is based on MACAW
(Multiple Access with Collision Avoidance for Wireless)
(1) When a station wants to transmit, it senses the channel
(2) If the channel is idle longer than SIFS interval it transmits an
RTS (Request to Send, 30 bytes) which contains the length
of the data frame
(3) After received the RTS frame, the receiving station replies
with a CTS (Clear to Send) frame which contains the data
length (copied from the RTS frame)
(4) Upon receipt of the CTS, the sender transmits the frame
(5) All stations heard the RTS frame should remain silent for a
period of time (an estimation based on the information of RTS)
(6) All stations heard the CTS frame should remain silent for a
period of time (an estimation based on the information of CTS)
(7) If the channel is busy, the sender goes to step1
94
95
B. Point Coordination Function (PCF) (contention free)
(1) When a station wants to gain control of the medium, it sends out a beacon at the end of PIFS.
The beacon frame contains system parameters such as
hopping sequences, and dwell time (for FHSS), clock
synchronization, length of the contention free period, etc.
(2) All other stations heard the beacon will keep silent and wait for polling sign up frame
(3) After gained control, it invites new stations to sign up for polling service
(4) At the end of the contention free period, all station return to DCF mode
96
802.11 MAC Sublayer Protocol (3)
A fragment burst.
• To deal with the problem of noise channels, 802.11 allows frames to be fragmental into smaller pieces, each with its own checksum and ack. (using stop-and-wait protocol)
97
802.11 MAC Sublayer Protocol (4)
Interframe spacing in 802.11.
PCF and DCF can coexist within one cell
98
802.11 Frame Structure
The 802.11 data frame.
99
Version: Protocol versionType: data, control, or managementSubtype: RTS, CTS, ack, …To DS and from DS: to or from inter cell distribution system (e.g. Ethernet)MF: more fragmentsRetry: retransmissionPower management: put the receiver into sleep state or take it outMore: additional frames comingW: wired equivalent privacyO: processed strictly in orderDuration: time length of the frame and ackAddresses1.2.3 and 4: Source, destination, the source and destination base stations for intercell trafficSequence: Sequence No.
100
802.11 Services
Association: To connect to a base station Disassociation: To disconnect from a base station Reassociation: To change its preferred base
station Distribution: How to route frames (local or intercell) Integration: Translation from 802.11 to other
protocol frame format
Distribution Services (managing cell membership, and interacting with station outside the cell)
101
802.11 Services
Authentication Deauthentication (leave the network) Privacy: managing the encryption
and decryption Data Delivery
Intracell Services
102
Broadband Wireless
Comparison of 802.11 and 802.16 The 802.16 Protocol Stack The 802.16 Physical Layer The 802.16 MAC Sublayer Protocol The 802.16 Frame Structure
103
802.16 Protocol Stack
The 802.16 Protocol Stack.
104
802.16 Physical Layer
The 802.16 transmission environment.
105
802.16 Physical Layer (2)
Frames and time slots for time division duplexing.
106
802.16 MAC Sublayer Protocol
Service Classes Constant bit rate service Real-time variable bit rate service Non-real-time variable bit rate
service Best efforts service
107
802.16 Frame Structure
(a) A generic frame. (b) A bandwidth request frame.
108
Bluetooth
Bluetooth Architecture
Bluetooth Applications
The Bluetooth Protocol Stack
The Bluetooth Radio Layer
The Bluetooth Baseband Layer
The Bluetooth L2CAP Layer
The Bluetooth Frame Structure
109
Bluetooth Architecture
Two piconets can be connected to form a scatternet.
110
Bluetooth Applications
The Bluetooth profiles.
111
Bluetooth Protocol Stack
The 802.15 version of the Bluetooth protocol architecture.
112
Bluetooth Frame Structure
A typical Bluetooth data frame.
113
Data Link Layer Switching
• Bridges from 802.x to 802.y
• Local Internetworking
• Spanning Tree Bridges
• Remote Bridges
• Repeaters, Hubs, Bridges, Switches, Routers, Gateways
• Virtual LANs
114
Data Link Layer Switching
Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.
115
Bridges To connect multiple LANs Operate in data link layer
– bridges do not examine network layer header: copy IP, IPX, OSI packets equally well
Six reasons why single organization with multiple LANs– autonomy: university and corporate departments– the organizations may be spread over several buildings– load: each LAN with its own file server to restrict
traffic locally– physical distance is too great– reliability: discretion about what is forwarded– security
How it works: Fig. 5-40 two-port bridge
116
Bridges from 802.x to 802.y
Operation of a LAN bridge from 802.11 to 802.3.
117
Bridges from 802.x to 802.y (2)
The IEEE 802 frame formats. The drawing is not to scale.
118
Local Internetworking
A configuration with four LANs and two bridges.
When the bridges are first plugged in, they use the flooding algorithm and the backward learning algorithm to establish the routing table
119
Routing Procedure of Bridges
1. If destination and source LANs are the same, discard the frame
2. If the destination and source LANs are different, forward the frame
3. If the destination LAN is unknown, use flooding
120
Spanning Tree Bridges
Two parallel transparent bridges.
To prevent looping
Looping
121
Spanning Tree BridgesSpanning Tree
– Abstraction (See Fig. 5-44)
– exactly one path from every LAN to every other LAN: no loops
– root: the bridge with lowest serial number
– a tree of shortest paths from root to every other bridge and LAN
– can adapt to dynamic topology
122
Procedure to Establish a Spanning Tree
1. Take the bridge with lowest serial number as the root
2. Compute the shortest path from the root to ever bridge and LAN
3. Connect these shortest paths to from a tree (no looping)
123
Spanning Tree Bridges (2)
(a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.
124
Remote Bridges
Remote bridges can be used to interconnect distant LANs.
To connect two (or more) distance LANs
125
Repeaters, Hubs, Bridges, Switches, Routers and Gateways
(a) Which device is in which layer.
(b) Frames, packets, and headers.
126
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2)
(a) A hub. (b) A bridge. (c) a switch.
When two frames arrive simultaneously at a hub, they will collide Bridges and switched will route the frames based on their destination addresses
Bridges connect LANs
127
Virtual LANs
A building with centralized wiring using hubs and a switch.
128
Reasons for Virtual LANs
(a) Fitting into the organization structure
(b) Loading partition
(c) Relieving broadcast storm
129
Virtual LANs (2)
(a) Four physical LANs organized into two VLANs, gray and white, by two bridges. (b) The same 15 machines organized into two VLANs by switches.
VLANs are based on specially-designed VLAN-aware switches (bridges)
130
Each VLAN is assigned a distinct color. Three methods are used to distinguish the color of an incoming frame
1. Every port is assigned a VLAN color (when a host moved, the port must be reassigned)
2. Every MAC address is assigned a VLAN color
3. Every layer 3 protocol or IP address is assigned a VLAN color
(The payload must be examined by the data link layer, which violates the rule: independence of the layers. When the layer 3 protocol changed, the switch fails.)
131
There are some issues for VLAN
(a) What is the VLAN field format?
(b) How to identify VLAN field?
(c) Who generates the VLAN field?
(d) What happens to frames that are already the maximum size?
The 802.1Q will solve these problems
132
IEEE 802.1Q Standard
Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.
To support VLAN, switches must be VLAN-aware.
133
IEEE 802.1Q Standard (2)
The 802.3 (legacy) and 802.1Q Ethernet frame formats.
Priority: This field makes it possible to distinguish hard real-time traffic from soft real-time traffic from time-insensitive traffic.
CFI (Canonical Format Indicator): To indicate that the payload contains 802.5.
VLAN Identifier: To indicate which VLAN the frame belong to.
134
Summary
Channel allocation methods and systems for a common channel.