1 / 49

Layer 2 : Concept

Layer 2 : Concept. Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology andres@dlit.edu.tw http://www.cse.dlit.edu.tw/~andres. Overview. Reliable transit of data

moeshe
Download Presentation

Layer 2 : Concept

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. Layer 2 : Concept Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology andres@dlit.edu.tw http://www.cse.dlit.edu.tw/~andres

  2. Overview • Reliable transit of data • Physical addressing, network topology, line discipline, error notification, ordered delivery of frames, and flow control

  3. 6.1 LAN Standards • Layer 2 • Comparing OSI Layers 1 and 2 with various LAN standards • Comparing the IEEE model with the OSI model • Logical Link Control (LLC) • MAC sublayers • LLC as one of four concepts of Layer 2

  4. Layer 2 • Addresses these limitations of layer 1 • Logical Link Control (LLC): • Communicate with the upper-level layers • Framing: • describe streams of bits • Media Access Control (MAC): • decide which computer will transmit binary data • MAC address: • name or identify computers

  5. Comparing OSI Layers 1/2 with various LAN standards • IEEE divides the OSI data link layer into two separate sublayers • Media Access Control (MAC) • transitions down to media • Logical Link Control (LLC) • transitions up to the network layer

  6. Comparing the IEEE model with the OSI model • LLC: Protocol Data Unit (PDU) • MAC : 802.3 and 802.5, cross over the Layer2/Layer1 interface • NIC as both a Layer 1 and a Layer 2 device • MAC address & Transceiver

  7. Logical LinkControl (LLC) • Allow part of the data link layer to function independently from existing technologies • Two addressing • Destination Service Access Point (DSAP) • Source Service Access Point (SSAP)

  8. LLC • Manages communications • Connectionless and connection-oriented services • Enable multiple higher-layer protocols to share a single physical data link • IEEE 802.2

  9. MAC Sublayers • Deals with the protocols that a host follows in order to access the physical media

  10. LLC as one ofFour Concepts of Layer 2 • Communicates with the upper-level layers through LLC • Uses a flat addressing convention • Use framing to organize or group the data • Use MAC to choose which computer will transmit binary data

  11. 6.2 Hexadecimal Numbers • Hexadecimal numbers as MAC addresses • Basic hexadecimal (hex) numbering • Converting decimal numbers to hexadecimal numbers • Converting hexadecimal numbers to decimal numbers • Methods for working with hexadecimal and binary numbers

  12. 6.3 MAC Address • Organization Unique Identifier (OUI): • Administered by the IEEE • Burned-in addresses (BIAs) • Be burned into read-only memory (ROM) and are copied into random-access memory (RAM) when the NIC initializes

  13. MAC Addressing • Data link layer MAC identifiers • MAC address and NICs • How the NIC uses MAC addresses • Layer 2 address encapsulation and decapsulation • Limitations of MAC addressing

  14. MAC address and NICs • Every computer has a unique way of identifying itself • No two physical addresses are alike • The physical address is located on the Network Interface Card (NIC) • Two formats for MAC addresses: 0000.0c12.3456 or 00-00-0c-12-34-56

  15. How the NIC uses MAC addresses • Ethernet and 802.3 LANs are broadcast networks • All stations see all frames • Each station must examine every frame to determine whether that station is a destination

  16. Limitations of MAC addressing • The number of possible addresses is not going to run out anytime soon • They have no structure, and are considered flat address spaces

  17. 6.4 Framing • Why framing is necessary • Frame format diagram • Three analogies for frames • A generic frame format • Frame start fields, Address fields • Length/type fields, Data fields • Frame error problems and solutions • Stop frame field

  18. Why framing is necessary • Which computers are communicating with one another • When communication between individual computers begins and when it terminates • A record of errors • Whose turn it is to "talk" in a computer "conversation"

  19. Frame start fields • Grab the attention of other computers • Address field • Source and destination MAC address • Length/type fields • Length field: exact length of a frame • Type field: specifies the Layer 3 protocol • Data fields • Higher-layer data/padding bytes

  20. Frame Check Sequence (FCS) field • Error detection • Contains a number that is based on the data in the frame • Three primary ways • Cyclic redundancy check (CRC) • Two-dimensional parity • Internet checksum • Stop frame field • Indicate the end of frame

  21. 6.5 Media Access Control (MAC) • Definition of MAC • Three analogies for MAC • Deterministic MAC protocols • Non-deterministic MAC protocols • Three specific technical implementations and their MACs

  22. Definition of MAC • Protocols that determine which computer on a shared-medium environment (collision domain) is allowed to transmit the data • Two broad categories of MAC • Deterministic (taking turns) • Non-deterministic (first come, first served)

  23. MAC • Classification of MAC protocols • Topologies of broadcast links • Contention MAC • Round Robin MAC • Reservation MAC • Dedicated MAC

  24. Classification of MAC Protocols Note : Some systems use a combination of above schemes.

  25. station station repeater (a) Bus (b) Ring station base station mobile station Star coupler (active or passive) (d) Wireless--celluar (c) Star Topologies of Broadcast

  26. Topologies and Standard Protocols • Bus • CSMA/CD (802.3), Token Bus (802.4), DQDB(802.6) • Ring • Token Ring (802.5), FDDI • Star • WDMA • Wireless • ALOHA, CSMA/CA (802.11), FDMA+TDMA (GSM), CDMA

  27. Dedicated MAC • WDMA • Wavelength Division Multiple Access • FDMA on passive fiber optic LANs • Frequency Division Multiple Access • TDMA on passive fiber optic LANs • Time Division Multiple Access • CDMA • Code Division Multiple Access

  28. Deterministic MAC protocols • A form of "taking your turn" • Token Ring network • A special data token circulates around the ring • When a host wants to transmit, it seizes the token, transmits the data for a limited time, and then places the token back in the ring

  29. receiver receiver receiver receiver frame copied token token sender (expecting token) sender (txing data) sender (draining data) sender (releasing token) Token Ring

  30. Token Bus • A logical ring on a physical bus, a ring maintenance protocol is required. • Run a token protocol similar to token ring, except that the token rotation time is controlled. FDDI’s timed token rotation protocol follows the same mechanism as token bus.

  31. FDDI • Fiber Distributed Dual Interface operational ring backup ring

  32. Non-deterministic MAC protocols • First-come, first-served (FCFS) approach • Allow anyone to transmit at will • This led to collisions • Carrier Sense Multiple Access with Collision Detection (CSMA/CD) • Everyone else on the system also hears the collision, waits for silence, and then tries to transmit

  33. ALOHA • Transmit whenever it wants • Listen to know if it’s a success or collision • Wait a random time to retx, if collided

  34. C A B . . . D . C . A B D . . . RTS CTS . E . E CSMA/CA • Carrier Sense Multiple Access with Collision Avoidance • Before sending the data frame, send a RTS (Request To Send) mini-frame to receiver, (RTS declares the length of data frame) • If Collided, backoff exponentially and retry. • Receiver sends back a CTS (Clear To Send) mini-frame to ask the other stations keep silent for the period of data frame. • If collided, backoff exponentially and retry. • Transmit the data frame when the CTS is received.

  35. Three specific technical implementations • Ethernet • Logical bus topology • Physical star or extended star • Token Ring • Logical ring topology • Physical star topology • FDDI • Logical ring topology • Physical dual-ring topology

  36. Summary • Institute of Electrical and Electronic Engineers (IEEE) • Media Access Control (MAC) • Logical Link Control (LLC)

More Related