chapter 6 - link layer Flashcards

(33 cards)

1
Q

What is a link-layer frame?

A

data unit used to send information between two directly connected devices

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

What is the main job of the link layer?

A

Transfer datagrams between physically nodes over a link

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

Where is the link layer implemented?

A

In the NIC (network interface card), as hardware

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

What are the main services of the link layer?

A

Framing reliable delivery, flow control, error detection/correction

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

What is a MAC address?

A

physical link-layer address unique to each NIC (not the same as IP)

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

What is the difference between full-duplex and half-duplex?

A

Full: device can send and receive at once
half: only one at a time

half: walkie-talkie

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

What is a checksum?

A

A value used to detect errors in transmitted data

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

What does a parity bit detect?

A

Single-bit errors

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

What is CRC (Cyclic Redundancy Check)?

A

strong error-detection method using polynomial division

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

What is the purpose of a MAC protocol?

A

who gets to send data on a shared communication channel and when

who = device

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

What are the 3 categories of MAC protocols?

A

Channel partitioning, random access, taking turns

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

What is Time Division Multiple Access (TDMA)?

A

each node gets a time slot and the queue goes in a circle

hører til channel partitioning

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

What is Frequency Division Multiple Access (FDMA)?

A

each node gets a frequency band and can send at the same time

sends link layer frames

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

What is slotted ALOHA

A

Time is divided into equal time slots, and devices can only send at the start of a slot

when collisions -> retransmit at random time

random access

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

slotted aloha - settings

A

all frames same size
time divided into equal size slots

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

pure aloha

A

nodes transmit whenever - higher collision risk

17
Q

What is Carrier Sense Multiple Acces (CSMA)?

A

listen before sending

if sensing busy - defer transmission
if sensing free - transmit entire frame

18
Q

What is CSMA with Collision Detection (CSMA/CD)?

A

stop sending if collision detected -> wait and send at a random time later

random access

19
Q

pros cons - slotted aloha

A

pro - decentralized
cons - synchronization

20
Q

What improves CSMA/CD efficiency?

A

Short propagation delay (T_prop) and long transmission time (T_trans)

21
Q

ethernet csma/cd algorithm

A
  • ethernet creates frame
  • if idle -> retransmit
  • if another transmission detected while sending -> abort
22
Q

How does a parity bit detect errors?

A

Adds 1 bit to ensure even (or odd) number of 1s; receiver checks if parity matches

23
Q

How does two-dimensional parity work?

A

Adds parity bits to rows and columns in a bit grid; detects and corrects single-bit errors

24
Q

How does CRC detect errors?

A

Divides data (polynomial) -> appends remainder so final result is divisible
receiver checks divisibility

25
How does polling work?
A master device asks each device in turn -> do you have data to send -> if yes (send), if no (move on to next) | taking turn protocol
26
difference between MAC and IP addresses?
IP = logical address (used for routing, can change with location) MAC = physical address (fixed per NIC, used for local delivery
27
How does Address Resolution Protocol (ARP) work?
Translates IP address to MAC address if MAC unknown (arp request) -> caches result
28
What is Ethernet?
defines how devices on a local network communicate using cables
29
how does Ethernet work?
Data is sent in ethernet frames -> each frame -> source mac, destination mac, crc (error)
30
What does an Ethernet switch do? - What if the switch doesn’t know the destination MAC?
forwards Ethernet frames only to the correct device using MAC addresses floods the frame to all ports except the incoming one
31
How does a switch learn forwarding info?
When frame arrives on port, the switch looks at the source MAC address maps it in the table mac -> port
32
What does a switch do when receiving a frame?
Looks up destination MAC in its table If known, forwards on correct interface If unknown, floods to all ports except incoming one
33
Difference between a switch and a router?
Switch: link-layer device, uses MAC addresses, learns forwarding table Router: network-layer device, uses IP addresses, computes routes