240 likes | 554 Views
Data Link Layer. Lower Layers Local Area Network Standards Point-to-Point Link Layer Protocols ARP and RARP. TCP/IP Suite and OSI Reference Model. The TCP/IP protocol stack does not define the lower layers of a complete protocol stack.
E N D
Data Link Layer Lower Layers Local Area Network Standards Point-to-Point Link Layer Protocols ARP and RARP
TCP/IP Suite and OSI Reference Model The TCP/IP protocol stack does not define the lower layers of a complete protocol stack. In this lecture, we will review the data link layer and the MAC sublayer. Most of the material should be familiar from EL 536.
Data Link Layer • The main tasks of the data link layer are: • Transfer data from the network layer of one machine to the network layer of another machine. • Convert the raw bit stream of the physical layer into groups of bits (“frames”). • Perform flow control between sender and receiver.
Types of Networks • There are two types of communication networks: • Broadcast Networks: All stations share a single communication channel. • Point-to-Point Networks: Pairs of hosts (or routers) are directly connected. • Typically, local area networks (LANs) are broadcast and wide area networks (WANs) are point-to-point.
Local Area Network • Local area networks (LANs) typically connect computers within a building or a campus. • Almost all LANs are broadcast networks. • Typical topologies of LANs are bus or ring.
MAC and LLC • In any broadcast network, the stations must ensure that only one station transmits at a time on the shared communication channel. • The protocol that determines who can transmit on a broadcast channel is called Medium Access Control (MAC) protocol. • The MAC protocol is implemented in the MAC sublayer which is the lower sublayer of the data link layer. • The higher portion of the data link layer is often called Logical Link Control (LLC).
IEEE 802 Standards • IEEE 802 is a family of standards for LANs. • The 802 defines the LLC and several MAC sublayers. Higher Layers 802.1 Interface to Higher Layers LLC 802.2 Logical Link Control MAC 802.3 CSMA/CD (Ethernet) 802.4 Token Bus 802.5 Token Ring 802.6 DQDB
C Unacknowledged connectionless service L IEEE 802.2 Connection-oriented service L Acknowledged connectionless service C A CSMA/CD Token Bus Token Ring FDDI M Broadband Broadband Shielded 4 3 5 coaxial: Coaxial: . . twisted . 2 2 2 10 Mbps 1,5,10 pair: 0 0 I 0 8 D 8 l 8 Mbps 4, 16 Mbps a D E E c E F E i E E s Unshielded Carrierband Unshielded E E E y I I I 1,5,10 twisted pair: twisted h P Mbps pair: 1, 10 Mbps 4 Mbps Optical Optical fiber :Fiber 5,10,20 Mbps 10 Mbps IEEE 802 LAN Standard DQDB Optical Optical 6 fiber: fiber . 2 100 or 0 8 Mbps coaxial E 44.736 E Mbps E I
Functions of the LLC • LLC can provide different services to the network layer: • acknowledged connectionless service • unacknowledged connectionless service • connection-oriented service • Framing • Error control • Addressing
Functions of the MAC sublayer • The various MAC sublayers of the IEEE 802 standard are very different. • We will discuss: • CSMA/CD a.k.a. Ethernet
IEEE 802.3 (CSMA/CD) 802.3 standardizes the 1-persistent CSMA/CD multi-access control protocol. 1. Each station listens before it transmits. 2. If the channel is busy, it waits until the channel goes idle, and then it transmits. 3. If the channel is idle it transmits immediately. Continue sensing. 4. If collision is detected, transmit a brief jamming signal, then cease transmission, wait for a random time, and retransmit.
Different techniques • 1-persistent: • if busy, constantly sense channel • if idle, send immediately • if collision is detected, wait a random amount of time before retransmitting • Non-persistent: • sense channel when station has a packet to send • if busy, wait a random amount of time before sensing again; • if idle, transmit as soon as it is idle • collisions reduced because sensing is not immediately rescheduled • drawback: more delay • p-persistent: combines 1-persistent goal of reduced idle channel time with the non-persistent goal of reduced collisions. • sense constantly if busy and the station needs to send a packet • when the channel becomes idle, transmit packet with probability p • with probability 1-p station waits an additionaltprop before sensing again
Collisions in Ethernet • The collision resolution process of Ethernet requires that a collision is detected while a station is still transmitting. • Assume: max. propagation delay on the bus is a.
Collisions in Ethernet • Restrictions: Each frame should be at least twice as long as the time to detect a collision (2 · maximum propagation delay).
Different MAC schemes • ALOHA: True free-for-all. When a node needs to send, it does so. It listens for an amount of time equal to the maximum round trip delay plus a fixed increment. If it hears an acknowledgment, fine; otherwise it resends. After several attempts, it gives up. Max. utilization: 18% • Slotted ALOHA: improved utilization: 37% (with time slots; frames that overlap, overlap completely) • CSMA: Sense carrier, if idle, send.Wait for ack. If there isn’t one, assume there was a collision, retransmit.
CSMA/CD • CSMA/CD: • In CSMA, if collision occurs, need to wait till damaged frames have fully propagated. For long frames compared to propagation delay, this could lead to significant waste of capacity. So add collision detection. • Rule: Frames should be long enough to allow collision detection prior to the end of transmission (pg 405, EL536 textbook)
Exponential Backoff Algorithm • If a station is involved in a collision, it waits a random amount of time before attempting a retransmission. • The random time is determined by the following algorithm: • Set “slot time” to 2a. • After first collision wait 0 or 1 time unit. • After i-th collision, wait a random number between 0 and 2 i-1 time slots. • Do not increase random number range if i=10. • Give up after 16 collisions.
Physical Layer Specifications for 802.3 • Many types of media are allowed for 802.3. These are the most popular:
Ethernet and IEEE 802.3: Any Difference? • On a conceptual level, they are identical. But there are subtle differences that are relevant if we deal with TCP/IP. • “Ethernet”: • An industry standard from 1982 that is based on the first implementation of CSMA/CD by Xerox. • Predominant version of CSMA/CD in the US. • 802.3: • IEEE’s version of CSMA/CD from 1985. • Interoperates with 802.2 (LLC) as higher layer. • Difference for our purposes: Ethernet and 802.3 use different methods to encapsulate an IP datagram.
IEEE 802.2/802.3 Encapsulation (RFC 1042) Error: This should be 8035 not 0835
Interconnection of LANs • LANs of different types can be interconnected by data link bridges.