Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Medium Access Sublayer

Similar presentations


Presentation on theme: "The Medium Access Sublayer"— Presentation transcript:

1 The Medium Access Sublayer
Chapter 4 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-contention protocols, Wireless LAN protocols 5.3 Ethernet - Cabling, MAC sublayer protocol, Backoff algorithm, Performance, Gigabit Ethernet, Logical Link Control 5.4 Wireless LANs protocol stack, physical layer, MAC sublayer protocol, frame structure

3 5.5 Broadband Wireless - Comparison of with , 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 nodes 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
5.1 The Channel Allocation problem 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:

7 The M/M/1 Queue Average number of customers
Applying Little’s Theorem (L*=T*), we have Similarly, the average waiting time and number of customers in the queue is given by E[ ] = L L T*:delay time in system

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 higher Average number in queue is the same, but in the 1st system the customers move out faster

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 iid: Independent and Identically Distributed

10 The Channel Allocation problem
5.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!
We will now explore dynamic methods

13 5.1.2 Dynamic Channel Allocation in LANs and WANs
Five Assumptions 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. Single Channel Assumption. A single channel is available for all communication. Collision Assumption. If two frames are transmitted simultaneously, they are destroyed and must be retransmitted again later. There are no other errors.

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, wait random time and resend it. Independent stations Single channel assumption Collision occurs Types of ALOHA Pure ALOHA: stations transmit at any time (Continuous time) Slotted ALOHA: Transmission can only occur at certain time instances carrier sense vs no carrier senses

17 In pure ALOHA, frames are transmitted at completely arbitrary times.
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 Hawaii Pure ALOHA (infinite population) In pure ALOHA, frames are transmitted at completely arbitrary times.

18 Vulnerable period for the shaded frame.
Pure ALOHA (2) Vulnerable period for the shaded frame.

19

20

21

22 Poisson pmf (1) Suppose we are observing the arrival of jobs to a large computation center for the time interval (0, t] Assume that for each small interval of time Dt, the probability of a new job arrival is lDt, where l is the average arrival rate.. If Dt is sufficiently small, the probability of two or more jobs arriving in the interval of duration Dt 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 = lt / n Bernoulli trials: P(X = 0) = p, with P(X = 1) = 1p

23 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 => lt = G

24

25 Pure ALOHA (2) efficiency: 18.4 % for channel utilization at best
Assume that infinite population of users generates new frames according to a Poisson distribution with mean N frames per frame time, where 0 < N < 1. Assume that the probability of k transmission attempts per frame time, old and 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. 4-2) probability that k frames are generated during a given frame time is given by 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. 4-3)  Pure ALOHA (2)

26 Throughput versus offered traffic for ALOHA systems.
0.368 0.184 Throughput versus offered traffic for ALOHA systems.

27 Slotted ALOHA

28

29

30 5.2.2 Carrier Sense Multiple Access Protocols
100% persistent to wait the channel

31 Zero persistent to wait the channel

32

33 Persistent and Nonpersistent CSMA
Comparison of the channel utilization versus load for various random access protocols.

34

35 CSMA/CD Abort transmission as soon as they detect a collision Fig. 4-5
saves time and bandwidth waits a random time and tries again Fig. 4-5 minimum time to detect collision: the signal propagates from one station 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

36 CSMA with Collision Detection
CSMA/CD can be in one of three states: contention, transmission, or idle.

