Deck 13: Introduction to the Transport Layer
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/12
Play
Full screen (f)
Deck 13: Introduction to the Transport Layer
1
A sender sends a series of packets to the same destination using 5-bit sequence of numbers. If the sequence number starts with 0, what is the sequence number of the 100th packet?





2
Using 5-bit sequence numbers, what is the maximum size of the 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
b. Go-Back- N
c. Selective-Repeat
Stop-and-Wait protocol:
• Stop-and-Wait protocol is connection oriented protocol.
• In this type of protocol, system send packet and waits for the acknowledgement.
• After getting the acknowledgement from the receiver sends next packet.
• This protocol prevents the duplicity of the message packet.
Go-Back-N protocol:
• Working procedure of the Go-Back-N protocol is same as Stop-and-Wait protocol.
• In this type of protocol system send multiple packets in a time and waits for the acknowledgement.
• After getting the acknowledgement from the receiver sends batch of the multiple packet.
• If any batch is packet of the batch is missed then sends full batch to the receiver.
Selective Repeat protocol:
• In Go-Back-N protocol, if any batch is packet of the batch is missed then sends full batch to the receiver.
• In Selective Repeat protocol, only those packets are send which are missed or lost in the network.
Consider the following details:
Maximum size of the send and receive windows for Stop-and-Wait protocol:
• This protocol multiple packet in a time so maximum size of the send and receive windows is:
Hence, Maximum size of the send windows is
and receive window is
.
Maximum size of the send and receive windows for Go-Back-N protocol:
• This protocol sends only 1 packet in a time so maximum size of the send windows is:
• Receiver window receives only 1 batch in a time so window size is:
Hence, Maximum size of the send windows is
and receive window is
Maximum size of the send and receive windows for Selective Repeat protocol:
• Maximum size of the sending window is:
• Receiver window receives only 1 batch in a time so window size is:
Hence, Maximum size of the send windows is
and receive window is
.
• Stop-and-Wait protocol is connection oriented protocol.
• In this type of protocol, system send packet and waits for the acknowledgement.
• After getting the acknowledgement from the receiver sends next packet.
• This protocol prevents the duplicity of the message packet.
Go-Back-N protocol:
• Working procedure of the Go-Back-N protocol is same as Stop-and-Wait protocol.
• In this type of protocol system send multiple packets in a time and waits for the acknowledgement.
• After getting the acknowledgement from the receiver sends batch of the multiple packet.
• If any batch is packet of the batch is missed then sends full batch to the receiver.
Selective Repeat protocol:
• In Go-Back-N protocol, if any batch is packet of the batch is missed then sends full batch to the receiver.
• In Selective Repeat protocol, only those packets are send which are missed or lost in the network.
Consider the following details:

• This protocol multiple packet in a time so maximum size of the send and receive windows is:



Maximum size of the send and receive windows for Go-Back-N protocol:
• This protocol sends only 1 packet in a time so maximum size of the send windows is:




• Maximum size of the sending window is:




3
Show the FSM for an imaginary machine with three states: state A (starting state), state B, and state C; and four events: events 1, 2, 3, and 4. The following specify the behavior of the machine:
a. When in state A, two events may occur: event 1 and event 2. If event 1 occurs, the machine performs action 1 and moves to state B. If event 2 occurs, the machine moves to state C (no action).
b. When in state B, two events may occur: event 3 and event 4. If event 3 occurs, the machine performs action 2, but remains in state B. If event 4 occurs, the machine just moves to state C.
c. When in state C, the machine remains in this state forever.
a. When in state A, two events may occur: event 1 and event 2. If event 1 occurs, the machine performs action 1 and moves to state B. If event 2 occurs, the machine moves to state C (no action).
b. When in state B, two events may occur: event 3 and event 4. If event 3 occurs, the machine performs action 2, but remains in state B. If event 4 occurs, the machine just moves to state C.
c. When in state C, the machine remains in this state forever.
Finite State Machine (FSM):
A Finite state machine has finite number of states with following rules:
• The machine must be in one of the state for every time.
• It changes its state when an event occurs.
• Every event occurs upon the two reactions which are given below:
o Empty of actions performed by the event.
o Determines the next of when event occurs.
• Initial state must be defined because, it must know in which state machine starts.
FSM for an imaginary machine:
An FSM of an imaginary machine with three states A, B and C are shown below:
State A:
• Initial state is A which is shown in above figure.
• Machine changes its state from A to B, when an Event 1 occurs and performs Action 1.
• Machine changes its state from A to C, when an Event 2 occurs but it doesn't perform any Action (Empty action mentioned in the rules of FSM).
State B:
• In state B, machine performs Action 2 causes occurrence of event 3 but, machine doesn't changes its state.
• Machine changes its state to C when an event 4 occurs by performing empty Action (none).
State C:
• State C is the dead state which means, it does not changes its state because performs any type of actions to occurrence of an event.
A Finite state machine has finite number of states with following rules:
• The machine must be in one of the state for every time.
• It changes its state when an event occurs.
• Every event occurs upon the two reactions which are given below:
o Empty of actions performed by the event.
o Determines the next of when event occurs.
• Initial state must be defined because, it must know in which state machine starts.
FSM for an imaginary machine:
An FSM of an imaginary machine with three states A, B and C are shown below:

