1 / 35

Chapter 4: The Medium Access Sublayer

Chapter 4: The Medium Access Sublayer. CS 455/555: Spring 2004. Topics to be covered. Introduction Channel Allocation problem Multiple Access Protocols IEEE Standard 802 for LANs Bridges High-speed LANs Satellite Networks. Introduction.

Download Presentation

Chapter 4: The Medium Access Sublayer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4: The Medium Access Sublayer CS 455/555: Spring 2004

  2. Topics to be covered • Introduction • Channel Allocation problem • Multiple Access Protocols • IEEE Standard 802 for LANs • Bridges • High-speed LANs • Satellite Networks

  3. Introduction • Medium Access Control (MAC) sublayer is part of Data Link layer. • In fact, it is the bottom part of DLL (interfacing with the physical layer) • This chapter deals with broadcast networks

  4. Channel Allocation problem • Static Channel Allocation in LANs and MANs Mean delay T = 1/(C-) (Single channel) Mean delay T = N/(C-) (N channels) • Dynamic Channel Allocation in LANs and MANs * Station Model * Single Channel assumption * Collision assumption * Continuous Time vs. Slotted time * Carrier sense vs. No carrier sense

  5. Multiple Access Protocols • ALOHA: Shared satellite channel • Pure ALOHA: Let users transmit whenever they have data to be sent • Issues: Contention, collision detection, retransmission • Vulnerable period for a frame • If G is the mean number of transmission attempts (old and new) per frame time (offered load), S is the throughput per frame time, then S = Ge-2G for pure ALOHA. • Maximum throughput occurs at G = 0.5 with S=1/(2e)=0.1839. I.e., maximum channel utilization is 18 percent.

  6. Multiple Access Protocols (Cont.) • Slotted ALOHA: Divide the time into discrete intervals, each interval corresponding to one frame. • Obviously, there may be a special signal needed to synchronize the clocks at all stations. • S=Ge-G • Maximum throughput occurs at G=1, S=1/e or 0.368. This is twice that of pure ALOHA protocol. • The expected number of transmissions per user frame is eG. So when G=1, each user frame needs e or 2.72 attempts.

  7. Multiple Access Protocols (Cont.) • Carrier Sense Multiple Access protocols (CSMA): Station listens for a carrier and acts accordingly • Persistent and Non-persistent CSMA: 1-persistent CSMA, p-persistent CSMA, non-persistent CSMA • 1-persistent: Keep sensing carrier until it is found idle; transmit immediately; if collision, wait a random amount of time and try again. The non-zero propagation and multiple stations sensing idle carrier are the main reasons for collisions. • Non-persistent: If a station senses carrier busy, it will wait for a random amount of time and senses again. This step is repeated until it finds it free when it transmits its frame. • P-persistent: Applies to slotted channels: Whenever a station finds a slot free, it only transmits with probability p. This step is repeated for every empty slot.

  8. Multiple Access Protocols (Cont.) • CSMA with Collision Detection (CSMA/CD) • Here, stations stop their transmissions as soon as they detect a collision. • How long will it take for a station to detect a collision after it starts transmitting? This depends on the maximum propagation delay between itself and any other station. • If  is the maximum distance between stations, then if one station started just before the other one (at  distance) ended. While the 2nd station may detect a collision very soon, the 1st station would only detect it when the 22nd stations attempt reaches it. Thus the 1st one can’t detect a collision until after (2  -) of its starting of transmission. • No MAC layer protocol guarantees reliable delivery.

  9. Multiple Access Protocols (Cont.) • Collision-free protocols: Assumes a fixed number of stations (N) each with a unique address 0..N-1 wired into hardware. Uses contention slots where stations can broadcast their intent to transmit. • A Bit-map protocol: Contention (or reservations) slots (bits 0..N-1) followed by actual transmission of data frames (d bits each). • At low load, channel efficiency = d/(d+N), since d data bits are transmitted for every N bits of contention slots. • At high load, channel efficiency = N.d/(Nd+N)=d/(d+1)

  10. Multiple Access Protocols (Cont.) • Binary countdown: This scheme attempts to eliminate the contention slot overhead • Each station has a unique binary address. Stations who wish to contend for a slot transmit their address bit by bit prior to actual data frame transmission. If a station with a 0-bit contends with a 1-bit, then the station that’ sent “0” stops contention. This continues until the last address bit is transmitted. The station that successfully stayed until the end, uses the next data frame to send its data frame. • In this case, if there are n-bits in the address, then it would take n-bit slots prior to each data frame.

  11. Multiple Access Protocols (Cont.) • Evaluation metrics for MAC protocols: • Delay at load and (ii) Channel efficiency at high-loads CSMA vs. Collision protocols: CSMA offers low-delay at low-loads and low channel efficiency at high-laods. Contention-free protocols offer high-delay at low-load and high efficiency at high-loads. • Is there a way to benefit at both low and high loads?

  12. Multiple Access Protocols (Cont.) • Limited contention protocols: Limit the number of stations contending for a slot---thus we will have groups of stations eligible to contend for each slot (e.g., 1 in the case of binary countdown, and N in the case of ALOHA, or some 1x N in the case of limited contention) • Adaptive Tree Walk Protocol: Assume the stations to be organized in a tree (say using the bits in their addresses). During slot 0, all stations with root as an ancestor contend; if there is no collision; then the successful station will send the data frame. Otherwise, those under node 2 will only contend. If there is none, then the one under node 3 will contend; this will continue until a successful transmission. • Several variations of the basic protocol exist.

  13. IEEE Standard 802 For LANs and MANs • IEEE 802.3 Standard: CSMA/CD LAN: Ethernet • IEEE 802.4 Standard: Token Bus • IEEE 802.5 Standard: Token Ring

  14. IEEE Standard 802.3 • 1-persistent CSMA/CD: A station keep listening to the cable until it is idle; it then starts transmitting its data frame; the moment it detects a collision, it terminates its transmission; after a collision, a station waits for a random time and starts repeating the above steps. • Ethernet is only one product that follows the 802.3 standard. There could be several variations of this one.

  15. IEEE Standard 802.3 (Cont.) • Notation for the cable: 10Base5 means 10Mbps bandwidth and a maximum length of 500 meters per segment. • Segments may be connected via repeaters. • Restriction: A system may contain multiple cable segments and multiple repeaters, but no two transceivers may be more than 2.5 km apart and no path between any two transceivers may traverse more than four repeaters.

  16. IEEE Standard 802.3 • Encoding binary signals on the cable: Somehow each receiver should not what a bit period is and what its value is. • Manchester encoding: Each bit period is sent as two levels: high (1st half) and low (2nd half) for bit “1”; and reverse for bit “0”. So there is a transition for every bit received. Easy for receiver to synchronize with sender. • 001011: Will be sent as LHLHHLLHHLHL where H is high- and L is low-signal.

  17. IEEE Standard 802.3 • Differential Manchester Encoding: Bit 1 has no transition at the beginning and bit 0 has a transition at the beginning. • 001011 will be sent as (assume that prior to sending the 1st 0 bit, the level was H): LHLHHLHLLHHL • Differential offers better noise immunity. • All 802.3 baseband systems use Manchester encoding

  18. IEEE Standard 802.3 • 802.3 MAC Sublayer protocol: Format: source and destination addresses, length of data, data, checksum, and a 7-byte preamble. • 6-byte address: 48-bits: High-order bit (47th bit) of the destination address used for broadcast/multicast purposes; the 46th bit is used to distinguish local for global addresses. Thus 46-bits are used to uniquely identify a station in the entire world. • Valid frames must be at least 64 bytes long (excluding preamble and start of frame delimiter) • Why the minimum length limitation? Goes back to the 2 argument we had with respect to CSMA/CD.

  19. IEEE Standard 802.3 • Importance of minimum of 2  frame length: Suppose a station A at one end of the cable begins a transmission at time t=0; A station B at a distance of  from A can listen to the 1st bit only at time t= . If it started transmitting at time t= -, just before sensing bit-1 of A, then this event would take another  time to reach A. That is only at t=2 -  A can sense that there was a collision. If we want A to detect a collision before it completes transmitting its frame, the transmission time should be at least 2 . Thus minimum frame length = 2*Maximum propagation time*speed of transmission.

  20. IEEE Standard 802.3 (Cont.) • With a maximum length of 2.5 km, maximum of 4 repeaters and 10 Mbps speed, the minimum transmission time is 51.2sec. If a frame has fewer than 64 bytes, it is padded. • For a 2500-meter 1-Gbps LAN, minimum frame length will be 6400 bytes. • For a 250meter 1-Gbps LAN, minimum is 640 bytes. • Problem: Given the length of the cable, speed of propagation, and the speed of transmission, you should be able to determine the minimum length of a frame.

  21. IEEE Standard 802.3 (Cont.) • Binary exponential back-off algorithm: Once a collision is detected what should a station do? • After the 1st collision, pick 0 or 1 randomly and wait for that many slots before attempting again. • After the 2nd collision, pick randomly from 0-3, and wait for that many slots before attempting again. • After I collisions, a random number between 0 and 2i-1 is chosen and that number of slots is skipped. • This freezes when maximum slots is 1023.

  22. IEEE Standard 802.3 (Cont.) • Performance of 802.3 protocol • Channel efficiency = P/(P+2/A) where P is the mean time to transmit a frame,  is the maximum propagation time, and A is the probability that some stations occupy the channel in a slot. When the number of stations is large, you can assume that A=1/e. • Also, channel efficiency=1/(1+2BLe/cF) • Where B is the bandwidth (bps), F is the frame length (in bits), c is the speed of propagation (in km/sec), L is the length of the cable (in km), and e=2.718.

  23. IEEE Standard 802.4: Token Bus • Why 802.4? 802.3 does not support priorities, it is not deterministic (I.e., unknown bounds) • Assembly lines are linear, not a ring structured ones---so use a bus instead of a ring • It has the robustness of a cable and the worst-case behavior of a ring • Physically it is a linear or tree-structured, but logically it is a ring. • Each station has a unique address. • Each station knows the address of its left and right neighbors in the logical ring. • A special frame called “token” is passed around. • Only the token holder is permitted to transmit frames. No collisions possible under this scheme. • The cable is a broadcast medium. So logical neighbors are not necessarily physical neighbors. • Each frame will carry the address of the source and the destination so only the destination can process the message. • Each station has several priority queues (0,2,4,6). The highest priority messages are first sent before attempting others.Each queue will have a timer to limit the time of transmission.

  24. IEEE Standard 802.4: Token Bus • Logical Ring Maintenance: (I) Adding new stations to the ring---SOLICT_SUCCESSOR (sender,successor) • The token holder broadcasts the above frame. A new station with address in the specified range will respond. In case there is more than one, then the typical exponential backoff alg is used. • Each station has a timer that is reset when it is received.If a token arrives earlier than expected then such bids could be asked. • In each bid at most one station can enter the ring. • When a station intends to leave it sends a frame to its predecessor informing of “Set_SUCCESSOR” giving it its own successor address. • Token loss and recovery: Read the book (No time in class to cover)

  25. IEEE Standard 802.5: Token Ring • Not a broadcast medium; a physical ring topology; it is fait; it has a known worst time. • The length of a bit on the cable: If the speed of propagation is 200 meters/sec and if the speed of transmission is 1 Mbps or 1 bit/ sec then, each bit occupies 200 meters on the ring. So how many bits can a 1 km hold? Just 5 bits. • The ring consists of ring interfaces to which stations are connected. • Each bit arriving at an interface is copied into a 1-bit buffer and then copied out into the ring again. • While in the buffer the bit may be inspected and possibly modified before being written out. The copying and inspection introduces a 1-bit delay.

  26. IEEE Standard 802.5: Token Ring • A token (a special bit pattern) circulates around the ring when all stations are idle. • When a station has a frame to send it grabs the token, and transmits its frame and releases the token again. • How does a station grab a token and remove it from the ring? It inverts the last bit of the 3-byte token before writing it out. • The ring should be long enough to contain the 3-byte token. • What is the length of a ring? Propagation delay + the 1-bit delay introduced by each ring interface. If a ring has 100 interfaces, and it is 1km ring with propagation speed of 200 m/sec, and a transmission speed of 1Mbps, then the ring length (in bits) = 100+5=105 bits or 105 sec.

  27. IEEE Standard 802.5: Token Ring • What if we have 200 stations on a 10km ring with 100 m/sec propagation speed and 10 Mbps transmission speed? Propagation delay = 100 sec or 1000 bits. So cable length = 1000+200=1200 bits or 120 sec • Listen mode: In the listen mode, input bits are simply copied to output with a 1-bit delay. • Transmit mode: The connection from the input is broken, and the interface enters its own output. When the sender (source) receives its back, they are removed from the ring. • The transmitter may be transmitting while it is also draining the input bits. • After transmission, a station regenerates the token. • The destination station simply flips the ACK bit in the frame to indicate ACK.

  28. IEEE Standard 802.5: Token Ring • Priorities: A token can contain a priority bit. A station with only a higher priority can grab it. • A station may indicates its need for a token by setting its priority reservation in a data frame that goes by. • Token-holding time • Ring maintenance: Lost tokens, etc (Read pp. 298-299)

  29. Comparison of 802.3, 802.4, 802.5 • 802.3 is most widely used; easy to install; substantial analog component; minimum packet length restriction; non-deterministic; no priorities; cable length is limited; cannot handle high loads; high-speeds will be a problem due to longer packet size • 802.4 uses highly reliable cable TV equipment; more deterministic than 802.3; can handle short frames; supports priorities; excellent performance at high loads; the broadband cable can support multiple channels; complex protocol; substantial delay at low load; not suited for fiber-optic implementations with digital signals • 802.5: Point-to-point; can be fully digital; any type of medium may be used as a link; supports priorities; short frames possible; excellent at high-loads; centralized monitoring for the token is a bottleneck.

  30. Bridges • Means to interconnect individual LANs • Operate at the data link layer • Reasons for bridges: pages 305-306specify six reasons: (1)autonomous divisions (2) different buildings (3) logical grouping (4) physical distance (5) Reliability (6) Security • Issues in bridging different LANs: (i) Different frame format (ii) different data rates (iii) Timers at higher layers (iv) different maximum frame lengths

  31. Bridges • 802.x802.3: Destination LAN heavily loaded • 802.4802.3: Priority vs no priority; ACK bit; • Similar problems for others (Pages 307-309)

  32. Transparent Bridges • A bridge must decide whether to discard a frame or forward it to another LAN • Maintains a hash table to know where different sources are located • Initially, hash table is empty---it has to flood everything to everyone else • It then learns as to which side the sources are---backward learning • Outdates hash tables may be purged periodically • Two or more bridges connecting two LANS: Possible loops; avoided by using a spanning tree of bridges; the spanning tree is built with bridges and LANs; some bridges may be left out in this process

  33. Source Routing Bridges • CSMA/CD and token bus accepted transparent bridges • The token ring community went for source routing bridges • Here, the source determines the path that a message should take • When a destination is unknown, the source issues a discovery frame which is forwarded to every LAN on the internetwork. When the reply comes back, the bridges record their identity in it, so the original sender can know the path. • Comparison bridges: See pages 316-317

  34. Remote Bridges • Used when individual LANs are far apart • In this case bridges on each Lan are connected via point-to-point links

  35. High-speed LANs • FDDI—Fiber distributed data interface---100 Mbps; up to 200 km; up to 1000 stations; can be used as a backbone to connect copper LANs • Fast Ethernet: 802.3u: reduce bit time from 100 nsec to 10 nsec

More Related