Docsity

Understanding the Link Layer: Services, Multiple Access Protocols, and Ethernet, Slides of Computer Networks

Partial preview of the text

Download Understanding the Link Layer: Services, Multiple Access Protocols, and Ethernet and more Slides Computer Networks in PDF only on Docsity!

Computer Networking

Technology I

The Link Layer & LANs

The Link Layer

  • So, let’s see where we’ve been
    • The transport layer provides process to process communication
    • The network layer provides host to host communication
  • Now the Link Layer provides the ability to send packets across a single … link - So this layer tells how to send a packet/segment/ datagram from one router/host to another

Link Layer Terms

  • A node is a router or host – here we don’t care which one we’re dealing with!
  • Any connection between nodes is a link
    • The transmitting node puts the datagram in a frame , and transmits it into the link
    • The receiving node receives the frame, and extracts the datagram Datagram

Link Layer Services

  • A link layer protocol moves a datagram over a (one, individual, eins , uno ) link - It defines the format of packets ( frames ) exchanged between nodes at each end of the link, and the actions the nodes do to send and receive these packets - Over a host-to-host route, links may use several different link-layer protocols – but only one per link
  • Typically, one link layer frame contains one network layer datagram

Link Layer Services

  • Now elaborate a little on these services
  • Framing a datagram into a frame means we have data (the datagram) and one or more headers - Technically, can have header and trailer fields, but we’ll generically call both headers - Header format is defined by the protocol

Link Layer Services

  • Link Access uses the Medium Access Control (MAC) protocol to define how a frame is transmitted over a link - MAC negotiates transmission when many nodes share the same link
  • Reliable delivery is provided by high error- rate links (e.g. wireless) to keep the transport layer from retransmitting over the entire route

Link Layer Services

  • Half vs full duplex – with half duplex, a node can only send or receive at one time; with full duplex, it can send and receive at the same time
  • Yes, lots of the link layer services are similar to transport layer services - But the link layer only provides them between two nodes, whereas the transport layer does between hosts

Adapters

  • Most link layer protocols are implemented in an adapter (since we’re getting really close to the physical layer!) - Adapter = network interface card (NIC)
  • The adapter is the last connection between a host and the physical link to the network - Error checking occurs in the adapter, oblivious to the host - Only datagrams which come in cleanly are passed up the protocol stack to the application

Error Detection and Correction

  • We can detect, and sometimes correct, bit errors at the link layer

Error Detection and Correction

  • We add error-detection and correction (EDC) to the data (D) to be sent across the link, in addition to other header info (address, sequence number, etc.)
  • At the other end of the link, the data could be changed (D’) and the EDC info could be corrupted (EDC’)
  • Telling from D’ and EDC’ if the original D was corrupted isn’t a perfect science!

Parity Checks

  • A simple error detection scheme, parity check adds one bit to the data
  • That one bit depends on the type of parity scheme - For even parity, the parity bit is chosen so that the total number of 1’s in the frame is … even - For odd parity, the parity bit is chosen so that the total number of 1’s in the frame is … odd

Parity Checks

  • If the receiver of an even parity link finds an odd number of parity, then there must have been some odd number of bit errors (1, 3, 5, …) - Notice that an even number of errors isn’t detected!
  • And yes, it helps if both sides of the link are using the same parity rules - Modems used to set even or odd parity

Parity Checks

  • If the receiver can detect and fix errors, it’s forward error correction (FEC)
  • Commonly used in audio devices to compensate for, e.g., scratched CD’s
  • In a network, this helps avoid retransmission, and the associated delays

Checksum Methods

  • Yup, this is just like the approach we saw before…here we call it an Internet checksum - Add the digits of the data - Take the 1s complement of the result – that’s the checksum - Data + checksum = 111111111… if not, there’s an error somewhere
  • See RFC 1071