Você está na página 1de 3

Lesson 2 TSIN02 Internetworking Ver. 1.

0, Lasse Alfredsson

Exercise 1–6: Multicasting


Exercise 7–9: Transport Layer in general
Exercise 10–20: Transport Layer, UDP & TCP

Exercise 1 Why is there no need for IGMP messages to travel outside its own network?

Exercise 2 Show the socket state table (similar to Fig. 12.11 in the course book, Ed. 4) for a host with
two sockets S1 and S2, where socket S1 is a member of group 232.14.20.54 and socket S2
is a member of group 232.17.2.8.
Socket S1 wants to receive multicast messages only from 17.8.5.2 and socket S2 wants to
receive multicast messages from all sources except 130.2.4.6.

Exercise 3 Show the interface state for the host in Exercise 2.

Exercise 4 The figure below (Fig. 12.14 in the course book) shows an example of a multicast router and
its two state tables, one related to interface m1 and the other one related to interface m2.

Show the state (the new table row) for interface m1 if the router receives a report with the
record telling that a host wants to join the multicast group 232.77.67.60 and it accepts
the messages coming from any source.

Exercise 5 Find the unicast routing tables for the routers R2, R3, and R4 in the figure below
(Fig. 12.18 in the course book). Also, draw the corresponding shortest path trees
in the figure.

1
Lesson 2 TSIN02 Internetworking Ver. 1.0, Lasse Alfredsson

Exercise 6 Find the multicast routing tables for the routers R2, R3, and R4 in the figure below
(Fig. 12.19 in the course book). Also, draw the corresponding shortest path trees
in the figure.

Exercise 7 Using 5-bit sequence numbers (for enumerating data packets), what is the maximum size of
the send and receive windows for each of the following protocols (see Chap. 13.2)?
a) Stop-and-Wait b) Go-Back-N c) Selective-Repeat

Exercise 8 Show the FSM (Finite State Machine) for a certain protocol with three states − state A
(starting state), state B, and state C − and the four events “1”, “2”, “3”, and “4”.
The following scenarios specify the behaviour (events/actions and change of states):
a) When in state A, two events may occur − event 1 and event 2.
If event 1 occurs, the protocol performs Action 1 and moves to state B.
If event 2 occurs, the protocol 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 protocol performs Action 2 but remains in state B.
If event 4 occurs, the protocol just moves to state C (no action).
c) When in state C, the protocol remains in this state forever.

Exercise 9 Create a scenario similar to Figure 13.21 in the course book, 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.

Exercise 10 Are both UDP and IP unreliable to the same degree? Why or why not?

Exercise 11 a) What is the minimum size of a UDP user datagram?


b) What is the maximum size of a UDP user datagram?
c) What is the minimum size of the process data that can be encapsulated in a UDP user
datagram?
d) What is the maximum size of the process data that can be encapsulated in a UDP user
datagram?

Exercise 12 A client uses UDP to send data to a server. The data length is 16 bytes.
a) What is efficiency of this transmission at the transport layer, in terms of the ratio of
data bytes to the total number of transmitted bytes?
b) What is the corresponding efficiency at the network layer (assume no options for the IP
datagram header)?

Exercise 13 TCP uses four different timers. What are they called and what are they used for?

Exercise 14 What is the maximum size and the minimum size of a TCP header?

2
Lesson 2 TSIN02 Internetworking Ver. 1.0, Lasse Alfredsson

Exercise 15 TCP opens a connection using an initial sequence number (ISN) of 14534.
The other party opens the connection with an ISN of 21732.
Show the three segments during the connection establishment.

Exercise 16 TCP is sending data at 1 megabyte per second (8Mbps). If the sequence number starts with
7000, how long does it take before the sequence number goes back to zero?

Exercise 17 Compare the TCP segment header and the UDP datagram header. Make a table, like the one
below, where you list all the fields in the TCP segment header and all the fields in the UDP
datagram header. Explain shortly in the rightmost column the purpose of each field.

Fields UDP TCP Purpose


Source port numbers √ √ You should fill in this field…
…. ….
…. ….

Exercise 18 UDP is a message-oriented protocol, TCP is a byte-oriented protocol.


If an application needs to protect the boundaries of its messages, which protocol should
be used, UDP or TCP?

Exercise 19 In a TCP connection, the value of cwnd is 3000 and the value of rwnd is 5000. The host has
sent 2.000 bytes, which has not yet been acknowledged. How many more bytes can be sent?

Exercise 20 A TCP connection is using a window size of 10.000 bytes and the previous acknowledge-
ment number was 22.001. It receives a segment with acknowledgement number 24.001 and
a window size advertisement of 12.000. Draw a diagram to show the situation of the window
before and after.