Link Layer Flashcards
What does the link layer do?
Transfers frames from one node to another physically adjacent node, over a link
What are the services of the link layer?
Framing - encapsulates network layer datagram into frame adding header and trailer
Link access - handle link access if shared medium
Addressing - add MAC address in frame header
Reliability - use TCP to deliver between adjacent nodes
Error detection - receiver detects errors and retransmits/drops frame
Error correction - receiver detects bit errors and corrects so no retransmission
Where is the link layer implemented?
Software: implemented in OS but runs on host CPU
Hardware: NIC
What are the 3 types of multiple access protocol?
Channel partitioning - divide into sub-channels and assign exclusive nodes
Random access - allow collision and mechanism to recover
Taking turns - nodes take turn on channel
What are 2 examples of taking turn protocols?
Polling = master node invited other nodes to transmit in turn
Token passing = control token is passed from node to next sequentially
What are 2 examples of channel partitioning protocols and how do they work?
FDMA
- channel spectrum divided into frequency bands
- each node given band
- unused transmission time in band goes idle
TDMA
- access to each channel in rounds
- each node has fixed length slot in each round
- unused slots go idle
How does a random access protocol work?
Node has packet to send
2 or more transmitting nodes cause collision
Protocol specifies how to detect collision and how to recover
What are 4 examples of random access protocols?
Slotted ALOHA
Pure ALOHA
CSMA
CSMA/CD
How does slotted ALOHA work and what sis max efficiency?
- Node obtains fresh frame to transmit
- Transmits at start of next slot
- If no collision, node is ready for further transmission at next slot
- If collision, nose retransmits frame in each subsequent slot with probability p until success
Max efficiency = 37%
How does pure ALOHA work and whats it’s max efficiency?
When frame first arrived at node, it’s immediately transmitted
Max efficiency = 18%
How does CSMA WORK?
If channel is idle transmit entire frame
If channel is busy, defer transmission
How does CMSA/CD work and what’s it’s efficiency?
Colliding transmission are aborted
Ethernet algorithm - after abortion, NIC enters binary back off
Efficiency = 1/ [1+5(tprop / ttrans)] -> 1
What are the ideal properties of a multiple access protocol?
1 node wants to transmit = R
M nodes want to transmit = R/M
Fully decentralised to avoid single failure point
Simple and inexpensive
How does link layer framing and addressing work?
Datagrams from network layer contain IP addresses
Every datagram is enclosed in frame before addressing
Frame contains MAC address (12 hex digits)
What are the links used for WAN and LAN?
Wireless LAN = Wi-Fi
Wired LAN = Ethernet
WAN = point to point protocol (PPP)