1 University of Calgary CS 441 Part 4 Medium Access Control 4.1 MAC Sublayer - CSMA 4.2 MAC Sublayer - Collision Free.

Slides:



Advertisements
Similar presentations
Nick Feamster CS 4251 Computer Networking II Spring 2008
Advertisements

Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 16 – High Speed LANs.
Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Computer Networks Ethernet I Professor Hui Zhang
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.
Ethernet – CSMA/CD Review
The Data Link Layer introduction point-to-point data link protocols
Communication Networks Lecture 5 NETW 501-L5: NETW 501-L5: Medium Access Control Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204,
1 K. Salah Module 4.2: Media Access Control The Media Access Control (MAC) sublayer –Random Access (CSMA), IEEE –Token Passing, IEEE Ch 13-
1 Version 3.0 Module 6 Ethernet Fundamentals. 2 Version 3.0 Why is Ethernet so Successful? In 1973, it could carry data at 3 Mbps Now, it can carry data.
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.
Chapter 14 LAN Systems Ethernet (CSMA/CD) ALOHA Slotted ALOHA CSMA
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
EE 122: Ethernet and Ion Stoica September 18, 2002 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
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
1 LAN Topologies, Access methods (Week 1, Wednesday 1/10/2007) © Abdou Illia, Spring 2007.
Medium Access Control Sublayer
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Medium Access Control.
Enhanced CSMA Additional improvement  Use CSMA access  Listen while transmitting  Stop immediately if collision sensed  Called collision detection.
Review: Medium Access Control Sublayer –What is the problem to be addressed in this sublayer? –Protocols that allow collision Pure ALOHA Slotted ALOHA.
9/11/2015 5:55 AM1 Ethernet and CSMA/CD CSE 6590 Fall 2010.
Ethernet. Ethernet Goals Simplicity Low Cost Compatibility Address flexibility Fairness –All nodes have equal access to the network High speed Stability.
1 Content Error detection and correction MAC sub-layer Ethernet Token Ring.
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network 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.
Ch. 16 High-Speed LANs The Emergence of High- Speed LANs Trends –Computing power of PCs has continued to grow. –MIS organizations recognize the.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking LANs 2: MAC protocols.
LAN technologies and network topology LANs and shared media Locality of reference Star, bus and ring topologies Medium access control protocols.
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
CSCI 465 D ata Communications and Networks Lecture 21 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Data and Computer Communications Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
جلسه یازدهم شبکه های کامپیوتری به نــــــــــــام خدا.
4: DataLink Layer1 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
17 - Winter 2005 ECE ECE 766 Computer Interfacing and Protocols 1 Local Area Networks Need for high performance communications for physically close devices.
Medium Access Control Sub Layer
Data Communications, Kwangwoon University12-1 Chapter 12. Multiple Access 1.Random Access 2.Controlled Access 3.Channelization.
Chapter 6 Multiple Radio Access
LANs : Aloha/CSMA , summary
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Ch 12. Multiple Access. Multiple Access for Shared Link Dedicated link – Point-to-point connection is sufficient Shared link – Link is not dedicated –
IEEE STANDARDS IEEE STANDARDS In 1985, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable intercommunication.
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
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.
COMPUTER NETWORKS Data-link Layer (The Medium Access Control Sublayer) MAC Sublayer.
Example DLL Protocols 1. High-Level Data Link Control (HDLC).
Data Link Layer Lower Layers Local Area Network Standards
Week3 The Medium Access Sublayer
High Speed LANs – Ethernet and Token Ring
Chapter 14 LAN Systems Ethernet (CSMA/CD) ALOHA Slotted ALOHA CSMA
Multiple Access Mahesh Jangid Assistant Professor JVW University.
Net301 lecture9 11/5/2015 Lect 9 NET301.
Services of DLL Framing Link access Reliable delivery
THE IEEE MAC SUB-LAYER – chapter 14
Chapter 12 Multiple Access
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
Ethernet – CSMA/CD Review
7- chapter Seven Local Area Networks (LAN)
Computer Interfacing and Protocols
LAN Addresses and ARP IP address: drives the packet to destination network LAN (or MAC or Physical) address: drives the packet to the destination node’s.
Chapter 6 Multiple Radio Access.
Dr. John P. Abraham Professor UTPA
Multiple Access Control (MAC) Protocols
Presentation transcript:

1 University of Calgary CS 441 Part 4 Medium Access Control 4.1 MAC Sublayer - CSMA 4.2 MAC Sublayer - Collision Free

2 University of Calgary CS Data Link Layer - Medium Access Control Data Link layer Physical layer Logical Link Control (LLC) Medium Access Control (MAC) Physical layer MAC Data Link Sublayer

