Communication Networks Lecture 5 NETW 501-L5: NETW 501-L5: Medium Access Control Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204,

Slides:



Advertisements
Similar presentations
Channel Allocation Protocols. Dynamic Channel Allocation Parameters Station Model. –N independent stations, each acting as a Poisson Process for the purpose.
Advertisements

The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
EECC694 - Shaaban #1 lec #5 Spring Data Link In Broadcast Networks: The Media Access Sublayer Broadcast networks with multi-access (or random.
Ethernet – CSMA/CD Review
12.1 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Fundamentals of Computer Networks ECE 478/578
12.1 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 12 Multiple Access Figure 12.1 Data link layer divided into two functionality-oriented sublayers Figure 12.2 Taxonomy of multiple-access protocols.
1 Pertemuan 13 Teknik Akses Jaringan - Random Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
MAC Protocols Media Access Control (who gets the use the channel) zContention-based yALOHA and Slotted ALOHA. yCSMA. yCSMA/CD. TDM and FDM are inefficient.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 16 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Studying Local Area Networks Via Media Access Control (MAC) SubLayer
12.1 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Networks: Local Area Networks1 LANs Studying Local Area Networks Via Media Access Control (MAC) SubLayer.
Computer Networks: Local Area Networks 1 LANs Studying Local Area Networks via the Media Access Control (MAC) SubLayer.
Semester EEE449 Computer Networks The Data Link Layer Part 2: Media Access Control En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex,
Medium Access Control Sublayer
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Medium Access Control.
1 ECE453 – Introduction to Computer Networks Lecture 7 – Multiple Access Control (I)
9/11/2015 5:55 AM1 Ethernet and CSMA/CD CSE 6590 Fall 2010.
Wireless Application Protocol
1 Computer Communication & Networks Lecture 12 Datalink Layer: Multiple Access Waleed Ejaz
McGraw-Hill © The McGraw-Hill Companies, Inc., 2004 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
Chapter 12 Multiple Access Figure 12.1 Data link layer divided into two functionality-oriented sublayers Figure 12.2 Taxonomy of multiple-access protocols.
CHAPTER 4: THE MEDIUM ACCESS SUBLAYER 4.1: The Channel Allocation Problem 4.2: Multiple Access Protocols.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
جلسه یازدهم شبکه های کامپیوتری به نــــــــــــام خدا.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Unit-II Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Medium Access Control Sub Layer
12.1 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Multiple Access.
Data Communications, Kwangwoon University12-1 Chapter 12. Multiple Access 1.Random Access 2.Controlled Access 3.Channelization.
1 Kyung Hee University Chapter 12 Multiple Access.
Chapter 6 Multiple Radio Access
Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note 9.
1 Kyung Hee University Chapter 12 Multiple Access.
Ch 12. Multiple Access. Multiple Access for Shared Link Dedicated link – Point-to-point connection is sufficient Shared link – Link is not dedicated –
Background of Ad hoc Wireless Networks Student Presentations Wireless Communication Technology and Research Ad hoc Routing and Mobile IP and Mobility Wireless.
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
ECEN 621, Prof. Xi Zhang ECEN “ Mobile Wireless Networking” Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc.
Chapter 12 Multiple Access
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 Ethernet CSE 3213 Fall February Introduction Rapid changes in technology designs Broader use of LANs New schemes for high-speed LANs High-speed.
Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note 10.
Chapter 12 Media Access Control (MAC)
Multiple Access. Figure 12.1 Data link layer divided into two functionality-oriented sublayers.
COMPUTER NETWORKS Data-link Layer (The Medium Access Control Sublayer) MAC Sublayer.
Lecture Focus: Data Communications and Networking  Data Link Layer  Media Access Control (MAC) Lecture 23 CSCS 311.
Multiple Access By, B. R. Chandavarkar, CSE Dept., NITK, Surathkal Ref: B. A. Forouzan, 5 th Edition.
ECEN “Mobile Wireless Networking”
CSMA/CD Carrier sense multiple access with collision detection (CSMA/CD) is a media access control method used most notably in early Ethernet technology.
MEDIUM ACCESS CONTROL PROTOCOL
Chapter 12 Multiple Access.
Lab 7 – CSMA/CD (Data Link Layer Layer)
Chapter 12 Multiple Access
Multiple Access Mahesh Jangid Assistant Professor JVW University.
Chapter 12 Multiple Access
Figure 12.1 Data link layer divided into two functionality-oriented sublayers Networks can be divided into two categories: those using point-to-point.
Chapter 12 Multiple Access
Chapter 12 Multiple Access
Communication Networks NETW 501
Chapter 12 Multiple Access
Data Communication Networks
Chapter 6 Multiple Radio Access.
Multiple Access Control (MAC) Protocols
Presentation transcript:

Communication Networks Lecture 5 NETW 501-L5: NETW 501-L5: Medium Access Control Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204,

Data Link Layer LLC MAC Network Physical Framing (Grouping Bits into Frames) Error Control Flow Control Medium Access Control

Multiple Access Communications Key issue: How to share the medium?  M Shared multiple access medium

Multiple-Access Protocols:

EXAMPLE FOR CONTROLLED ACCESS

Ring networks A Scheduling Method: Token-Passing token Station that holds token transmits into ring token Data to M

RANDOM ACCESS PROTOCOLS

Multiple-Access Protocols Discussed 1.In random access or contention methods, no station is superior to another station and no one is assigned higher priority over any other station. 1.No station permits, or does not permit, another station to send (every one is free). 1.At each instance, a station that has data to send uses a procedure defined by (WHATEVER) protocol to make a decision on whether or not to send. ALOHA (slotted and reservation) Carrier Sense Multiple Access Carrier Sense Multiple Access with Collision Detection Carrier Sense Multiple Access with Collision Avoidance Topics discussed so far:

Multitapped Bus Random Access Transmit when ready Crash!! Transmissions collision can occur; THEREFORE, we need retransmission strategy

Two stations are trying to share a common medium Two-Station MAC Example A transmits at t = 0 Distance d meters t prop = d / seconds AB AB B does not transmit before t = t prop.'. A captures the channel successfully Case 1 B transmits before t = t prop and detects collision.'. A & B transmissions are corrupted AB Case 2 A detects collision at t = 2 t prop A B

ALOHA Operation Collision definition: – Transmissions from two or more terminals overlap in time (this time is called collision region or duration) ALOHA Operation: – Messages transmitted once they are available – Suddenly, messages may collide (treated as erroneous frames) – The terminal knows that its messages was corrupted when it receives no acknowledgements within 2t prop + T t (i.e., a timeout is used) – Recovery by the use of retransmissions Can we simply apply retransmission directly after timeouts? – NO! Retransmissions will collide again – SOLUTION: Retransmission after random intervals from timeouts (Backoff Algorithm) Terminal A Terminal B Terminal A Terminal B Collision Terminal A Terminal B No CollisionCollision Collision Region

ALOHA Model Wireless link to provide data transfer between main campus & remote campuses of University of Hawaii islands Simplest solution: just do it – A station transmits whenever it has data to transmit – If more than one frames are transmitted, they interfere with each other (collide) and are lost – If ACK not received within timeout, then a station picks random backoff time (to avoid repeated collision) – Station retransmits frame after backoff time t t0t0 t 0 -T t t 0 +T t t 0 +T t +2t prop t 0 +T t +2t prop + B Vulnerable period = 2T t Time-out Backoff period “B” First transmission Retransmission

