1 LAN & MAC (Medium Access Control) protocols Two basic types of networks: –Switched networks: transmission lines, multiplexers, and switches; routing,

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
Communication Networks Lecture 5 NETW 501-L5: NETW 501-L5: Medium Access Control Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204,
LANs Local Area Networks via the Media Access Control (MAC) Sub Layer LANs Local Area Networks via the Media Access Control (MAC) Sub Layer Advanced Advanced.
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 ELEN602 Lecture 10 Review of last lecture –M/G/1 and M/D/1 Results Multi-access Networks Medium Access Control –ALOHA –Slotted ALOHA.
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.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
1 Computer Networks Local Area Networks. 2 A LAN is a network: –provides Connectivity of computers, mainframes, storage devices, etc. –spans limited geographical.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
CSC 450/550 Part 3: The Medium Access Control Sublayer.
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)
1 Link Layer Message M A B Problem: Given a message M at a node A consisting of several packets, how do you send the packets to a “neighbor” node B –Neighbor:
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
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.
Medium Access Control Sublayer
Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note 8.
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.
Multiple Access Protocols Chapter 6 of Hiroshi Harada Book
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking LANs 2: MAC protocols.
جلسه دهم شبکه های کامپیوتری به نــــــــــــام خدا.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 16.
Medium Access Control NWEN302 Computer Network Design.
LAN technologies and network topology LANs and shared media Locality of reference Star, bus and ring topologies Medium access control protocols.
Layer 2 Technologies At layer 2 we create and transmit frames over communications channels Format of frames and layer 2 transmission protocols are dependent.
The Medium Access Control Sublayer Chapter 4. The Channel Allocation Problem Static Channel Allocation Dynamic Channel Allocation  Delay for the divided.
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
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.
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.
Medium Access Control Sub Layer
Multiple Access.
Chapter 6 Multiple Radio Access
CS3502: Data and Computer Networks Local Area Networks - 1 introduction and early broadcast protocols.
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.
LANs Local Area Networks via the Media Access Control (MAC) Sub Layer LANs Local Area Networks via the Media Access Control (MAC) Sub Layer Advanced Computer.
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.
Ethernet Overview it the IEEE standard for Ethernet.
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.
Advanced Computer Networks C13
Chapter 4 The Medum Access Sublayer. MA Sublayer Additional Reference –Local and Metropolitan Area Networks, William Stallings, Prentice Hall, 2000, 6th.
Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note 10.
THE MEDIUM ACCESS CONTROL SUBLAYER 4.1 THE CHANNEL ALLOCATION PROBLEM 4.2 MULTIPLE ACCESS PROTOCOLS.
COMPUTER NETWORKS Data-link Layer (The Medium Access Control Sublayer) MAC Sublayer.
Multiple Access By, B. R. Chandavarkar, CSE Dept., NITK, Surathkal Ref: B. A. Forouzan, 5 th Edition.
Example DLL Protocols 1. High-Level Data Link Control (HDLC).
Data Link Layer Lower Layers Local Area Network Standards
MEDIUM ACCESS CONTROL PROTOCOL
High Speed LANs – Ethernet and Token Ring
Services of DLL Framing Link access Reliable delivery
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif
Medium Access Control Data link layer=logical link control + MAC
The Medium Access Control Sublayer
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.
Chapter 6 Multiple Radio Access.
Presentation transcript:

1 LAN & MAC (Medium Access Control) protocols Two basic types of networks: –Switched networks: transmission lines, multiplexers, and switches; routing, hierarchical address for scalability. –Broadcast networks: a single shared medium, simpler, no routing, messages received by all stations, flat address; however, when users try to transmit messages into the medium, potential conflict, so MAC is needed to orchestrate the transmission from various users. –LAN is a typical broadcast network.

2 Peer-to-peer protocols VS. MAC Both are to transfer user information despite transmission impairments For peer-to-peer: –Main concern: loss, delay, resequencing –Using control frames to coordinate their actions –Delay-bandwidth is important –Involved only two peer processes MAC: –Main concern: interference from users –Using some mechanisms to coordinate the access of channel –Delay-bandwidth is important –Need the coordination from all MAC entities, any one does not cooperate, the communication will not take place.

3 What are going to be discussed Introduction to broadcast networks Overview of LANs: frame format & placement in OSI. Random access: ALOHA & CSMA-CD (Carrier Sensing Multiple Access with Collision Detection ) i.e., Ethernet. Scheduling: token-ring. LAN standards (brief view) LAN bridges: used to connect several LANs.

M Shared Multiple Access Medium 1.Any transmission from any station can be heard by any other stations 2.If two or more stations transmit at the same time, collision occurs  Figure 6.1 Multiple access communications

5 Satellite Channel = f in = f out Figure 6.3 Satellite communication involves sharing of uplink and downlink frequency bands

