Networks Part 3 (Datalink Layer) Flashcards

1
Q

What services does the data link layer provide?

A
  1. Unacknowledged Connectionless Service
    Frames are sent with no connection or error recovery (e.g Ethernet)
  2. Acknowledged Connectionless Service
    Frame is sent with retransmissions if needed. (e.g 802.11)
  3. Acknowledged Connection-Oriented Service
    Connection is set up, which is rare (Used for long unreliable links)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main role of the datalink layer?

A

Detect damage and/or loss of frames between adjacent nodes, and recover from the problem.

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

What is the datalink responsible for?

A
  1. Framing - Delimiting data units flowing on the channel.
  2. Error Handling - detecting and correcting layers introduced by the physical layer.
  3. Flow Control - Prevents a fast sender from overloading a slow receiver.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a frame?

A

The transmitted element used in the Data Link layer.

Can either be regarded as a block of bytes or a sequence of bits.

Senders assemble frames, receivers deconstruct them back into bytes/bits.

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

What is bit stuffing?

A

The practice of putting a 0 after every 5 consecutive 1’s.

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

What is a “Parity Bit”?

A

When a bit is added on the end of data signifying if the amount of bits being sent is odd or even.

Is only suitable for single bit error detection.

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

What is a “Checksum”?

A

Where chunks of bits are sent along with the actual bits of data.

When they are added together, they should equal 0.

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

What is a “Cyclic Redundancy Check”?

A

A more effective error checking method than Checksums.

The transmitted frame is viewed as a polynomial. The transmission polynomial must be evenly divisible by an attached generator polynomial.

CRC operates on the entire frame, not just individual bytes.

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

Why is the “Simple Stop and Wait” protocol unsuitable for flow control?

A

If frames get lost, the protocol can enter deadlock.

The transmitter will be constantly waiting for an acknowledgment from a frame that got lost, i.e it will never receive a acknowledgment.

A timeout can be set to mediate this, however timeouts can reduce the efficiency of transfer protocols due to the time spent waiting to receive the file.

The timeout can be shortened, but that might not account for slow files, meaning the received file will then be made incorrect.

TL;DR: Simple Stop and Wait does not take into account the Round Trip time of the data.

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

What is the “Stop and Wait Automatic Request” protocol?

Why is it unsuitable for flow control?

A

“Stop and Wait ARQ” is better than “Simple Stop and Wait” as it also has frames include their unique sequence numbers.

If a timeout is triggered, and a frame ends up arriving late (after the resend has arrived), it won’t be inserted into the overall data unless it’s sequence number matches where the protocol is currently up to in the overall data.

It is not suitable for flow control as its utilisation still remains low resulting in an inefficient protocol.

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

What is the “Piggy-Backing” protocol?

A

Similar to the “Stop and Wait” protocol, however instead of acknowledgments being sent after receiving and then continuing with data transfer, acknowledgements are sent along with the next frame of data.

This has the advantages of better channel utilisation as less bits need to be transmitted, and less computation by the host as both pieces of data can be unpacked at once.

This disadvantages are that if the receiver waits too long to send a bundled frame and acknowledgement, the sender will timeout and retransmit the frame.

This means there should only be a brief wait. If no data is available, the ack is sent on its own. This means the receiver also needs a timeout.

Slightly complex solution.

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

What is the “Go-Back N ARQ” protocol?

A

Sends a group of frames before it requires an acknowledgement. Frames are sequentially numbered. Uses the concept of a sliding window at the sender and the receiver, so is also called the “Go-Back-N Sliding Window Protocol”.

If an error is detected, the transmitter keeps transmitting until timeout, at which point it will resend both the file where the error occurred, and every file after that.

This creates bad efficiency in unreliable/error prone systems.

The minimum range of sequence numbers that must be used for the “Go Back N ARQ” protocol to work properly is “Window size + 1”.

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

What is the “Selective Repeat ARQ” protocol?

A

Receiver sends negative acknowledgment if frames being received are not in the correct order. Transmitter keeps sending data unaware until it receives the negative acknowledgment. Once received, it will send the data that was damaged.

Utilisation is better if used in an unreliable system.

The minimum range of sequence numbers that must be used for the selective repeat protocol to work properly is “Window size *2”

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