Module 3 Tutorial Question
Transport Layer (Forouzan Chapter 13)
Daniel Franklin
March 12, 2024
13.1 A sender sends a series of packets to the same destination using 5-bit sequence of num-
bers. If the sequence number starts with 0, what is the sequence number of the 100th packet?
13.3 Show the finite state machine 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 behaviour of the machine:
1. 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).
2. 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.
3. When in state C, the machine remains in this state forever.
13.5 Redraw Figure 1 with 5 packets exchanged (0, 1, 2, 3, 4). Assume packet 2 is lost and
packet 3 arrives after packet 4.
Sender Receiver Events:
Transport Transport Req: Request came from process
layer layer pArr: Packet arrived
Req Packet
pArr
Req Packet
pArr
Time Time
Figure 1: Figure 13.18 (Foruzan problem 13.5)
13.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.
13.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.
1
13.11 Answer the following questions related to the finite state machines for the Go-back-N
protocol with m = 6 (Figure 2):
Sender
Note:
All arithmetic equations Request from process came.
are in modulo 2m. Make a packet (seqNo =Sn) . Time-out.
Store a copy and send the packet. Resend all outstanding
Start the timer if it is not running. Window full packets.
Time-out. Sn =Sn +1. (Sn =Sf +SSize)? Restart the timer.
Resend all outstanding [true]
packets. [false]
Restart the timer.
Ready Blocking
A corruptedACK or an Error freeACK with ackNo between A corruptedACK or an
error-freeACK with ackNo Sf and Sn arrived. error-freeACK with ackNo
outsidewindow arrived. Slide window (Sf =ackNo). outsidewindow arrived.
Discard it. If ackNo equals Sn, stop the timer. Discard it.
If ackNo <Sn, restart the timer.
Receiver
Note: Error-freepacket with
All arithmetic equations seqNo =Rn arrived.
are in modulo 2m. Deliver message.
Slide window (Rn =Rn +1).
Send ACK (ackNo =Rn).
Ready Error-freepacket
Corrupted packet arrived. with seqNo ! =/ Rn arrived.
Discard packet. Discard packet.
Send an ACK (ackNo =Rn).
Figure 2: Foruzan problem 13.11
1. The sending machine is in the ready state with Sf = 10 and Sn = 15. What is the sequence
number of the next packet to send?
2. The sending machine is in the ready state with Sf = 10 and Sn = 15. A time-out occurs.
How many packets are to be resent? What are their sequence numbers?
3. The sending machine is in the ready state with Sf = 10 and Sn = 15. An ACK with
ackNo = 13 arrives. What are the next values of Sf and Sn?
4. The sending machine is in the blocking state with Sf = 14 and Sn = 21. What is the size
of the window?
5. The sending machine is in the blocking state with Sf = 14 and Sn = 21. An ACK with
ackNo = 18 arrives. What are the next values of Sf and Sn? What is the state of the
sending machine?
6. The receiving machine is in the ready state with Rn = 16. A packet with sequence number
16 arrives. What is the next value of Rn? What is the response of the machine to this
event?
14.1 In cases where reliability is not of primary importance, UDP would make a good trans-
port protocol. Give examples of specific cases.
14.3 Show the entries for the header of a UDP user datagram that carries a message from
a TFTP client to a TFTP server. Fill the checksum field with 0s. Choose an appropriate
ephemeral port number and the correct well-known port number. The length of data is 40
bytes. Show the UDP packet using the format in Figure 14.2.
14.5 A TFTP server residing on a host with IP address [Link] sends a message to a
TFTP client residing on a host with IP address [Link]. What is the pair of sockets used
in this communication?
2
14.7 A client uses UDP to send data to a server. The data length is 16 bytes. Calculate the
efficiency of this transmission at the UDP level (ratio of useful bytes to total bytes).
14.8/9 Redo Exercise 14.7, calculating the efficiency of transmission at the IP level. Assume
no options for the IP header.
14.9 Redo Exercise 14.7, calculating the efficiency of transmission at the data link layer.
Assume no options for the IP header and use Ethernet at the data link layer.