• Initial state is A which is shown in above figure.
• Machine changes its state from A to B, when an Event 1 occurs and performs Action 1.
• Machine changes its state from A to C, when an Event 2 occurs but it doesn't perform any Action (Empty action mentioned in the rules of FSM).
State B:
• In state B, machine performs Action 2 causes occurrence of event 3 but, machine doesn't changes its state.
• Machine changes its state to C when an event 4 occurs by performing empty Action (none).
State C:
• State C is the dead state which means, it does not changes its state because performs any type of actions to occurrence of an event.
4
Redesign the FSM in Figure 13.15 if the connection establishment is done with only three packet exchange (combining packet 2 and 3).
Figure 13.15 Connectionless and connection-oriented service represented as FSMs
Figure 13.15 Connectionless and connection-oriented service represented as FSMs

Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
5
Redraw Figure 13.18 with 5 packets exchanged (0, 1, 2, 3, 4). Assume packet 2 is lost and packet 3 arrives after packet 4.
Figure 13.18 Flow diagram for Example 13.3
Figure 13.18 Flow diagram for Example 13.3

Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
6
Create a scenario similar to Figure 13.21 in which the sender sends three packets. The first and second packets arrived and acknowledged. The third packet is delayed and resent. The duplicate packet is received after the acknowledgment for the original to be sent.
Figure 13.21 Flow diagram for Example 13.4
Figure 13.21 Flow diagram for Example 13.4

Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
7
Create a scenario similar to figure 13.21 in which the sender sends two packets. The first packet is received and acknowledged, but the acknowledgement is lost. The sender resends the packet after time-out. The second packet is lost and resent.
Figure 13.21 Flow diagram for Example 13.4
Figure 13.21 Flow diagram for Example 13.4

Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
8
Redraw Figure 13.28 if the sender sends 5 packets (0, 1, 2, 3, and 4). Packets 0, 1, and 2 are sent and acknowledged in one single ACK, which arrives at the sender site after all packets have been sent. Packet 3 is received and acknowledged in a single ACK. Packet 4 is lost and resent.
Figure 13.28 Flow diagram for Example 13.7
Figure 13.28 Flow diagram for Example 13.7

Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
9
Redraw Figure 13.34 if the sender sends 5 packets (0, 1, 2, 3, and 4). Packets 0, 1, and 2 are received in order and acknowledged, one by one. Packet 3 is delayed and received after packet 4.
Figure 13.34 Flow diagram for Example 13.10
Figure 13.34 Flow diagram for Example 13.10

Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
10
Answer the following questions related to the FSMs for the Stop-and-Wait protocol (Figure 13.20):
Figure 13.20 FSM for the Stop-and-Wait protocol
a. The sending machine is in the ready state and S = 0. What is the sequence number of the next packet to send?
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.
c. The receiving machine is in the ready state and R = 1. A packet with the sequence number 1 arrives. What is the action in response to this event?
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?
Figure 13.20 FSM for the Stop-and-Wait protocol