3 University of Calgary CS 441 MAC Protocols - Two Basic Approaches Scheduling +ready stations transmit on a schedule +wastes time/bandwidth when scheduled station does not need channel, current station could have sent immediately +stations are always guaranteed to get through on the predefined schedule Random Access +ready stations transmit anytime +collisions can result when transmissions from different stations overlap +stations not guaranteed to get through (collisions may continue to occur)

4 University of Calgary CS 441 Broadcast Networks LANs +Ethernet - CSMA/ CD LANs - token ring +FDDI +Domain +MAP/TOP MANs +SONET Satellite

5 University of Calgary CS 441 Random Access Protocols - Variations no carrier sensing - cannot see if line is in use +transmit any time +detect collisions via traditional error detection schemes (eg Nacks, timeouts) +eg, ALOHA, SLOTTED ALOHA carrier sense multiple access - CSMA +sense if channel is busy, send if idle +collisions if 2 stations send at same time CSMA / CD: with Collision Detection +sense if channel is busy or a collision occurs +stops sending if a collision is noticed +eg, IEEE 802.3

6 University of Calgary CS 441 Sheduling Protocols - Variations fixed assignment +station has designated time slot for sending +eg, TDMA: Time Division Multiple Access, each station assigned a specific time slot stations 'reserve' a slot, then send via TDMA +good when more stations than available slots +arbitrary protocol can be used for reservations central control (polling) +primary polls stations for data in sequence distributed control +eg, token passing, station with token can transmit, IEEE 802.4: Token Bus

7 University of Calgary CS 441 Token Ring - Collision Free receiverxmitter Ring Interface receive buffer xmit buffer Station

8 University of Calgary CS 441 MAC Protocol Assumptions Stations +each 'station' asynchronously transmits frames +station blocked until transmission succeeds Single Channel +all stations send and receive on one channel Carrier Sensing +can detect if another station is transmitting Collision +stations may be able to detect collisions Time +continuous or slotted

9 University of Calgary CS Persistent CSMA stations detect if channel is in use +don't transmit if channel busy +expect fewer collisions than Aloha transmit immediately when +channel is idle +after channel is busy if a collision occurs, wait a random time +good at light loads as alway send immediately +poor at heavy loads due to many collisions

10 University of Calgary CS 441 Non-Persistent CSMA when ready and channel idle, transmit immediately, if busy wait a random time wait a random time after a collision better at moderate to high loads as collisions are less likely to occur poorer at low loads as may defer unnecessarily

11 University of Calgary CS 441 p - Persistent CSMA defer transmission to next slot with probability p +if channel is busy or collision has occurred, repeats above step with small p, excellent at heavy loads but wasted slots at light loads as p increases approaches performance of 1- persistent protocol

12 University of Calgary CS 441 Given n Stations Choose a Value for p at end of transmission, expect number of stations to attempt transmission is n*p if n*p > 1, will always be a collision (on average) +but probability of stations sending after collision is also n*p! +collisions continue, throughput drops to 0 therefore must choose n*p < 1 for expected peak loads of n. as p gets smaller +stations wait longer for transmission, but collisions reduced

13 University of Calgary CS 441 CSMA / CD (Collision Detection) sender listens to channel while sending +if collision detected, xmit noise burst and abort transmission +saves time and bandwidth most commonly used protocol on LANs +originally developed by Xerox (ETHERNET), standardized by IEEE (CSMA/CD protocols)

14 University of Calgary CS 441 CSMA / CD General algorithm +Do forever: -if channel idle, start transmitting frame -if collision detected during transmission stop frame transmission transmit brief jamming signal (makes sure all stations know about collision) wait random time

15 University of Calgary CS 441 Contention Period period of time when a station starts transmitting before other stations know that the line is busy +other stations, thinking the line is idle, may contend (start transmitting) for the line +due to propagation delay A B 

16 University of Calgary CS 441 Length of Contention Period = 2  worst case: longest delay before a collision is detected, let A, B be furthest apart stations  = propagation delay between them A transmits at t, B transmits at t +  - (just before it detects the frame is busy) B detects collison, stops at t +  it takes an additional  seconds before A sees the collision and stops as well propagation delay depends upon cable length and throughput speed (1km ethernet ~ 5  s)

17 University of Calgary CS 441 CSMA/ CD and Collisions most CSMA/ CD protocols use a 1-persisent protocol to handle collisions +examples -Ethernet -MitreNet -IEEE standard +although more collisons may occur, time to recover from them is shorter -as long as frames are long relative to propagation delay