37 5.2.3 Collision-Free Protocols
Collision is serious (affects performance) as. large t: long cable (increase collision probability) short frames (undetectable collision): high bandwidth (propagation dominate the delivering time. Bit-Map Protocol (See Fig. 4-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

38 The basic bit-map protocol.
5.2.3 Collision-Free Protocols The basic bit-map protocol. 4-6.

39 Collision-Free Protocols (2)
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 The binary countdown protocol. A dash indicates silence.

40 ln N.

41 4.2.4 Limited-contention Protocols

42 Limited-Contention Protocols

43

44

45

46 Success prob. decreases as ready station number increases.
4.8 4.8. 4.8.

47 Adaptive Tree Walk Protocol (Method for testing soldiers for syphilis)
Depth first search Light load level 0; 8/20 below it. Collision # Heavy load level 3 Fig. 5-9 The tree for eight stations.

48

49

50 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

51 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

52 WDMA Protocols (3) Each station has Communication from A to B
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 control channel. If B accepts, A sends its data on its data channel.

53 Wavelength Division Multiple Access Protocols
Fig Wavelength division multiple access.

54 4.2.6 Wireless LAN Protocols

55 5-11.

56 4-11 5-11

57 4-12. 4-12 4-12 4-12,

58 5-12.

59

60 4.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

61 The most common kinds of Ethernet cabling.

62 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

63 Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.
Ethernet Cabling (3) Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.

64 Manchester Coding Encoding (See Fig. 4-16)
Binary encoding: can not be used Manchester encoding Binary 1: start at voltage high and down to low at the middle part of bit time Binary 0: start at voltage low and down to high at the middle part of bit time synchronous in the middle requires double bandwidth used by all baseband systems: v Differential Manchester encoding Binary 1: don’t do transition at the start of the bit time Binary 0: do transition at the start of the bit time better noise immunity more complex

65 Ethernet Cabling (4) (a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.

66 802.3 MAC Sublayer Protocol Frame format (See Fig. 4-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 > 2t to send (See Fig. 4-18) To prevent a station from completing the transmission of a short frame before making sure the frame is collided or not Checksum

67 Ethernet MAC Sublayer Protocol
48 bits 7 1 SOF: Start of frame Frame formats. (a) DIX Ethernet, (b) IEEE DIX (DEC, Intel, Xerox)

68 Ethernet MAC Sublayer Protocol (2)

69 Binary Exponential Backoff
After i’th collisions, random number 0 ~ 2i - 1  1023 time slot = 2t (51.2 us) after 16 collisions: failure, recovery by higher layers Acknowledgement CSMA/CD provides no acknowledgements destination verifies checksum (for fear of noise) ACK frame (not include in the protocol) the 1st contention slot following successful transmission (proposed by Toloro)

70 4.3 Ethernet Performance Assumptions
Heavy and constant load, that is, stations always ready to transmit 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

71 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

72 Efficiency of Ethernet at 10 Mbps with 512-bit slot times.
Ethernet Performance Efficiency of Ethernet at 10 Mbps with 512-bit slot times.

73 Switched 802.3 LANs System Collision domain
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

74 A simple example of switched Ethernet.
100/ A simple example of switched Ethernet.

75 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 The original fast Ethernet cabling.

76 Gigabit 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 (a) A two-station Ethernet. (b) A multistation Ethernet.

77 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 Gigabit Ethernet cabling.

78 IEEE 802.2: LLC Logical Link Control Three service options of LLC
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

79 IEEE 802.2: Logical Link Control
(a) Position of LLC. (b) Protocol formats.

80 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

81 Wireless LANs The 802.11 Protocol Stack The 802.11 Physical Layer
The MAC Sublayer Protocol The Frame Structure Services

82 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) Part of the protocol stack.

83 802.11 MAC Sublayer Protocol (a) The hidden station problem.
(b) The exposed station problem.

84 The 802.11 MAC Sublayer Protocol (2)
NAV: Network Allocation Vector The use of virtual channel sensing using CSMA/CA.

85 MAC Sublayer Protocol supports two modes of operation: DCF and PCF 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

86 (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

87

88 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

89 802.11 MAC Sublayer Protocol (3)
• To deal with the problem of noise channels, allows frames to be fragmental into smaller pieces, each with its own checksum and ack. (using stop-and-wait protocol) A fragment burst.

90 802.11 MAC Sublayer Protocol (4)
PCF and DCF can coexist within one cell Interframe spacing in

91 Frame Structure The data frame.

92 Version: Protocol version
Type: data, control, or management Subtype: RTS, CTS, ack, … To DS and from DS: to or from inter cell distribution system (e.g. Ethernet) MF: more fragments Retry: retransmission Power management: put the receiver into sleep state or take it out More: additional frames coming W: wired equivalent privacy O: processed strictly in order Duration: time length of the frame and ack Addresses1.2.3 and 4: Source, destination, the source and destination base stations for intercell traffic Sequence: Sequence No.

93 802.11 Services Association: To connect to a base station
Distribution Services (managing cell membership, and interacting with station outside the cell) 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 to other protocol frame format

94 802.11 Services Intracell Services Authentication
Deauthentication (leave the network) Privacy: managing the encryption and decryption Data Delivery

95 Broadband Wireless Comparison of 802.11 and 802.16
The Protocol Stack The Physical Layer The MAC Sublayer Protocol The Frame Structure

96 Protocol Stack The Protocol Stack.

97 The 802.16 transmission environment.
Physical Layer The transmission environment.

98 Frames and time slots for time division duplexing.
Physical Layer (2) Frames and time slots for time division duplexing.

99 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

100 (a) A generic frame. (b) A bandwidth request frame.
Frame Structure (a) A generic frame. (b) A bandwidth request frame.

101 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

102 Bluetooth Architecture
Two piconets can be connected to form a scatternet.

103 Bluetooth Applications
The Bluetooth profiles.

104 Bluetooth Protocol Stack
The version of the Bluetooth protocol architecture.

105 Bluetooth Frame Structure
A typical Bluetooth data frame.

106 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

107 Data Link Layer Switching
Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

108 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 two-port bridge

109 Operation of a LAN bridge from 802.11 to 802.3.
Bridges from 802.x to 802.y Operation of a LAN bridge from to

110 The IEEE 802 frame formats. The drawing is not to scale.
Bridges from 802.x to 802.y (2) The IEEE 802 frame formats. The drawing is not to scale.

111 Local Internetworking
When the bridges are first plugged in, they use the flooding algorithm and the backward learning algorithm to establish the routing table A configuration with four LANs and two bridges.

112 Routing Procedure of Bridges
If destination and source LANs are the same, discard the frame If the destination and source LANs are different, forward the frame If the destination LAN is unknown, use flooding

113 Two parallel transparent bridges.
Spanning Tree Bridges To prevent looping Looping Two parallel transparent bridges.

114 Spanning Tree Bridges Spanning 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

115 Procedure to Establish a Spanning Tree
1. Take the bridge with lowest serial number as the root Compute the shortest path from the root to ever bridge and LAN Connect these shortest paths to from a tree (no looping)

116 Spanning Tree Bridges (2)
(a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

117 Remote bridges can be used to interconnect distant LANs.
To connect two (or more) distance LANs Remote bridges can be used to interconnect distant LANs.

118 Repeaters, Hubs, Bridges, Switches, Routers and Gateways
(a) Which device is in which layer. (b) Frames, packets, and headers.

119 Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2)
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 (a) A hub. (b) A bridge. (c) a switch.

120 A building with centralized wiring using hubs and a switch.
Virtual LANs A building with centralized wiring using hubs and a switch.

121 Reasons for Virtual LANs
Fitting into the organization structure Loading partition Relieving broadcast storm

122 Virtual LANs (2) VLANs are based on specially-designed VLAN-aware switches (bridges) (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.

123 Each VLAN is assigned a distinct color
Each VLAN is assigned a distinct color. Three methods are used to distinguish the color of an incoming frame Every port is assigned a VLAN color (when a host moved, the port must be reassigned) Every MAC address is assigned a VLAN color 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.)

124 There are some issues for VLAN
What is the VLAN field format? How to identify VLAN field? Who generates the VLAN field? What happens to frames that are already the maximum size? The 802.1Q will solve these problems

125 IEEE 802.1Q Standard To support VLAN, switches must be VLAN-aware.
Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.

126 The 802.3 (legacy) and 802.1Q Ethernet frame formats.
IEEE 802.1Q Standard (2) 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 VLAN Identifier: To indicate which VLAN the frame belong to. The (legacy) and 802.1Q Ethernet frame formats.

127 Channel allocation methods and systems for a common channel.
Summary Channel allocation methods and systems for a common channel.


Download ppt "The Medium Access Sublayer"

Similar presentations


Ads by Google