Terminology
- Node - link that is part of an end-to-end path
- Refers to hosts and routers
- Does not matter if node is a router or end node
- Link - communication channel that connects adjacent nodes along communication path
- e.g. wired links, wireless links, LANs
- Frame - refers to a layer-2 packet
- Encapsulates datagram (i.e. network level data)
The data-link layer has the responsibility of transferring a datagram from one node to a physically adjacent node over a link.
A datagram can be transferred by different link protocols over different links.
- e.g. Ethernet on first link, frame relay on intermediate links, 802.11 on last link
Each link protocol provides different services.
- e.g. RDT may or may not be provided over a given link
Transportation Analogy
Link Layer Services
- Framing
- Involves encapsulating a datagram into a frame + adding header/trailer
- MAC addresses are used in frame headers to identify source/destination
- These are different from IP addresses
- Link Access
- Channel access if shared medium is used
- Communication may be over a shared link - need to provide method to mitigate collisions (multiple access protocol)
- Reliable delivery between adjacent nodes
- Mainly provided in wireless links (have high error rates)
- Less errors on low bit-error links (e.g. fiber, etc.)
- Error detection
- Includes errors caused from signal attenuation, noise
- Faster to detect errors at link layer
- When receiver detects errors, it will signal sender to retransmit or drop frame
- Error correction
- A receiver can identify and correct bit error(s) without resorting to retransmission