Link Layer Flashcards

1
Q

What does the link layer do?

A

Transfers frames from one node to another physically adjacent node, over a link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the services of the link layer?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where is the link layer implemented?

A

Software: implemented in OS but runs on host CPU
Hardware: NIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 3 types of multiple access protocol?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are 2 examples of taking turn protocols?

A

Polling = master node invited other nodes to transmit in turn
Token passing = control token is passed from node to next sequentially

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are 2 examples of channel partitioning protocols and how do they work?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does a random access protocol work?

A

Node has packet to send
2 or more transmitting nodes cause collision
Protocol specifies how to detect collision and how to recover

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are 4 examples of random access protocols?

A

Slotted ALOHA
Pure ALOHA
CSMA
CSMA/CD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does slotted ALOHA work and what sis max efficiency?

A
  1. Node obtains fresh frame to transmit
  2. Transmits at start of next slot
  3. If no collision, node is ready for further transmission at next slot
  4. If collision, nose retransmits frame in each subsequent slot with probability p until success

Max efficiency = 37%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does pure ALOHA work and whats it’s max efficiency?

A

When frame first arrived at node, it’s immediately transmitted

Max efficiency = 18%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does CSMA WORK?

A

If channel is idle transmit entire frame

If channel is busy, defer transmission

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does CMSA/CD work and what’s it’s efficiency?

A

Colliding transmission are aborted
Ethernet algorithm - after abortion, NIC enters binary back off

Efficiency = 1/ [1+5(tprop / ttrans)] -> 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the ideal properties of a multiple access protocol?

A

1 node wants to transmit = R
M nodes want to transmit = R/M
Fully decentralised to avoid single failure point
Simple and inexpensive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does link layer framing and addressing work?

A

Datagrams from network layer contain IP addresses
Every datagram is enclosed in frame before addressing
Frame contains MAC address (12 hex digits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the links used for WAN and LAN?

A

Wireless LAN = Wi-Fi
Wired LAN = Ethernet
WAN = point to point protocol (PPP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do we convert IP to MAC address?

A

Each interface on a LAN has 48-bit MAC address and 32-bit IP address
Switch is transparent to LAN devices
Switches maintain a forwarding table which maps MAC addresses to switch interface

17
Q

What is the construction of an Ethernet frame?

A

12 bytes in total for source and destination
2 bytes for type
Used to synchronise receiver and sender clock rates

18
Q

How do switch operation work?

A

Switch consults table for MAC of frame
If row exists, forward to all interfaces
Also look up table for source MAC - if row exists update time, if doesn’t add row, rows deleted after certain TTL

19
Q

What is ARP?

A

Address resolution protocol

Each IP node on LAN has a table

20
Q

Why do we use MAC?

A

Provides clear separation between network and link layers
Historical
NICs can do filtering of frames based on MAC and interrupt host only if datagram destined to them has been received