lecture 4 6-apr-2016 - wordpress.com · 2016-04-06 · station senses channel and if idle:...
TRANSCRIPT
![Page 1: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/1.jpg)
Lecture 4 6-Apr-2016
Local Networks
![Page 2: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/2.jpg)
Roadmap of the Course So far Basic telecom concepts General study of LANs LAN topologies Flow and error control
Today we continue the general study of LANs Medium access methods Logical link control
![Page 3: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/3.jpg)
Medium Access Control (MAC) Methods
![Page 4: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/4.jpg)
Medium Access Methods In LANs all stations are connected to a shared
transmission medium Simultaneous attempts to access the medium by
more than 1 station possible (=> collision) To prevent the above situation, each protocol has a
MAC method (Medium Access Control) Station follows some procedure when it needs to send
frames No conflicts between stations thus ensured
![Page 5: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/5.jpg)
Types of methods
![Page 6: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/6.jpg)
Random access methods No station controls other stations Also named contention methods Stations compete with each other
A station with data to send Applies a protocol-related procedure for deciding
whether or not to transmit Decision may depend on medium state (idle or
busy)
![Page 7: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/7.jpg)
Collision When more than one station tries to transmit =>
access conflict => frames will be destroyed or modified
This access conflict is called collision
![Page 8: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/8.jpg)
Procedures issues When should station access the medium? What should station do if medium is busy? How should station determine success or failure of
a transmission? What should station do when there is an access
conflict? Note: Broadcasting provides feedback
A sender can always find out whether its transmitted frame was destroyed, by listening to the channel, as all the other stations do
LAN – immediate feedback, satellite system – about 270 ms delay
![Page 9: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/9.jpg)
Random access methods
![Page 10: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/10.jpg)
Multiple access (MA) methods
ALOHA-type methods Earliest and simplest, least efficient Designed in early 70s, to be used in communication
at University of Hawaii Wireless (radio) LAN
![Page 11: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/11.jpg)
ALOHA Originally: ground-based radio broadcasting, on 2
frequencies one for sending data, one for receiving ACKs
Basic idea works for any system with uncoordinated users competing for a single shared channel
Two versions: pure and slotted
![Page 12: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/12.jpg)
ALOHA rules Multiple access No carrier sense No checking for collision Acknowledgement (explicit or implicit) Ack should arrive in the allotted time (two times the
maximum propagation delay) Otherwise frame has to be resent After waiting a random amount of time
![Page 13: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/13.jpg)
Pure ALOHA
Users transmit whenever they have data to send There will be collisions, collided frames damaged Sender finds out if transmission was successful With feedback property With acknowledgements
If frame collided, sender waits random amount of time and sends again Called backoff strategy
Efficiency of such channel allocation: ≈ 18%
![Page 14: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/14.jpg)
Pure ALOHA procedure
![Page 15: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/15.jpg)
Pure ALOHA’s vulnerable time Time interval during which collision can occur
![Page 16: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/16.jpg)
Slotted ALOHA
Time divided into slots, each slot corresponds to one frame
Agreement on slot boundaries needed (synchronization) One special station can emit a “beep” at the start of
each slot Users send at the beginning of slots only Vulnerable period is halved when compared
to pure ALOHA => double efficiency: ≈ 37%
![Page 17: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/17.jpg)
Slotted ALOHA illustration
![Page 18: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/18.jpg)
Slotted ALOHA’s vulnerable time
![Page 19: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/19.jpg)
Carrier Sense Multiple Access (CSMA) methods
The medium is sensed by each station before trying to use it Chance of collision reduced => performance
increased Collisions can still appear Due to propagation delays
Vulnerable time in CSMA = propagation time Tprop Time needed for a signal to propagate from one end
of the medium to the other
![Page 20: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/20.jpg)
Collisions in CSMA
![Page 21: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/21.jpg)
CSMA methods
Several types Persistent (and p-persistent) Non-persistent CSMA with collision detection (CSMA/CD) CSMA with collision avoidance (CSMA/CA)
![Page 22: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/22.jpg)
Non-persistent CSMA Station senses the channel If channel idle station starts transmitting If channel busy, station waits a random amount of time
and then it senses the channel again Better efficiency than persistent CSMA’s Unlikely that two stations wait the same amount of
random time Reduces the network’s efficiency Idle medium while stations have frames to send
![Page 23: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/23.jpg)
Non-persistent CSMA illustration
![Page 24: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/24.jpg)
(1-)Persistent CSMA When a station has to send, it first listens to
the channel If channel busy, station waits until it becomes
idle If channel idle, station transmits frame
(probability 1) If collision occurs, a random amount of time
passes and everything starts over again Better than ALOHAs; used in Ethernet
![Page 25: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/25.jpg)
(1-)Persistent CSMA illustration
![Page 26: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/26.jpg)
p-Persistent CSMA Applies to slotted channels Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p At next slot, if idle, same thing Algorithm repeated until frame transmitted or another
station begins transmission If channel busy, station waits a random time and senses
again Better performances for small p
![Page 27: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/27.jpg)
p-Persistent CSMA illustration
![Page 28: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/28.jpg)
Channel utilization versus load
![Page 29: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/29.jpg)
CSMA / CD Different improvement when compared to ALOHA Stations abort transmission as soon as they detect a
collision => saves time and bandwidth Widely used on LANs’ MAC (basis of Ethernet) Model At t0 some station finished transmission Any other station may start transmitting => collisions may
occur After a detected collision, stations wait a random time and
start sending again, sensing the channel first When does a frame know it sent successfully?
![Page 30: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/30.jpg)
CSMA/CD 2 Minimum time to detect a collision Time needed for a signal to propagate from a station to
another Worst case scenario τ – the time needed for a signal to propagate between
farthest stations It takes 2τ until a station is certain it seized the channel (if
transmits for 2τ without hearing a collision, then it is sure) A sending station must continually monitor the
channel To listen for noise bursts indicating a collision
CSMA/CD inherently a half-duplex system
![Page 31: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/31.jpg)
Collision detection
![Page 32: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/32.jpg)
CSMA/CD illustration
![Page 33: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/33.jpg)
(Truncated) binary exponential backoff algorithm
Used by all collision-detecting stations to calculate their individual retransmission delay (backoff delay) after 1st collision each station waits 0 or 1 slot times before trying again;
if each station picks the same random number, they will collide again after 2nd collision each station picks 0,1,2, or 3 slot times before trying
again, and waits that number of slot times if a 3rd collision occurs, the next time number of slots to wait is chosen
randomly by each station from the interval 0 to 23-1 after i collisions, a random number between 0 to 2i-1 is chosen, and that
number of slots is skipped after 10 collisions the randomization interval is frozen at a maximum of
1023 slots after 16 collisions a failure is reported and recovery is up to higher
layers
![Page 34: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/34.jpg)
(Truncated) binary exponential backoff algorithm 2
The algorithm dynamically adapts to the number of stations trying to send
If randomization interval for all collisions was 1023 the chance for two stations to collide for a second time: negligible the average wait after a collision: hundreds of slot times => delay
If each station always delayed for 0 or 1 slots stations would collide again and again
The algorithm ensures a low delay when only few stations collide
Also ensures collision is resolved in reasonable interval when many stations collide
Truncating the backoff at 1023 keeps the bound from growing too large
![Page 35: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/35.jpg)
CSMA/CA No collision, collisions are avoided If line idle, it waits an Inter Frame Gap (IFG) time
interval, then a random amount of time, then sends frame and sets timer
Station waits for ACK from receiver If received before timer expires => success If not => failed; increases backoff parameter, waits
a backoff time interval and senses line Used in wireless LANs
![Page 36: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/36.jpg)
CSMA/CA illustration
![Page 37: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/37.jpg)
Controlled access Stations consult each other to see which has the
right to send One station then sends Being authorized by the rest
Example: token passing
![Page 38: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/38.jpg)
Token passing
![Page 39: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/39.jpg)
Token passing illustration (simplified)
![Page 40: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/40.jpg)
A Bitmap protocol
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Collision-free protocols avoid collisions entirely Senders must know when it is their turn to send
The basic bit-map protocol: Sender set a bit in contention slot if they have data Senders send in turn; everyone knows who has
data
![Page 41: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/41.jpg)
Binary Countdown protocol
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Binary countdown improves on the bitmap protocol
Stations send their address in contention slot (log N bits instead of N bits)
Medium ORs bits; stations give up when they send a “0” but see a “1”
Station that sees its full address is next to send
![Page 42: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/42.jpg)
Limited-Contention Protocols Performance measures
delay at low load channel efficiency at high load
Contention strategies - Light load: contention preferred
- it has low delay and collisions are rare - High load: contention less atractive
- overhead associated with channel arbitration Collision-free
- Light load - relatively high delay
- High load - channel effciency improves, as overheads are fixed
⇒ it would be nice to combine the advantages of both
⇒ contention at low load to get low delay ⇒ collision free at high load for good channel efficiency
![Page 43: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/43.jpg)
Limited-Contention Protocols
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Idea is to divide stations into groups within which only a very small number are likely to want to send Avoids wastage due to idle periods and collisions
Already too many contenders for a good chance of one winner
![Page 44: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/44.jpg)
Limited-Contention Protocols: how? To increase probability of success for station i Decrease competition amount
Divide stations into groups Can be non-disjoint
Only members of group 0 can compete for slot 0 If one succeeds, it transmits If not, or nothing to submit, group 1 contends for slot 1,
etc Key: appropriate division into groups Dynamic is better many stations per slot when load is low Few (even one) stations per slot when load is high
![Page 45: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/45.jpg)
Limited Contention – Adaptive Tree Walk
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Tree divides stations into groups (nodes) to poll Depth first search under nodes with poll collisions Start search at lower levels if >1 station expected
Level 0
Level 1
Level 2
![Page 46: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/46.jpg)
Wireless LAN Protocols (1)
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Wireless has complications compared to wired Cannot detect collisions acknowledgements used
A station may not be able to transmit to/to receive from all other stations limited radio range
![Page 47: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/47.jpg)
Wireless LANs (2) – Hidden terminals
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Hidden terminals are senders that cannot sense each other but nonetheless collide at intended receiver Want to prevent; loss of efficiency A and C are hidden terminals when sending to B
![Page 48: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/48.jpg)
Wireless LANs (3) – Exposed terminals
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Exposed terminals are senders who can sense each other but still transmit safely (to different receivers) Desirably concurrency; improves performance B A and C D are exposed terminals
![Page 49: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/49.jpg)
Wireless LANs (4) – MACA
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
MACA protocol grants access for A to send to B: A sends RTS to B [left]; B replies with CTS [right] C can send while the data frame is being sent if not interfering;
D and E must be silent until data frame sent completely
A sends RTS to B; C and E hear and defer for CTS
B replies with CTS; D and E hear and defer for data
![Page 50: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/50.jpg)
Logical Link Control
![Page 51: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/51.jpg)
IEEE 802 Project 1985: IEEE Computer Society started the 802
Project Standard to enable LAN intercommunication from a
variety of manufacturers Specifies functions of PhL and DLL of major LAN
Protocols
![Page 52: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/52.jpg)
IEEE 802 working groups Number Topic
802.1 Overview and architecture of LANs 802.2 ↓ Logical link control 802.3 * Ethernet 802.4 ↓ Token bus (was briefly used in manufacturing plants) 802.5 Token ring (IBM's entry into the LAN world) 802.6 ↓ Dual queue dual bus (early metropolitan area network) 802.7 ↓ Technical advisory group on broadband technologies 802.8 † Technical advisory group on fiber optic technologies 802.9 ↓ Isochronous LANs (for real-time applications) 802.10 ↓ Virtual LANs and security 802.11 * Wireless LANs (WiFi) 802.12 ↓ Demand priority (Hewlett-Packard's AnyLAN) 802.13 Unlucky number; nobody wanted it 802.14 ↓ Cable modems (defunct: an industry consortium got there first) 802.15 * Personal area networks (Bluetooth, Zigbee) 802.16 * Broadband wireless (WiMAX) 802.17 Resilient packet ring 802.18 Technical advisory group on radio regulatory issues 802.19 Technical advisory group on coexistence of all these standards 802.20 Mobile broadband wireless (similar to 802.16e) 802.21 Media independent handoff (for roaming over technologies) 802.22 Wireless regional area network
![Page 53: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/53.jpg)
IEEE Standard and OSI model
![Page 54: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/54.jpg)
IEEE Standards for LANs
![Page 55: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/55.jpg)
Logical Link Control (LLC) - 802.2 Generic sublayer, part of the data link layer Allows interoperability between different LAN
protocols
![Page 56: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/56.jpg)
LLC functions LLC connects together LANs with different
protocols LLC hides the LAN-specific aspects to upper
layers Access method, encoding, signaling, transmission
media LLC adds reliability by supervising MAC
frames MAC sublayer provides a virtual unreliable link
LLC can be present or not in a network
![Page 57: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/57.jpg)
Multiplexing using LLC When stations use multiple upper layer protocols
(e.g. IP and IPX)
![Page 58: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/58.jpg)
LLC services LLC supplies services to the user of the LAN (typically
the network layer)
![Page 59: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/59.jpg)
LLC service types
![Page 60: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/60.jpg)
Service primitives (message exchanges)
![Page 61: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/61.jpg)
Unacknowledged connectionless service
User passes data unit without making any connection nor expecting any ACK
![Page 62: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/62.jpg)
Acknowledged connectionless service
User gets ACK for data transfer
![Page 63: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/63.jpg)
Connection-oriented service Connection established, data exchange,
connection released
![Page 64: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/64.jpg)
Connection-oriented service, data transfer
![Page 65: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/65.jpg)
Connection-oriented service, disconnection
![Page 66: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/66.jpg)
Connection-oriented service, other primitives
Resetting the connection If either user believes something is wrong (e.g.,
synchronization) Flow control LLC user can indicate how much data should be
passed between entities in the next data transfer
![Page 67: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/67.jpg)
LLC protocol Defines the format of data units sent between 2
LLCs Data unit: PDU (protocol data unit) Information PDU: I-PDU Transport user data in connection-oriented services
Supervisory PDU: S-PDU Flow and error control
Unnumbered PDU: U-PDU Carry data in connectionless services and management
information in connection-oriented services
![Page 68: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/68.jpg)
PDUs
![Page 69: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/69.jpg)
PDU format 4 fields: destination service access point (DSAP),
source service access point (SSAP), control, and information
![Page 70: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/70.jpg)
DSAP and SSAP Addresses used by LLC Identify protocol stacks on receiving and sending
machine
![Page 71: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/71.jpg)
Control field First one/two bits define the PDU type
![Page 72: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/72.jpg)
I-PDU N(S) specifies number of PDU being sent Its own identifying number
N(R) specifies number of PDU being expected Implies two-way exchange (with piggybacking) ACK field referring to a previous correct reception of
PDUs until the next expected one NAK field referring to a previous incorrect reception of
the respective PDU
![Page 73: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/73.jpg)
S-PDU N(R) is used when receiver has no data of its own
to send S-PDUs do not transmit data Hence do not need N(S) to identify them
“Code” refers to some coded flow and error control information
![Page 74: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/74.jpg)
U-PDU Has neither N(S) nor N(R) Has 2 code fields, one 2-bit long, another 3-bit long
![Page 75: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/75.jpg)
P/F bit Stands for poll/final, single bit with dual purpose Has meaning only when set (bit=1) It means poll when a PDU is sent by a primary station to a
secondary one Address field contains the receiver’s address
It means final when a PDU is sent by a secondary station to a primary one Address field contains the sender’s address
In some protocols is used to force the other machine to send a Supervisory frame immediately, rather than waiting for reverse traffic and piggyback
![Page 76: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/76.jpg)
Information field Used to carry The data sent from an upper layer Management information needed for LLC operation
Possible to include flow/error/other control information in I-PDUs
Combining data to be sent with control information: piggybacking
![Page 77: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/77.jpg)
More on PDUs I-PDU designed for user information transport and
piggybacked ACKs S-PDU Used for ACKs, flow control, error control when
piggybacking is not appropriate No information in the information field, but still carry
messages to receiver Messages based on S-PDU type and transmission
context
![Page 78: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/78.jpg)
More on S-PDUs Receive ready (RR,00): receiving station returns
ACK of a received I-PDU In this case receiver has no data of its own to send N(R) contains the sequence number of next expected PDU
Receive not ready (RNR,01): receiver returns ACK for all PDUs except the one in N(R) Also requests that no more PDUs be sent until a RR S-PDU is issued
Reject (REJ,10): NAK returned by a receiver in a go-back-n ARQ system When receiver has no data on which to piggyback the response N(R) contains the number of damaged PDU => that PDU and all that
follow need to be retransmitted Selective reject (SRJ,11): requires the
retransmission of specified frame
![Page 79: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/79.jpg)
More on U-PDUs Unnumbered PDUs used for exchanging User information Management and control information between connected
devices Much of the carried information contained in the control
field codes
![Page 80: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/80.jpg)
PDUs in unacknowledged connectionless service
This service uses 3 unnumbered PDUs UI, XID, TEST XID: exchange IDs; TEST: loopback test
![Page 81: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/81.jpg)
PDUs in acknowledged connectionless service
This service uses only one unnumbered PDU AC: acknowledged connectionless information
![Page 82: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/82.jpg)
PDUs in connection-oriented service
This service uses all 3 types of PDUs
![Page 83: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/83.jpg)
Data transfer
![Page 84: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/84.jpg)
Piggybacking
![Page 85: Lecture 4 6-Apr-2016 - WordPress.com · 2016-04-06 · Station senses channel and if idle: Transmits with probability p Defers transmission until next slot with probability q=1-p](https://reader033.vdocuments.us/reader033/viewer/2022050419/5f8f15f726e1730d863bd1ed/html5/thumbnails/85.jpg)
Disconnection