ALOHA Model (Cont.) Definitions and assumptions – T t frame transmission time (assume constant) – S: throughput (average # successful frame transmissions per T t seconds) – G: load (average # transmission attempts per T t sec.) – P success : probability a frame transmission is successful TtTt TtTt frame transmission Prior interval Note: Any transmission that begins during vulnerable period leads to collision

Vulnerable time for pure ALOHA protocol

Frames overview in pure ALOHA

Throughput of ALOHA ● our analysis assumed that many nodes share a common channel ● if only 1 node uses the medium, S=1 ● Max throughput is  max =  1/2e (18.4%), when G=1/2 ‘one frame per vulnerable period’ ● G increases S increases until it reaches S max – after that point the network enters ‘unstable operating conditions’ in which collisions become more likely and the number of backlogged stations increases 1/2e -1 = Stable Unstable

Vulnerable time Example A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the requirement to make this frame collision- free? Solution Average frame transmission time T fr is 200 bits/200 kbps or 1 ms. The vulnerable time (from figure) is 2 × 1 ms = 2 ms. This means that no station should send later than the 1 ms before this station will start its transmission (is it reasonable ??) And no station should start sending during the one 1-ms period that this station is sending.

Procedure of ALOHA (Case to study with maximum transmission attempts)

Slotted ALOHA ● Time is slotted (divided) in T t = L/R seconds slots ● Stations synchronized to frame times so that each node knows when ● the slots begin ● Stations transmit frames only at the beginning of slots, and only after frame is ready ● Backoff intervals can be easily multiples of slots t (k+1)T t kT t t 0 +T t +2t prop + B Vulnerable period = T t Time-out Backoff period B t 0 +T t +2t prop Only frames that arrive during prior T t seconds collide: Avoid partial collisions t0t0 Position depends on the length of the slot

ALOHA Performance ➢ max throughput of Slotted ALOHA (S max = 0.36) occurs at G=1, which corresponds to a total arrival rate of ‘one frame per vulnerable period’ ➢ S max = 0.36 ⇒ max Slotted ALOHA throughput = 36% of the actual channel capacity Slotted ALOHA vs. Pure ALOHA ● slotted ALOHA reduces vulnerability to collision ● Higher overall throughput

Vulnerable time for slotted ALOHA protocol

Collision in slotted ALOHA protocol

Throughput for pure/slotted ALOHA protocol pure S = G × e −2G The throughput for pure ALOHA is S = G × e −2G. The maximum throughput S max = 18.4% S max = 18.4% when G (load in frame/msec)= (1/2). pure S = G × e −2G The throughput for pure ALOHA is S = G × e −2G. The maximum throughput S max = 18.4% S max = 18.4% when G (load in frame/msec)= (1/2). slotted S = G × e −G The throughput for slotted ALOHA is S = G × e −G. The maximum throughput S max = 36.8% S max = 36.8% when G (load in frame/msec)= (1). slotted S = G × e −G The throughput for slotted ALOHA is S = G × e −G. The maximum throughput S max = 36.8% S max = 36.8% when G (load in frame/msec)= (1).

Carrier Sensing Multiple Access (CSMA) A Station A begins transmission at t = 0 A Station A captures channel at t = t prop Low throughput of ALOHA is due to waste of bandwidth due to collisions CSMA: Sense (i.e., Listen) the medium for presence of a carrier signal before transmission A terminal transmit only if it senses an idle channel Widely used in LAN with Bus Topology Vulnerable period = t prop Network Diameter

Transmitter behavior when busy channel is sensed – 1-persistent CSMA (most greedy [trial and error]) Start transmission as soon as the channel becomes idle Low delay and low efficiency – Non-persistent CSMA (least greedy) If channel is busy, immediately run the backoff algorithm to set a time to re-sense the channel High delay and high efficiency – p-persistent CSMA (adjustable/adaptive greedy) If the channel is busy, wait till channel becomes idle, transmit with prob. p; or wait one mini-slot time & re-sense with probability 1-p Delay and efficiency can be balanced CSMA Options

CSMA of three persistence methods

CSMA with Collision Detection (CSMA/CD) ‘collision detection’ is another level of CSMA CSMA-CD reduces wastage to time to detect collision and abort transmission in CSMA/CD – station listens while transmitting – if a station hears something different than what it is sending, it immediately stops (this happens when 2 or more transmitting signals garble each other) – in addition, if a collision is detected, a short jamming signal is subsequently sent to ensure that other stations know that collision has occurred (thus, all stations discard the part of frame received) – reschedule random backoff times, and try again at scheduled times

CSMA/CD reaction time It takes 2* t prop to find out if channel has been captured Note 1: This is called “ reaction time” Note 2: collision detection works only as long as frame-size is sufficiently long to require more than a round-trip time for transmission A begins to transmit at t = 0 A B B begins to transmit at t = t prop -  ; B detects collision at t = t prop A B A B A detects collision at t= 2 t prop -  frame size/R (T t ) > 2 * t prob

Analysis of p-persistent CSMA/CD channel can be in three states: – busy transmitting / idle / contention period Def: contention period – stations attempt to capture the channel by transmitting during mini-slots and listening whether they have successfully captured the channel or not each contention interval (minislot) = 2*t prop BusyContentionBusy Time IdleContentionBusy Assume n stations contend for the channel, each station transmits during a contention mini-slot with probability p.

Vulnerable time in CSMA

Space/time model of the collision in CSMA

Contention Resolution Performance For small a: CSMA-CD has best throughput For small a: CSMA-CD has best throughput For larger a: Aloha & slotted Aloha better throughput For larger a: Aloha & slotted Aloha better throughput T prop /T t =a

Collision of the first bit in CSMA/CD

Collision and abortion in CSMA/CD

Flow diagram for the CSMA/CD <= For non-contention period

CSMA/CD Example A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation time (including the delays in the devices and ignoring the time needed to send a jamming signal) is 25.6 μs, In this case, what is the minimum size of the frame? Solution The frame transmission time is T fr = 2 × T p = 51.2 μs. This means, in the worst case, a station needs to transmit for a period of 51.2 μs to detect the collision. The minimum size of the frame is: The minimum size of the frame is: 10 Mbps × 51.2 μs = 512 bits or 64 bytes. This is actually the minimum size of the frame for Standard Ethernet.

Energy level during transmission, idleness, or collision