Download presentation
Presentation is loading. Please wait.
Published byPatrick Walton Modified over 8 years ago
2
The Medium Access Control Sublayer Chapter 4
3
M/M/1 System λ: mean arrival rate (frames/sec) 1/μ: mean frame length (bits/frame) C: data transmission rate, channel capacity (bits/sec) traffic intensity ρ= λ/μC mean customer number N= ρ/1- ρ mean time delay T=N/ λ =1/(μC- λ) mean queuing number N q =N- ρ= ρ 2 /1- ρ mean queuing delay T q = N q / λ= ρ/ (μC- λ)=T-1/μC
4
M/M/1 Example λ =200B/s μ=250B/s ρ=0.8 N q =N- ρ= ρ 2 /1- ρ= 3.2 N= N q + ρ=4 T=N/ λ=20ms T q = N q / λ=16ms
5
The Channel Allocation Problem Static Channel Allocation in LANs and MANs Dynamic Channel Allocation in LANs and MANs
6
Static Channel Allocation Divide the single channel into N independent subchannels, each channel capacity C/N mean arrival rate λ/N mean time delay T sub = 1/(μ(C/N)- (λ/N))=NT
7
Classification of Dynamic Channel Allocation controlled multiple access centralized: polling decentralized: token random multiple access ALOHA CSMA, CSMA/CD
8
Five Key Assumptions of Dynamic Channel Allocation(p245) 1.Station Model. 2.Single Channel Assumption. 3.Collision Assumption. 4.(a) Continuous Time. (b) Slotted Time. 5.(a) Carrier Sense. (b) No Carrier Sense.
9
Polling Round-robin polling Transfer polling
10
Round-robin Polling Procedure: the master station polls slave stations round- robin, from the near end to far end Disadvantage: polling frames take too much bandwidth NN-121 master R S...
11
Transfer Polling Procedure: the master station always polls the far end station firstly, which transfers controlling information to its neighbor after sending. Advantage: only poll once in each round Disadvantage: each slave station needs two input line NN-121 master R S...
12
Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols Collision-Free Protocols Limited-Contention Protocols Wavelength Division Multiple Access Protocols Wireless LAN Protocols
13
Pure ALOHA(p247) In pure ALOHA, frames are transmitted at completely arbitrary times.
14
Pure ALOHA model Each station transmit frames arbitrary If collision occurs, the sender waits a random time and sends it again NN-121 interfaceBus channel The model of ALOHA
15
Pure ALOHA Collision Demo(1) Collision reason : two station send frame simultaneously 1 2N-1N...
16
Pure ALOHA Collision Demo(2) A1 new frame B1 A2 B1 collison t1 t2 B2 A2 t3 B2 t4 B3 A3 station A Station B Final effect A1B1A2B2 t t t
17
Pure ALOHA Performance Analysis(1) Vulnerable period for the shaded frame.
18
Pure ALOHA Performance Analysis(2) Assumptions: fixed frame length, frame time is t new frames generated according to Poisson distribution new frames and retransmitting frames also accord to Poisson distribution frame interval accord to exponential distribution Parameters: throughput S: mean successful frames per frame time 0 S 1 network load G: mean frames per frame time G ≥ S probability P0: successful transmission S = G P0
19
Pure ALOHA Performance Analysis(3) P0= P [ consecutive 2 arrival interval> T ] = P [ arrival interval>T ] 2 function of probability density of exponential distribution: (t) = e - t , t: arrival interval , : arrival rate = G / T ∞ ∞ P [arrival interval > T ] = T (t) dt = T (G/ T) e -Gt / T dt = e –G throughput S = G P0 = G e -2G maximum throughput occurs when G=0.5, S=1/2e ≈ 0.184
20
Slotted ALOHA (p249) Principle: divide time into discrete intervals, each interval corresponding to one frame, so each user must know slot boundaries (synchronization) A1 new frame B3 A2 B1 冲突 t1 t2 B2 B3 A3 station B final effect A1B1A2B2A3 station A
21
Slotted ALOHA Performance Analysis T TxTx P0= P [last interval> (T-Tx) ] * P [next interval>Tx] ∞ ∞ = T-T x (t) dt * Tx (t) dt ∞ = T-T x (G/ T) e -Gt / T dt * Tx (G/ T) e -Gt / T dt = e –G throughput S = G P0 = G e -G maximum throughput occurs when G=1, S=1/e ≈ 0.368 P[idle]=P[interval>T] ∞ = T (t) dt = e –G last next
22
ALOHA Summary(p249) Throughput versus offered traffic for ALOHA systems.
23
Expected number of transmissions Pure ALOHA: P0=e -2G P k =e -2G (1-e -2G ) k-1 E= kP k =e 2G Slotted ALOHA: P0=e -G P k =e -G (1-e -G ) k-1 E= kP k =e G
24
CSMA protocols Station listens for a carrier before sending Classification: 1-persistent CSMA if the channel is busy, waits until it becomes idle, then transmits frame immediately, if a collision occurs, waits for a random amount of time and start all over again. Nonpersistent CSMA if the channel is busy, waits for a random amount of time and sense channel again P-persistent CSMA (slotted channel) if the channel is busy, waits to the next slot, if idle, transmits frame with probability of p, with a probability of 1-p it defers to the next slot
25
CSMA Comparison 1-persistent CSMA: high throughput and low delay when low load; low throughput when high load Nonpersistent CSMA: high throughput when high load Station A Station B B 监听到信道空闲,发送 A 监听到信道空闲 发送 为 A 、 B 之间的传播时延
26
Persistent and Nonpersistent CSMA Comparison of the channel utilization versus load for various random access protocols.
27
CSMA with Collision Detection Principle: station aborts the transmission as soon as it detects a collision, it saves time and bandwidth 1-persistent CSMA/CD: when a station sense the channel idle, send immediately and keep on sensing, when collision occur, abort transmission immediately Jamming signal: when sensing collision, keep on sending several bits jamming signal to intensify the collision
28
CSMA/CD channel state CSMA/CD can be in one of three states: contention, transmission, or idle.
29
CSMA/CD contention period Station A 站B站B B sense collision A sense collision B sense idle TBTB 2 22 contention period = 22
30
Collision-Free Protocols bit-map protocol The basic bit-map protocol. Principle: each contention period consists of N slots (bits), with each station use one slot, if station have frames to send, it reserve it by fill ‘1’ in its slot, so it is called reservation protocols
31
Bit-map protocol performance Measure time in units of the contention bit slot N station, contention time is N, One data frame is d bits long, so time is d When low load, low-numbered station will wait N/2+N slots to transmit, while high-numbered station will wait N/2 slots to transmit, so the mean for all stations is N slots efficiency= d/N+d When high load, all stations have frames to send, so the N bits contention period prorated over N frames, yielding an 1 bit overhead per frame efficiency=d/d+1 0 1 2 3 4 5 6 7 reservation slots 0 1 2 3 4 5 6 7 1 1 station 1 get one framestation 7 get one frame
32
Collision-Free Protocols binary countdown protocol Principle: each station wanting to use the channel broadcast its address as a binary bit string. The bits in each address position from different stations are BOOLEAN ORed together efficiency=d/(d+lnN) Disadvantage: high-numbered station always gets high priority to send Variation: set the lowest priority to the station which send successfully in the last contention
33
binary countdown protocol The binary countdown protocol. A dash indicates silence.
34
Limited-Contention Protocols Summary: In rating protocols, we use two performance measures, delay at low load and channel efficiency at high load Contention protocols give low delay at low load, while collision- free protocols give high efficiency at high load Limited-contention protocols use contention at low load, use a collision-free technique at high load divide stations into groups, each station contends the group’s slot Assign stations to groups dynamically, with many stations per group when low load and few station per group when high load
35
Limited-Contention Protocols Acquisition probability for a symmetric contention channel.
36
Adaptive Tree Walk Protocol Algorithm 1.take N blood samples mixed 2.if no antibodies, all are healthy 3.else prepare two new samples 1 through N/2 the rest repeat the steps recursively until infected found Analysis – depth search first 1.build a binary tree with stations as the leaves 2.all stations contend slot 0 3.if no collision, ok 4.else only stations falling under node 2 compete slot 1 5....
37
Adaptive Tree Walk Protocol(p259) The tree for eight stations.
38
Adaptive Tree Walk Protocol example 0级0级 1级1级 2级2级 3级3级 1 23 4567 ABCDEFGH 站点 搜索开始的最佳级数 i= log 2 q q 为当前要发送数据的站点数 时隙 0 时隙 1 时隙 2 时隙 3 时隙 4 。。。 设只有站点 G 和 H 要发送
39
Wavelength Division Multiple Access Protocols Wavelength division multiple access.
40
WLAN Protocols configuration In an office building, many base stations are wired together using copper or fiber which cover only several meters range Interference When a receiver is within range of two active transmitters, the resulting signal will be garbled CSMA can’t solve the problem totally, because CSMA merely tells whether there is activity around the station sensing the carrier while it really wants to known whether there is activity around the receiver Hidden station problem Exposed station problem
41
WLAN Protocols Inference Demo A wireless LAN. (a) A transmitting. (b) B transmitting.
42
WLAN Protocols MACA/MACAW MACA Multiple Access Collision Avoidance IEEE 802.11 prototype RTS->CTS handshake MACAW add ACK frames carrier sense for RTS
43
Wireless LAN Protocols (2) The MACA protocol. (a) A sending an RTS to B. (b) B responding with a CTS to A.
44
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 Ethernet
45
Ethernet Cabling The most common kinds of Ethernet cabling.
46
10BASE2 Thin coax BNC junction NIC BNC T-junction Max. segment = 185m Stations per seg.=30
47
10BASET Hub: A multi-port repeater Hub provides a star connection physically, implements a bus topology logically Devised to overcome problems of Ethernet tap connections, provides more reliable connections Support 10Mbps or 100Mbps Hub completely replaces repeater Configuration limitation - up to 3 hubs in a segment hub Max. seg.= 100m One Collision Domain
48
Ethernet Cabling (2) Three kinds of Ethernet cabling. (a) 10Base5, (b) 10Base2, (c) 10Base-T.
49
Ethernet Cabling (3) Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.
50
Ethernet Cabling (4) (a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.
51
Ethernet MAC Sublayer Protocol Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.
52
Ethernet address
53
Ethernet MAC Sublayer Protocol (2)
54
The Binary Exponential Backoff Algorithm During contention period, if a collision occurs, each station must wait random slot times(2 ) After I collisions, a random number between 0 and 2 i -1 is chosen The upper limit is 1023 slots After 16 collisions, the controller reports failure to the computer
55
802.3 Performance(1) Assumption Heavy and constant load, k station ready to transmit Constant retransmission probability in each slot Each station transmits during a contention slot with probability p Computation P[ some station sends successfully ] A=kp(1-p) k-1 p=1/k A max =(1-1/k) k-1 if k-> , A->1/e P[ contention interval has j slots ]=A(1-A) j-1 mean number of contention slots E= j A(1-A) j -1 = 1/A->e j=1 mean contention time w=E*2 =2 /A ->5.4 if mean frame transmission time is P, efficiency=P/(P+2 /A) replace P with F/B, with L/c, efficiency=1/(1+2BL/cAF)->1/(1+2BLe/cF)
56
802.3 Performance(2) Conclusion Increasing network bandwidth or distance reduces efficiency for a given frame size
57
802.3 Performance(3) Efficiency of 802.3 at 10 Mbps with 512-bit slot times.
58
Switched 802.3 LANs A simple example of switched 802.3 LAN
59
Fast Ethernet The original fast Ethernet cabling.
60
Gigabit Ethernet (a) A two-station Ethernet. (b) A multi-station Ethernet.
61
Gigabit Ethernet (2) Gigabit Ethernet cabling.
62
Wireless LANs The 802.11 Protocol Stack The 802.11 Physical Layer The 802.11 MAC Sublayer Protocol The 802.11 Frame Structure Services
63
The 802.11 Protocol Stack Part of the 802.11 protocol stack.
64
The 802.11 MAC Sublayer Protocol (a) The hidden station problem. (b) The exposed station problem.
65
The 802.11 MAC Sublayer Protocol (2) The use of virtual channel sensing using CSMA/CA.
66
The 802.11 MAC Sublayer Protocol (3) A fragment burst.
67
The 802.11 Frame Structure The 802.11 data frame.
68
IEEE 802.2: Logical Link Control (a) Position of LLC. (b) Protocol formats.
69
Bridges Why do we need bridges? Different LANs Geographical distance Share load Reliability Security Bridge problem Different frame format Different data rate Buffer Timer Different maximum frame length
70
Data Link Layer Switching Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.
71
Bridges from 802.x to 802.y Operation of a LAN bridge from 802.11 to 802.3.
72
Bridges from 802.x to 802.y (2) The IEEE 802 frame formats. The drawing is not to scale.
73
Local Internetworking A configuration with four LANs and two bridges.
74
Transparent Bridges Operate in promiscuous mode Use Backward Learning Algorithm to build routing table Routing procedure 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 Periodically purge all entries more than a few minutes old
75
Cycle Problem Two parallel transparent bridges.
76
Spanning Tree Bridges (a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.
77
Spanning Tree Bridges(2) How to build spanning tree Choose one bridge to be the root of the tree Search the shortest paths from the root to every bridge and LAN
78
Remote Bridges Remote bridges can be used to interconnect distant LANs.
79
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (a) Which device is in which layer. (b) Frames, packets, and headers.
80
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2) (a) A hub. (b) A bridge. (c) a switch.
81
Virtual LANs A building with centralized wiring using hubs and a switch.
82
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.
83
The IEEE 802.1Q Standard Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.
84
The IEEE 802.1Q Standard (2) The 802.3 (legacy) and 802.1Q Ethernet frame formats.
85
Summary Channel allocation methods and systems for a common channel.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.