Computer Networks 20022003 The Data Link Layer Johan


























- Slides: 26
Computer Networks 2002/2003 The Data Link Layer Johan Lukkien 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 1
The OSI model PSDU SSDU TSDU NSDU DSDU Ph. SDU 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 2
Data Link Layer services • Provide packet oriented service (“frames”) – – send/receive frames between machines deal with transmission errors support addressing, in the broadcast domain support sharing by several network layer protocols • Services provided by physical layer – put bits (signals) on (p 2 p or broadcast) wires – diverse technologies • Note: – quality of service differs per technology • e. g. reliability – provided service itself as well • e. g. connection orientation 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 3
Data Link Layer issues • Address LAN and point-2 -point issues – define DPDU and DSDU – More or less “stack-independent, see picture • Part of the link layer is technology dependent: the medium access (MAC) sublayer – structure transmissions into frames (DPDU) – policy for shared medium access • e. g. dealing with collisions – error detection – flow control – addressing 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 4
Some stacks and the OSI model 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 5
Data Link Layer issues (cnt’d) • The other part (Logical Link Control, LLC) concerns – the connection to multiple network layers – additional functionality to improve quality of provided services • reliability, connection orientation • Note: these quality issues reoccur in network and transport layer – e. g. , flow control, error checking – Rule of thumb: don’t make a low level service unnecessarily complicated • e. g. is reliability useful at this level? When? Why? 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 6
Framing methods • Byte count – include length in header – not used very much: difficult to re-sync • Flags – dedicated start and stop byte (sequence) • often chosen to be identical – need to be escaped when it occurs as part of payload • byte stuffing: add an escape byte in front • used the escape to escape itself as well – generalize to bit sequence, HDLC: • special pattern for start/stop, e. g. 01111110 • after each occurrence of 5 1’s a 0 is stuffed • Use special, unused bit patterns in physical layer 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 7
Byte count • A stream encoded with byte count a) without errors b) with errors • Note: difficult to resynchronize 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 8
Stuffing 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 9
Flow control policies • Feed-back based – communicate receiver state to sender • so sender can take decision – explicit start/stop commands – ask for another fixed maximum amount of data • more smoothly • Rate-based – internal mechanism to adjust the rate • Data-Link: mainly feed-back based methods 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 10
Example data link protocols • Point-to-point (tradionally, reliable service) – High level data link control protocol (HDLC) • ISO 3309 -1979 – Point-to-point protocol • RFC 1661 (1662, 1663) • The IEEE 802 LANs 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 11
High-Level Data Link Control Protocol • Background – master and tributaries sharing a multi-access link – controller for several terminals • “concentrator” • Developed by IBM: SDLC – adapted by ISO: HDLC – adapted by CCITT to support X. 25: LAP, LAPB –. . collection of bit-oriented link-layer protocols 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 12
High-Level Data Link Control Protocol • Frame format – Point to many-point and vice versa – – – 10/27/2020 use flags for separation of frames Control: sequence numbers, acks, . . Data: payload, any length Checksum: CRC Address: the involved tributary Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 13
Frame types • Three types, encoded in Control a) Information frame. b) A supervisory frame 1. info concerning the communication status c) An unnumbered frame 1. no numbering • P/F: poll/final • Next: expected frame • Seq: serial number (sliding window) 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 14
PPP: Point to Point Protocol • The Internet choice: – derived from HDLC 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 15
PPP (cnt’d) • Byte oriented – byte stuffing – so it works on both bit- and byte oriented ‘wires’ • Derived from HDLC – address = 1111 (broadcast. . . ) – mostly, control = 00000011 (unnumbered frame, no reliability) but may use HDLC mechanism • Protocol – type of packet in payload • e. g. LCP, NCP, AUTHENTICATE, IPX, Apple. Talk, . . 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 16
PPP (cnt’d) • Link Control Protocol: – setup line and bring it down – evaluate line performance – negotiate communication options in dependent of network protocol, e. g. header compression • Authenticate – optional • Network Control Protocol – negotiate details of supported network layer • e. g. IP address – more than one may be supported 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 17
PPP: LCP frame types 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 18
Dial-up scenario • Physical connection – PC user initiates connection to ISP router – modems synchronize and negotiate • Line negotiation – LCP packets are sent via PPP frames to router – finalize with this phase with connection-ack • Authenticate – using an authentication protocol, e. g. challenge/response; passwd • Network – IP-NCP packets are sent to negotiate IP as network protocol – dynamically assigned IP address is returned from router • • PC operates as a part of the Internet User is done with connection – NCP tears down the network connection (freeing the assigned IP address for re-use) – LCP tears down the data link connection – Modem is told to hangup 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 19
Local area networks: IEEE 8 -2 • Communication based on broadcasting – multi-access links – or just packet-level broadcasting • LAN technologies define the physical and MAC layer • Particular issue both the – addressing • including multi-cast 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 20
Multiple Access Protocols • ALOHA • Carrier Sense Multiple Access Protocols • Collision-Free Protocols • Limited-Contention Protocols • Wavelength Division Multiple Access Protocols • Wireless LAN Protocols 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 21
Name, address, location, route. . • Context – a source sends a message to a destination; both connect to the network via an access point at a certain location (“identifier”) • Access point – a fixed physical location to connect to the network • Name – an identification that is independent of access point and communicating partner • Address – the name of an access point • Route – a path from source to destination dependent on the access points of both 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 22
IEEE 802 MAC addresses • In fact: identifiers • Attached to a Network Interface Card • 48 bit numbers, with some structure – globally unique – global authority (first Xerox, then IEEE), $1250/224 • • 10/27/2020 3 bytes fixed: Organizational Unique Identifier G/L bit: global unique-ness G/I bit: multicast? all 1’s: broadcast – not really used Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 23
Logical Link Control (802. 2) • Standardizes towards network layer • Adds quality to the service – type 1 • datagram service: best effort packet delivery – type 2 • reliable connection oriented service – HDLC-like – type. . . • achieve some reliability without the complete overhead of type 2 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 24
802. 2 Format • • DSAP: destination access point (1 byte) SSAP: source access point (1 byte) Control: 1 or 2 bytes (Data, i. e. the packet) • Access points: protocols used at both sides – usually identical – two bits reserved • group/individual (not really useful to address multiple protocols though. . ) • global/local – only 802 -approved numbers are admitted • and those have both SAP fields equal 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 25
Using your own SAP • Use locally assigned SAP’s – but that’s difficult to synchronize dynamically • Use header extension – both SAP’s: 1010 (aa) • a. k. a. SNAP, subnetwork access protocol – indicates a header of 5 extra bytes • to make headers have an even length • to use the OUI of MAC addresses to standardize – buying a block of addresses also brings a block of protocols. . 10/27/2020 Johan J. Lukkien, j. j. lukkien@tue. nl TU/e Computer Science, System Architecture and Networking 26


