18 University of Calgary CS 441 Backoff Algorithms retransmission delay after collision uses "binary exponential backoff" +adapts to load, reduces further chance of collision eg 1-persistent CSMA/CD +case Collision: /* sensed immediately */ -send jamming signal -wait_random exponential time -break;

19 University of Calgary CS 441 Ethernet (CSMA/ CD) developed by Xerox early 70's +commercialized mid/late 70's +de facto standard taken up and generalized as dejure standard IEEE physical medium +baseband coax (thick and thin) +twisted pair (recent introduction) length restrictions - thicknet: -500m max distance between repeaters -up to 4 repeaters max length -restriction due to maximum limit of round-trip propagation delay of 51.2  s

20 University of Calgary CS 441 Length Restrictions cont’d thinnet +1/3 the distance is allowed between repeaters +~800 meters maximum length of network twisted pair +200 feet max allowed from station to tranceiver/hub converter +most phone lines < 200 feet from connector box

21 University of Calgary CS 441 Ethernet Physical Characteristics Continued Tranceivers - electronics: +transmit/receive signals on channel +recognize presence of signals when other stations transmit +recognize "collisions" +up to 100 tranceivers on 2.5km network +stations can be installed on the fly without bringing the network down Terminators +necessary to eliminate signal reflection at ends of the wire

22 University of Calgary CS 441 CSMA / CD Frame Structure (IEEE 802.3) Pre = preamble, 7 bytes = 56 bits sd = start delimiter dest, src = dest & src addresses, = 2 or 6 bytes lngth = length of data in bytes pad set so that data + pad is > some minimum, eg, 64 bytes, or 512 bits fcs = frame (error) check sequence, CRC-32 pre sd dest src lngth data pad fcs 7 1 2/ 6 2/ 6 2 var var 4

23 University of Calgary CS 441 Address Fields IEEE addresses - 16 bit version +1st bit specifies individual or group address addresses - 48 bit version +1st bit specifies individual or group address 2nd bit specifies if assigned locally (16,000 addresses for each person on earth?) source address +unique address of transmitter +every ethernet board has a world-wide unique address 10BASE clock rate is 10 Mb/s =.1  s per bit

24 University of Calgary CS 441 Ethernet: Control Procedures defer - do not transmit if: +carrier present (manchester transitions) +within minimum spacing at end of frame transmit - if not deferring +transmit until completed or collision detected abort - if collision detected: +stop transmission +jam (4-6 bytes) to insure all stations detect retransmit - if collision detected: +wait random time - backoff algorithm -eg double delay with repeated collisions

25 University of Calgary CS 441 Packet Size Issues - minimum packet size? case 1: contention period << frame length +good throughput (as cost of collision is minimal) case 2: contention period ~= frame length +equivalent to CSMA case 3: contention period > frame length +sender may be able to transmit entire packet +but another sender, before seeing it, may transmit a frame and get a collision -sender will not detect the collision! -higher level protocol then necessary to detect collision

26 University of Calgary CS 441 Packet Size Issues receiver: +if frames are small, may not be able to detect collisions +if frame size > collision fragment size, this is easy +while error correction schemes will do this cannot distinguish between line state errors and errors due to collisions

27 University of Calgary CS 441 Effective Throughput of Ethernet e.g., using an editor over Ethernet, where every character must be remotely echoed +1 character per frame, assume light traffic -min frame length = = 720 bits -packet spacing = 96 bits? -total = 816 bits for every 7 bit ascii character sent effective throughput < 1 % = ~ 100 kb/ s +will be worse with heavy traffic & collisions! +will be better as data size increases

28 University of Calgary CS 441 Ethernet Disadvantages much analog circuitry for collision detection minimum frame size of 64 bytes no priorities assigned +cannot guarantee that a packet will be successfuly transmitted, real time people (eg manufacturing) do not like this limited cable length +round trip delay determines slot time has poor performance at high loads does not scale well to high data rates +shorter frames within 2  contention interval implies less efficiency

29 University of Calgary CS 441 Ethernet Advantages widely used, good defacto commercial standard simple algorithm, inexpensive implementation can install new stations on the fly stations can disconnect or fail without disruption inexpensive standard interface on most computers selectable scalability becoming available

30 University of Calgary CS 441 Gigabit Ethernet fibre with 1 Gb/s transmission rates +near current limit of electroics/optical interface light on/ off for 1/ 0, respectively +200 million meters / second +1 nanosecond per bit +0.2 meters per bit for 200 meter station distance & 1,000 bit frame +200 meter frame = 1 microsecond, a = 1 +best utilization = T f / (T f +  ) = 1/ (1+a) = 50% +shorter frame or longer distance is worse now have Mb/s = nanosec/bit +does support standard selectable scalability