Module 6 Flashcards

1
Q

Q11-1 Define framing and the reason for its need.

A

The data link layer needs to pack bits into frames. Framing divides a message
into smaller entities to make flow and error control more manageable.

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

Q11-5 Compare and contrast byte stuffing and bit stuffing.

A

Byte-oriented protocols use byte-stuffing to be able to carry an 8-bit pattern
that is the same as the flag. Byte-stuffing adds an extra character to the data
section of the frame to escape the flag-like pattern. Bit-oriented protocols use
bit-stuffing to be able to carry patterns similar to the flag. Bit-stuffing adds an
extra bit to the data section of the frame whenever a sequence of bits is similar
to the flag.

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

Q11-7 In a bit oriented protocol, should we first unstuff the extra bytes and then remove the flags or reverse the process?

A

The flags are the delimiters of the original frames. We need first to unstuff the
frame to remove extra bits. The flags are removed later when we want to
deliver data to the upper layer.

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

Q11-4 Compare and contrast byte oriented and bit oriented protocols.

A

In a byte oriented protocol data are encoded in 8 bit characters from a coding system such as ASCII, Where as in bit oriented protocols the data section of a frame is a sequence of bits to be interpreted by the upper layer protocols as images, audio, video and so on.

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

Q11-8 Compare and contrast flow control and error control.

A

Both error and flow control are functions of the data
link layer.

Flow control deals with the amount of data to be sent by the sender before an acknowledgement is received. It restricts the amount of data to be received

Whereas error control deals with deals with the errors occured during the transmission of data. It informs the frame lost and ensures re transmission of data.

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

Q11-18 Define piggybacking and its benefit.

A

In real world, the data frames flow in a two way direction that is from node A to node B and from node B to node A.

Hence, the control information of the transmission also can flow in the two way direction.

In a two way communication, the node A sends a data frame to the node B whenever a data frame is received from A, the node B waits and does not send the control information (ACK) back to the node A immediately,

The node B waits until its network layer passes in the next data frame. The delayed ACK is attached to the outgoing data frame. This technique is called Piggybacking.

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

Q23-5 In a network, the size of the receive window is 1 packet. Which of the following protocol is being used?

a) Stop-and-wait
b) Go-back-N
c) Selective repeat

A

a. The protocol can be Stop-and-Wait with the receive window size of 1 and
the send window size of 1.

b. The protocol can also be Go-Back-N with the receive window size of 1 and
the send window size of n packets.

c. The protocol cannot be Selective-Repeat because the size of both windows
should be the same (1), which means the protocol is Stop-and-Wait, not
Selective-Repeat.

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

Q23-7 In a network with fixed value for m > 1, we can either use Go back N or the Selective Repeat protocol. Describe the advantages and disadvantages of using each. What other network criteria should be considered to select either of these protocols?

A

a. The advantage of using the Go-Back-N protocol is that we can have a larger send window size. We can send more packets before waiting for their acknowledgment. The disadvantage of using this protocol is that the
receive window size is only 1. The receiver cannot accept and store the out of-order received packets; they will be discarded. Discarding of the out-of order packets means resending these packets by the sender, resulting in
congestion of the network and reducing the capacity of the pipe. So the
advantage seen by a larger send window may disappear by filling the network with resent packets.

b. The advantage of using the Selective-Repeat protocol is that the receive window can be much larger than 1. This allows the receive window to storethe out-of-order packets and avoids resending them to congest the network.
The disadvantage of this protocol is that the send window size is half of the
Go-Back-N, which means that we can send fewer packets before waiting
for the acknowledgment.
We can conclude that if the bandwidth-delay product of the network is large,
the reliability is good, and the delay is low, we should choose the Go-Back-N
protocol to use more of the network capacity. On the other hand, if the bandwidth-delay product is small, or the network is not very reliable, or the network creates long delays, we need to use Selective-Repeat.

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

P23-5 Using 5 bit sequence numbers what is the maximum send and receive windows for each of the following protocols?

a) Stop-and-wait
b) Go back N
c) Selective-repeat

A

stop and wait
max send W size 1
max receive size 1

Go-back-N

max send W size = 2^(number of seq bits) - 1 = 31

max receive W size = 1

Selective-repeat

Max send W size = 2^(number of seq bits)/2 =16

Max receive W size = 2^(number of seq bits)/2 =16

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

P23-9 In a stop and wait protocol, show the case in which the receiver receives a duplicate packet (which is also out of order).

A

The following figure shows the case. It happens when an ACK is delayed and
the time-out occurs. The sender resends the packet that is already acknowledged by the receiver. The receiver discards the duplicate packet, but resends
the previous ACK to inform the sender that there is a delay in the network.

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

Q23-6 In a network the size of the send window is 20 packets. Which of the following protocols is being used by the network?

a) stop and wait
b) Go-back-N
c) Selective repeat

A

Not stop and wait, either Go back N or Selective Repeat.

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

Q23-8 Since the sequence number of a packet is limited in size, the sequence number in a protocol needs to
wrap around, which means that two packets may have the same sequence number. In a protocol that
uses m bits for the sequence-number field, if a packet has the same sequence number x, how many
packets need to be sent to see a packet with the same sequence number x, assuming that each packet is
assigned one sequence number

A

Sequence numbers are modulo 2^m. The numbers will wrap after 2^m sequence numbers where m is the length of the sequence number.

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

P23-16 Answer the following questions related to the FSMs for the Stop and Wait protocol.

A

a. The sending machine is in the ready state and S=0. What is the sequence number of the
next packet to send?

Sequence No= 0

b. The sending machine is in the blocking state and S=1. What is the sequence number of the
next packet to send if a time out occurs?

Sequence No = 1

c. The receiving machine is in ready state and R=1. A packet with the sequence number 1
arrives. What is the action in response to this event?

Deliver packet and, slide window forward, send ack

d. The receiving machine is in the ready state and R=1. A packet with the sequence number 0
arrives. What is the action in response to this event?

Deliver packet, slide window back to zero, send ack.

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

What is framing and why is it important?

A

Framing is the process of organizing bits and adding sender and receiver information. It is important because it allows data to be distinguishable.

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

List the three types of framing methods.

A

Starting bit pattern + ending bit pattern

Starting bit pattern + length field in the header

Starting bit pattern + fixed size frame

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

Describe the basic idea of flow control.

A

Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment.

17
Q

Describe the basic idea of error control that consists of error detection and retransmission with timer.

A

Error control in the data link layer is based on automatic repeat request, which is the retransmission of data.

18
Q

Explain how to distinguish frame types.

A

Data frames will contain sequence numbers.

Ack frames will contain ack numbers.