The datalink layer Flashcards

1
Q

Role of the datalink layer

A

The Data Link Layer is responsible for:
- Framing
- Error handling
- Flow control

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

What is a frame

A

Its is the transmitted element in Data Link layer . A frame is regarded either as a block of bytes, or as a sequence of bits

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

Framing (to frame)

A
  • The sender assembles/breaks an incoming sequence of packets (from network layer) into frames
  • The receiver does the opposite
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Framing extraction

A

The receiver must determine the first and last bit/byte of the frame so that the frames can then be extracted

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

Byte count

A
  • Payload is transmitted as a variable length block of bytes preceded by a byte count
  • this method uses a field in the header to specify the number of bytes in the frame
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data transparency problem

A

It may happen that the flag byte occurs in the data .
This would cause the protocol software to incorrectly assume that the frame was finished at that point

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

Solution to data transparency problem

A

insert a special escape byte (ESC) just before each ‘‘accidental’’ flag byte in the data. This is known as Byte stuffing

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

Redundant data

A

In the data link layer, redundant data refers to extra bits added to the data being transmitted to detect and correct errors. This helps to improve the reliability of the communication.

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

Error detection techniques

A
  • Parity bit
  • Checksums
  • Cyclic Redundancy Check (CRC)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Flow control protocol

A

It controls the sending of transmission frames at a faster pace than they can be accepted e.g. Simple Stop and Wait Protocol

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

Stop and Wait protocol

A
  • Sender sends one data frame
  • Receiver receives the data frame and send an acknowledgment
  • Sender receives the Acknowledgment and sends the next data frame
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Disadvantages of stop and wait protocol

A
  • Slow
  • Cannot be used in noisy channel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Problems with stop and wait protocol

A
  1. Damaged frame
  2. Lost data frame
    3.Lost ACK
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Timeout problem with Stop and wait protocol

A
  • If it is too long, (A) will wait unnecessarily long before
    retransmission, causing the link to be idle
  • if it is too short, the protocol may fail due to the
    occurrence of duplicate ACKs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Automatic Repeat ReQuest Protocols

A
  • A group of error control protocols incorporated with stop and wait flow control protocol for transmission of data over a noisy or unreliable network
  • They provide automatic retransmission of frames that are corrupted or lost during transmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

3 types of Automatic Repeat Request Protocols

A
  • Stop – and – Wait ARQ
  • Go – Back – N ARQ
  • Selective Repeat ARQ
17
Q

Stop and wait ARQ

A
  • “A” sends a frame with a unique sequence number, then waits for “B” to acknowledge it (flow control)
  • If a timeout occurs ,the frame is retransmitted again (error control)
  • frames with CRC errors are rejected by “B” and a NAK is sent
  • Duplicate frames or Acks are also rejected
18
Q

piggy backing

A
  • Data frames sent by a receiver carry acknowledgements of its received frames.
  • Similar to Sop and Wait ARQ
19
Q

Advantages of piggy backing

A
  • Better channel utilisation: fewer bits
    transmitted
  • Less computation by the hosts: less work to
    pack, unpack and check the extra frames
20
Q

disadvantages of piggy backing

A
  • If the receiver waits “too long” to send a
    piggybacked acknowledgement (waiting for
    a data frame to be available), the sender
    will time-out and retransmit the frame!
21
Q

Go back N protocol

A
  • It allows for sending N frames before receiving the acknowledgement for the first frame
  • The frames are sequentially numbered
  • It uses the concept of sliding windows at the sender and the receiver, and so is also called Go
    -Back-N sliding window protocol
22
Q

Selective Repeat ARQ Protocol

A
  • This protocol also provides for sending N frames before receiving the acknowledgement
    for the first frame
  • The frames are sequentially numbered
  • It uses the concept of sliding windows at the sender and the receiver, and so is also called
    Selective Repeat sliding window protocol
23
Q

What if the frame is a block of bytes

A
  • Byte count
  • Start and end flag bytes with byte stuffing
24
Q

What if the frame is a sequence of bits

A
  • Start and end flag bytes with bit stuffing
25
Q

Byte stuffing

A

It is a method of inserting special escape characters into a data stream to signal the start and end of a frame. It is used to ensure that certain sequences of bytes, known as flag sequences, do not occur within the data.

26
Q

Bit Stuffing

A

Bit stuffing is a method of inserting extra bits into a data stream to ensure that certain bit patterns do not occur within the data. It is used to maintain the integrity of a frame structure in communication protocols.

27
Q

Error Handling

A

Detecting and correcting errors from the physical layer

28
Q

how to solve stop and wait timeout problem

A
  • This can be solved by including the sequence number of
    the acknowledged frame into the ACK frame itself.
  • However, all frames are still sent twice, causing 50% loss of
    transmission capacity