6 AC= authentication center BSS= base station subsystem EIR= equipment identity register HLR= home location register wireline terminal MSC PSTN BSS STP SS#7 HLR VLR EIR AC MSC= mobile switching center PSTN= public switched telephone network STP= signal transfer point VLR= visitor location register Figure 4.52 Cellular networks: radio shared by mobile users and require MAC

7 Multidrop telephone lines Inbound line Outbound line Figure 6.4 Multi-drop telephone line requires access control Host Terminals

8 Ring networks Multitapped Bus Figure 6.5 Ring networks and multi-tapped buses require MAC

9 Figure 6.6 Wireless LAN: share wireless medium and require MAC

10 Medium Sharing Techniques Static Channelization Dynamic Medium Access Control Scheduling Random Access Figure 6.2 Approaches to sharing transmission medium Partitioned channels are dedicated to individual users, so no collision at all. Good for steady traffic and achieve efficient usage of channels Minimize the incidence of collision to achieve reasonable usage of medium. Good for bursty traffic. Schedule a orderly access of medium. Good for heavier traffic. Try and error. if no collision, that is good, otherwise wait a random time, try again. Good for light traffic.

11 MAC and performance Shared medium is the only means for stations to communicate Some kind of MAC technique is needed Like ARQs, which use ACK frame to coordinate the transmission and consume certain bandwidth, the MAC will need to transfer some coordination information which will consume certain bandwidth of shared medium. Delay-bandwidth product plays a key role in the performance of MAC (as in ARQs).

12 A transmits at t = 0 Distance d meters t prop = d / seconds AB B transmits before t = t prop and detects collision shortly thereafter AB A B A detects collision at t = 2 t prop Figure 6.7 Delay-bandwidth product and performance 1. : the speed of light, 3*10 8 meters/second 2. Before A begins to transmit, A listens to medium, if busy, wait; otherwise, do it (suppose t=0) 3. If B wants to transmit after t=t prop A’s transmission has reached B, so B waits and A captures medium successfully and transmits its entire message. (suppose two station A and B want to transmit information) 4. If B wants to transmit before t=t prop, it listens and no transmission is going on, so B begins to transmit, then collision occurs. B detects collision shortly, but A detects collision at t=2t prop 5. Therefore, 2t prop is required to coordinate the access for each packet transmitted.

13 MAC efficiency And suppose average length of packets is L. Then efficiency in use of the medium is: Efficiency = L + 2t prop R L = t prop R L = 1 1+2a a=t prop R / L i.e., the ratio of (one-way) delay-bandwidth product to the average packet length. Suppose a = 0.01, then efficiency = 1/1.02 = 0.98 a = 0.1, then efficiency = 1 / 2 = 0.50 Suppose bit rate of medium is R, then number of bits “wasted” in access coordination is 2t prop R.

14 Examples of efficiency Ethernet (CSMA-CD): –Efficiency = 1/(1+6.44a) where a = t prop R/L. Token-ring networks: –Efficiency = 1/(1+a’ ) where a’ = ring-latency in bits/L where ring-latency contains: The sum of bit delays introduced at each ring adapter. Delay-bandwidth product where delay is the time required for a bit to circulate around the ring.

15 (a) RAM ROM Ethernet Processor (b) Figure 6.10 Typical LAN structure and network interface card 1.NIC is parallel with memory but serial with network 2. ROM stores the implementation of MAC 3. Unique physical address burn into ROM 4. A hardware in NIC recognizes physical, broadcast & multicast addresses. 5. NIC can be Set to “promiscuous” mode to catch all transmissions. A LAN connects servers, workstations, Printers, etc., together to achieve sharing

16 Data Link Layer CSMA-CD Token Ring Logical Link Control Physical Layer MAC LLC Wireless LAN Network Layer Physical Layer OSI IEEE 802 Various Physical Layers Other LANs Figure 6.11 IEEE 802 LAN standards One LLC and several MACs, each MAC has an associated set of physical layers. MAC provides connectionless transfer. Generally no error control because of relatively error free. MAC protocol is to direct when they should transmit frames into shared medium.

17 PHY MAC PHY MAC PHY MAC Unreliable Datagram Service Figure 6.12 The MAC sublayer provides unreliable datagram service Important: all three MAC entities must cooperate to provide datagram service, I.e., the interaction between MAC entities is not between pairs of peers, but rather all entities must monitor all frames.

18 PHY MAC PHY MAC PHY MAC Reliable Packet Service LLC A C A C Figure 6.13 LLC can provide reliable packet transfer service LLC provides three HDLC services: 1. Unacknowledged connectionless service, recall HDLC has unnumbered frames; 2. Reliable connection-oriented service in the form of HDLC ABM mode; 3. Acknowledged connectionless service, need to add two unnumbered frames to HDLC frame set.

