1 / 79

Learning Outcome

EEC4113 Data Communication & Multimedia System Chapter 6: Media Access Control of Data Link Sub-Layer by Muhazam Mustapha, October 2011. Learning Outcome. By the end of this chapter, students are expected to understand and able to explain the various protocols and technologies in MAC sub-layer.

annturner
Télécharger la présentation

Learning Outcome

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. EEC4113Data Communication &Multimedia SystemChapter 6: Media Access Controlof Data Link Sub-Layerby Muhazam Mustapha, October 2011

  2. Learning Outcome • By the end of this chapter, students are expected to understand and able to explain the various protocols and technologies in MAC sub-layer

  3. Chapter Content • MAC Sub-Layer Issues • ALOHA Protocols • CSMA Protocols • Collision-Free Protocols • Topology • IEEE 802.3 Ethernet • IEEE 802.11/15/16 Wireless Ethernet • IEEE 802.5 Token Ring

  4. Media Access ControlSub-Layer CO1

  5. Media Access Control • Media Access Control is a sub-layer of data link layer in OSI’s 7 layer model • Provides access to the shared networking medium in LAN or MAN • The currently most popular technology that provides MAC is the Ethernet technology • Others are FDDI (Fiber Distributed Data Interface), ARCNET and Token ring CO1

  6. Ethernet • A family of frame-based technology defining standards for wiring and signaling • Standardized in IEEE 802.3 document • Combination of twisted wire pair and optical fiber • Characterized by the used of 8P8C connector CO1

  7. Shared Network Medium • In shared environment, packets sent by one sender will be received by all nodes, but only the packet addressee will process it, the rest will discard packet sent out sender recipient CO1

  8. Multiple Access Protocol • Since the network medium is shared, there is a need to resolve competition between the nodes • Two general schemes: • Static • Frequency / Time Division Multiplexing(digital communication) • Dynamic • ALOHA, Carrier Sense Multiple Access(data communication) CO1

  9. Channel Allocation Problem • In shared medium, a user will first listen to the channel for its availability, then sends its frame • COLLISION occurs when more than one user start using the medium at the same time • At collision incidence, both user release the medium and wait for random time before re-sending CO1

  10. ALOHA Protocols CO1

  11. ALOHA Protocols • Created in 1970s in the University of Hawaii by Norman Abramson • First ingenious method to resolve channel allocation problem • It was best for wireless communication and the concept is still in used by modern protocol like Wi-fi CO1

  12. Pure ALOHA • Basic ideas: • Anyone is allowed to transmit their data whenever they have something to transmit, without checking the channel availability first • After sending, the sender will listen to its own frequency to tell whether its frame has been destroyed due to collision or not • This is possible due to feedback property of broadcasting channel, or • The sender will require an acknowledgement CO1

  13. Pure ALOHA • Basic ideas: • If there is no feedback, then there is collision • If collision occurs, the sender will wait for a random amount of time, then re-send – this called backoff CO1

  14. Pure ALOHA User A B C D E Time CO1

  15. Slotted ALOHA • Time is divided into slots, and users can only transmit at start of slot • Resulting advantage: Efficiency is doubled (see graph) • Disadvantages: • Requires synchronization clock • Still poor at high loads (see graph) CO1

  16. Pure vs Slotted ALOHA 0.40 Slotted ALOHA: S = Ge-G S (throughput per frame time) 0.30 0.20 Pure ALOHA: S = Ge-2G 0.10 0.5 1.0 1.5 2.0 2.5 3.0 G (attempts per packet time) CO1

  17. Carrier Sense Multiple Access Protocols CO1

  18. Carrier Sensing Protocols • Network communication can be improved greatly if the nodes can sense the existence of any transmission signal inside the transmission medium • Implemented in Carrier Sense Multiple Access (CSMA) and a few of its variations • Improvement is due to the fact that collisions is reduced since hosts will only send data if medium is not in use CO1

  19. CSMA • A host that needs to transmit data will first listen into communication medium and decide whether another host is using the medium or not • The host will only transmit its data if no one is using the medium • After finish sending the data frame, there will be an interframe gap of 9.6μs idle before any host can take the medium CO1

  20. Persistent and Non-persistent CSMA • CSMA is called persistent if: • when sensing that a medium is being used, the host waits and will definitely transmit once the current transmission ends • may cause collision if more than one host was waiting • And non-persistent if: • the host waits for a random duration and re-sends only if no one using it • results in less collision CO1

  21. CSMA/CD (Collision Detection) • The system will be having 3 states: transmission, contention and idle • Transmission state is the state where one host sends data. • After that host finishes, more than one of other hosts might be sending at the same time – a collision CO1

  22. CSMA/CD (Collision Detection) • On sensing a collision, all hosts involve would release the medium and they send a jamming signal to tell others that there is collision happened • so that everyone releases the medium • Then they will wait for a random duration and re-try • The above two steps is the contention state CO1

  23. CSMA/CD (Collision Detection) • Once one of the competing host gains control the system is in transmission state again • Idle state is just the state that no one is using the medium collisions transmission transmission transmission transmission contention idle contention CO1

  24. CSMA/CA (Collision Avoidance) • CSMA/CD is a persistence variation of CSMA – it handles collision when it happens • CSMA/CA is a non-persistence variation CSMA • CSMA/CA avoids collision by • not sending jamming signal • instead, just wait for a random duration then re-sends if no one is using CO1

  25. Collision-Free Protocol CO1

  26. Collision-Free Protocols • In collision free protocols, instead of sensing the medium, the hosts will tell if they want to transmit • There is a special frame called contention frame whose content is contributed by all hosts CO1

  27. Collision-Free Protocols • Contention frame is slotted and the hosts will take turns at a very precise timing to write information into the frame • A host sets a binary 1 at bit location reserved for it in contention frame if it wants to use the medium CO1

  28. Collision-Free Protocols • Once all hosts write the binary bits according to its intention, the actual transmission will be granted to the requesting hosts in sequence. • Once all transmissions finish, the hosts will then re-fill the contention frame • This protocol is called basic bit-map protocol CO1

  29. Collision-Free Protocols 8 contention slots 8 contention slots 8 contention slots 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 1 1 1 1 1 1 1 3 7 1 5 2 frames frames frames CO1

  30. Ethernet Topology CO1

  31. Topology Bus Linear Bus – 2 ends Distributed Bus – more than 2 ends CO1

  32. Topology Star Ring CO1

  33. Topology Mesh Tree CO1

  34. Bus Topology • Use of multipoint medium • All stations attach directly to transmission medium (bus) through appropriate hardware interfacing known as tap CO1

  35. Bus Topology • A transmission from any station propagates the length of the medium in both directions & can be received by all other stations • At each end of the bus is a terminator, which absorbs any signal, removing it from the bus CO1

  36. Tree Topology • Use of multipoint medium • Transmission medium is a branching cable with no closed loops • Tree layout begins at a point known as the headend CO1

  37. Tree Topology • One or more cables start at the headend, and each of these may have branches • The branches in turn may have additional branches to allow quite complex layouts • A transmission from any station propagates throughout the medium & can be received by all other stations CO1

  38. Ring Topology • Repeaters joined by point-to-point links in closed loop • Receive data on one link and retransmit on another • Links are unidirectional • Stations attached to repeaters CO1

  39. Ring Topology • Data in frames • Circulate past all stations • Destination recognizes address and copies frame • Frame circulates back to source where it is removed • Medium access control determines when station can insert frame CO1

  40. Star Topology • Each station connected directly to central node • Usually via two point-to-point links • Two alternatives operation of central node: • Broadcast : Physical star, logical bus • Frame-switching device : Only one station can transmit at a time CO1

  41. Star Topology • Broadcast • A transmission of a frame from one station to the central node is retransmitted on all of the outgoing links • Central node is referred as hub • Frame-switching device • Incoming frame is buffered in the node & retransmitted on an outgoing link to the destination station CO1

  42. IEEE 802.3 Standard ofEthernet CO1

  43. IEEE 802.3 Standard • Defines Ethernet as CSMA/CD protocol on bus or ring topology • Also defines the minimum frame length • Also defines the cabling hardware • Frame format: 7 1 6 6 0-1500 0-46 4 Bytes S O F Destination address Source address Preamble Length Data Pad Checksum CO1

  44. Frame Fields • Preamble: 7 bytes of alternating 1-s and 0-s for synchronization • Start of Frame (SOF): Sequence of 10101011 • Destination Address: 6 bytes of MAC address • Source Address: 6 bytes of address • Length: Total size of data and pad CO1

  45. Frame Fields • Data: Packet from upper layer • Pad: Series of 0-s to make up a minimum total size of 46 bytes of data and pad – so that the min frame size is 64 bits • Checksum: 32 bit CRC CO1

  46. MAC Address • Identifying each individual network card uniquely • 46 bits address in 48 bits string • Binary 0 in MSB indicates ordinary address • Binary 1 in MSB indicates the 46 bits address is a group address (for multicast) CO1

  47. MAC Address • If all address bit are 1-s then it is a broadcast (all nodes are getting the message) • If two MSB are 0-s then the 46 bits address is a combination of source and destination MAC address CO1

  48. MAC Address • Examples of possible MAC addresses include: • 00-0C-F1-56-98-AD • 00-11-F5-4B-20-56 • The first three bytes of this address identify the manufacture of this network device • 00-0C-F1 for Intel • Assigned by the IEEE and the database is available online at IEEE OUI and Company_id Assignments website CO1

  49. Need for Frame Minimum Size • In CSMA/CD, if there is a collision, the first node to detect it will send a jamming signal • We need to calculate the maximum delay after a node sends a message until the first jamming signal is heard by all nodes • Then from there we can calculate what is the minimum frame size so that NO nodes will finish transmitting before it hears the jamming signal CO1

  50. Need for Frame Minimum Size • The diagram below shows that there is a maximum of 2td delay before the first jamming signal is heard by every node(td = propagation delay) A B A B Frame sent at t = 0s At t ≈ td s, the frame almost reach the receiver collision A B A B At t ≈ td s, suddenly the receiver sends out frame Jamming signal finishes propagating at t = 2td s Jamming signal sent out CO1

More Related