a. The sending machine is in the ready state and S = 0. What is the sequence number of the next packet to send?
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.
c. The receiving machine is in the ready state and R = 1. A packet with the sequence number 1 arrives. What is the action in response to this event?
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?
Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
11
Answer the following questions related to the FSM's for the Go-back- N protocol with m = 6 (Figure 13.26):
Figure 13.26 FSM for the Go-Back- N protocol
a. The sending machine is in the ready state with S f = 10 and S n = 15. What is the sequence number of the next packet to send?
b. The sending machine is in the ready state with S f = 10 and S n = 15. A time-out occurs. How many packets are to be resent? What are their sequence numbers?
c. The sending machine is in the ready state with S f = 10 and S n = 15. An ACK with ackNo = 13 arrives. What are the next values of S f and S n ?
d. The sending machine is in the blocking state with S f = 14 and S n = 21. What is the size of the window?
e. The sending machine is in the blocking state with S f = 14 and S n = 21. An ACK with ackNo = 18 arrives. What are the next values of S f and S n ? What is the state of the sending machine?
f. The receiving machine is in the ready state with R n = 16. A packet with sequence number 16 arrives. What is the next value of R n ? What is the response of the machine to this event?
Figure 13.26 FSM for the Go-Back- N protocol

a. The sending machine is in the ready state with S f = 10 and S n = 15. What is the sequence number of the next packet to send?
b. The sending machine is in the ready state with S f = 10 and S n = 15. A time-out occurs. How many packets are to be resent? What are their sequence numbers?
c. The sending machine is in the ready state with S f = 10 and S n = 15. An ACK with ackNo = 13 arrives. What are the next values of S f and S n ?
d. The sending machine is in the blocking state with S f = 14 and S n = 21. What is the size of the window?
e. The sending machine is in the blocking state with S f = 14 and S n = 21. An ACK with ackNo = 18 arrives. What are the next values of S f and S n ? What is the state of the sending machine?
f. The receiving machine is in the ready state with R n = 16. A packet with sequence number 16 arrives. What is the next value of R n ? What is the response of the machine to this event?
Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck
12
Answer the following questions related to the FSM's for the Selective-Repeat protocol with m = 7 bits (Figure 13.33):
Figure 13.33 FSMs for SR protocol
a. The sending machine is in the ready state with S f = 10 and S n = 15. What is the sequence number of the next packet to send?
b. The sending machine is in the ready state with S f = 10 and S n = 15. The timer for packet 10 times out. How many packets are to be resent? What are their sequence numbers?
c. The sending machine is in the ready state with S f = 10 and S n = 15. An ACK with ackNo = 13 arrives. What are the next values of S f and S n ? What is the action in response to this event?
d. The sending machine is in the blocking state with S f = 14 and S n = 21. What is the size of the window?
e. The sending machine is in the blocking state with S f = 14 and S n = 21. An ACK with ackNo = 14 arrives. Packets 15 and 16 have been already acknowledged. What are the next values of S f and S n ? What is the state of the sending machine?
f. The receiving machine is in the ready state with R n = 16. The size of the window is 8. A packet with sequence number 16 arrives. What is the next value of R n ? What is the response of the machine to this event?
g. The receiving machine is in the ready state with Rn = 16. The size of the window is 8. A packet with sequence number 18 arrives. What is the next value of Rn ? What is the response of the machine to this event?
h. The receiving machine is in the ready state with Rn = 16. The size of the window is 8. A packet with sequence number 18 arrives. What is the next value of Rn ? What is the response of the machine to this event?
Figure 13.33 FSMs for SR protocol

a. The sending machine is in the ready state with S f = 10 and S n = 15. What is the sequence number of the next packet to send?
b. The sending machine is in the ready state with S f = 10 and S n = 15. The timer for packet 10 times out. How many packets are to be resent? What are their sequence numbers?
c. The sending machine is in the ready state with S f = 10 and S n = 15. An ACK with ackNo = 13 arrives. What are the next values of S f and S n ? What is the action in response to this event?
d. The sending machine is in the blocking state with S f = 14 and S n = 21. What is the size of the window?
e. The sending machine is in the blocking state with S f = 14 and S n = 21. An ACK with ackNo = 14 arrives. Packets 15 and 16 have been already acknowledged. What are the next values of S f and S n ? What is the state of the sending machine?
f. The receiving machine is in the ready state with R n = 16. The size of the window is 8. A packet with sequence number 16 arrives. What is the next value of R n ? What is the response of the machine to this event?
g. The receiving machine is in the ready state with Rn = 16. The size of the window is 8. A packet with sequence number 18 arrives. What is the next value of Rn ? What is the response of the machine to this event?
h. The receiving machine is in the ready state with Rn = 16. The size of the window is 8. A packet with sequence number 18 arrives. What is the next value of Rn ? What is the response of the machine to this event?
Unlock Deck
Unlock for access to all 12 flashcards in this deck.
Unlock Deck
k this deck