19 Destination SAP Address Source SAP Address Information 1 byte1 Control 1 or 2 Destination SAP Address Source SAP Address I/G 7 bits1 C/R 7 bits 1 I/G = Individual or group addressC/R = Command or response frame Figure 6.14 LLC PDU structure and its support for several SAPs LLC provides additional addressing, i.e., SAP (Service Access Point). Like PPP, LLC can support several different network connections with different protocols at the same time. Typical SAPs: IP: 06, IPX: E0, OSI packets: FE etc. In practice, LLC SAP specifies in which buffer the NIC places the frame, thus allowing the appropriate network protocol to retrieve the data.

20 Figure 6.15 LLC PDU and MAC frame Header overhead: TCP, IP: >=20 LLC: 3 or 4 MAC: 26 LLC Header IP Data MAC Header FCS LLC PDU IP Packet MAC frame IP Header TCP segments Chaos Orderly Unreliable Reliable

21 Random Access Why random access? –Reaction time (i.e. 2 times of propagation delay) is very important for performance, e.g. in Stop-and-Wait, when reaction time is small (i.e. the ACK will arrive soon) the performance is very good, however, if reaction time is large, then performance is very bad. –Therefore, proceed the transmission without waiting for ACK and deal with collision/error after the fact, i.e. random access. Three types of random accesses: –ALOHA, slotted ALOHA, and CSMA-CD

22 ALOHA Basic idea: –let users transmit whenever they have data to be sent. –When collision occurs, wait a random time ( why? ) and retransmit again. Differences between regular errors &collision –Regular errors only affect a single station –Collision affects more than one –The retransmission may collide again –Even the first bit of a frame overlaps with the last bit of a frame almost finished, then two frames are totally destroyed.

23 t t0t0 t 0 -X t 0 +X t 0 +X+2t prop t 0 +X+2t prop  Vulnerable period Time-out Backoff period: B Retransmission if necessary First transmission Retransmission Figure 6.16 Suppose L: the average frame length, R: rate, X=L/R: frame time 1. Transmit a frame at t=t 0 (and finish transmission of the frame at t 0 +X ) 2. If ACK does not come after t 0 +X+2t prop or hear collision, wait for random time: B 3. Retransmit the frame at t 0 +X+2t prop +B Two modes: collide only from time to time and snowball effect collision ALOHA random access scheme Vulnerable period: t 0 -X to t 0 +X, (2X seconds) if any other frames are transmitted during the period, the collision will occur. Therefore the probability of a successful transmission is the probability that there is no additional transmissions in the vulnerable period. When collision occurs?

24 The performance of ALOHA Let S be the arrival rate of new frames in units of frames/X seconds, S is also the throughput of the system. Let G be the total arrival rate in units of frames/X seconds, G contains the new and retransmissions and is the total load. Assume that aggregate arrival process resulting from new and retransmitted frames has a Poisson distribution with an average number of arrivals of 2G frames/2X seconds, i.e., P[k transmissions in 2X seconds] = (2G) k k! e-2Ge-2G, k=0,1,2,… S=G*P[no collision] =G*P[0 transmission in 2X seconds] =G* (2G) 0 0! e -2G =G e -2G Therefore, the throughput of the system is:

25 Figure 6.17 Throughput S versus load G for ALOHA What results can be obtained from the graph? 1.peak value at G=0.5 with S= for any given S, there are two values of G, corresponding to the two modes: occasional collision mode with S  G and frequent collision mode with G >> S Ge -2G

26 Slotted ALOHA Synchronize the transmissions of stations –All stations keep track of transmission time slots and are allowed to initiate transmissions only at the beginning of a time slot. S=GP[no collision] =GP[0 transmission in X seconds] =G=G (G)0(G)0 0! e -G =G e -G Therefore, the throughput of the system is: Suppose a packet occupies one time slot –Vulnerable period is from t 0 -X to t 0, i.e., X seconds long.

27 t (k+1)X kX t 0 +X+2t prop t 0 +X+2t prop  Time-out Backoff period: B Retransmission if necessary First transmission Retransmission Figure 6.16 Slotted ALOHA random access scheme Vulnerable period: t 0 -X to t 0, i.e., X seconds long t 0 =(k+1)X =nX

28 Ge -G Ge -2G G S Figure 6.17 Throughput S versus load G for ALOHA and slotted ALOHA Peak value at G=1 with S=0.368 for slotted ALOHA, double compared with ALOHA. In LAN, propagation delay may be negligible and uncoordinated access of shared medium is possible but at the expense of significant wastage due to collisions and at very low throughput. Throughput of ALOHAs is not sensitive to the reaction time because stations act independently.

29 CSMA (Carrier sensing multiple access) Problem with ALOHAs: low throughput because the collision wastes transmission bandwidth. Solution: avoid transmission that are certain to cause collision, that is CSMA. Any station listens to the medium, if there is some transmission going on the medium, it will postpone its transmission.

30 A Station A begins transmission at t=0 A Station A captures channel at t=t prop Figure 6.19 CSMA random access scheme Suppose t prop is propagation delay from one extreme end to the other extreme end of the medium. When transmission is going on, a station can listen to the medium and detect it. After t prop, A’s transmission will arrive the other end; every station will hear it and refrain from the transmission, so A captures the medium and can finish its transmission. Vulnerable period = t prop But in ALOHAs, it is X or 2X In LAN,generally, t prop < X sense

31 Three different CSMA schemes Based on how to do when medium is busy: –1-persistent CSMA –Non-persistent CSMA –p-persistent CSMA

32 sense channel when want to transmit a packet, if channel is busy, then sense continuously, until the channel is idle, at this time, transmit the frame immediately. 1-persistent CSMA If more than one station are sensing, then they will begin transmission the same time when channel becomes idle, so collision. At this time, each station executes a backoff algorithm to wait for a random time, and then re-senses the channel again. Problem with 1-persistent CSMA is “high collision rate”.

33 sense channel when want to transmit a packet, if channel is idle, then transmit the packet immediately. If busy, run backoff algorithm immediately to wait a random time and then re-sense the channel again. Non-persistent CSMA Problem with non-persistent CSMA is that when the channel becomes idle from busy, there may be no one of waiting stations beginning the transmission, thus waste channel bandwidth,

34 sense channel when want to transmit a packet, if channel is busy, then persist sensing the channel until the channel becomes idle. If the channel is idle, transmit the packet with probability of p, and wait, with probability of 1-p, additional propagation delay t prop and then re-sense again p-persistent CSMA

35 1-Persistent CSMA S G Figure Part 2 Throughput versus load G for 1-persistent (three different a=t prop /X )

36 Non-Persistent CSMA S G Figure Part 1 Throughput versus load G for non-persistent (three different a=t prop /X ) 1-persistent is sharper than non-persistent. a=t prop /X has import impact on the throughput. When a approaches 1, both 1-persistent and non-persistent is worse than ALOHAs.

37 CSMA-CD When the transmitting station detects a collision, it stops its transmission immediately, Not transmit the entire frame which is already in collision. The time for transmitting station to detect a collision is 2t prop. In detail: when a station wants to transmit a packet, it senses channel, if it is busy, use one of above three algorithms (i.e., 1- persistent, non-persistent, and p-persistent schemes). The transmitter senses the channel during transmission. If a collision occurred and was sensed, transmitter stops its left transmission of the current frame; moreover, a short jamming signal is transmitted to ensure other stations that a collision has occurred and backoff algorithm is used to schedule a future re-sensing time. The implication: frame time X >= 2t prop,, since X=L/R, which means that there is a minimum limitation for frame length.

38 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 -  It takes 2 t prop to find out if channel has been captured Figure 6.22 The reaction time in CSMA-CD is 2t prop

39 Aloha Slotted Aloha 1-P CSMA Non-P CSMA CSMA/CD a  max Figure 6.24 Maximum achievable throughput of random access schemes 1.When a is small, i.e, t prop << X, the CSMA-CD is best and all CSMAs are better than ALOHAs. 2.When a is approaching 1, CSMAs become worse than ALOHA. 3.ALOHAs are not sensitive to a because they do not depend on reaction time. = t prop /X

40 Summary of random access schemes (Continuous) ALOHA: try to send a frame anytime, if collision, wait random time, resend. Vulnerable period: 2X, maximum throughput: Slotted ALOHA: send a frame at the beginning of a time slot. If collision, wait a random time to a new time slot, and resend again.Vulnerable period: X, maximum throughput: persistent CSMA: listen before transmission, if busy, continuously listen until channel become idle, then transmit immediately. If collision, wait a random time, re-listen. Vulnerable period: t prop, throughput: 0.53 for a=t prop /X=0.01 Non-persistent CSMA: listen before transmission, if busy, wait a random time, re-listen. if idle, transmit. If collision, wait a random time, re-listen. Vulnerable period: t prop, throughput: 0.81 for a=t prop /X=0.01 p-persistent CSMA: persist listening to the channel until idle. At this time, with probability p, transmit the packet, and with probability of 1-p, do not transmit but wait additional t prop and then re-listen. If collision, wait random time, re-listen. Vulnerable period: t prop throughput dependent on p. CSMA-CD: using any one of above three. Listen during transmission. If collision, stop its transmission immediately. Vulnerable period: t prop. throughput: >0.90 for a=t prop /X=0.01 Important: a=t prop /X affects performance. Requirement: frame length can not below certain value for given t prop, (the distance of LAN).