Assignment
State transition diagrams and state transition matrices are good ways to visualize complex processess.
An example of a complex process is the tcp/ip final state machine. The description below is for a slightly
simplified version.
1) Draw the state transition diagram. (6p)
2) Construct the corresponding state transition matrix. (4p)
Assignment description
Initiating the connection
The tcp/ip final state state machine starts ininitally in the closed state. From this
state a connection can either be initiated by a passive open, where the server opens
a port and waits for incoming connections in the listen state, or with an active open
where the client tries to connect to another, allready opened, socket in the syn sent state.
From the listen state the machine can either enter the syn recieved state or the
syn sent state.
If the reset flag of a packet is recieved during the syn recieved
state the machine is reset and reenters the closed state. Normally however an acknowledge
is recieved in which the established state is entered.
The established state, where all data is actually transfered and the majority of time is spent,
can allso be entered from the syn sent state if a packet with both the syn and ack
flags are set.
Closing the connection
The local computer may choose to close the active connection from either the syn recieved or
established state by doing a app close, this results in the machine entering the
active close state where both computers agree on terminating the connection.
The remote computer may decide to close the active connection during the established state,
in such a case the passive close state is entered. This is often referred to as an network close.
Timeout
If no response is recieved the machine may do a timeout resulting in the closed state from either
the syn recieved, syn sent, active close or the passive close states.
Correction guidelines
A total of 14 transitions exists in the descriptions. If only one or two is missing full points should be awarded
for both assignment one and two.
Assignment 1
For a sollution showing a clear understanding of the state transition diagram model 2p should be awarded.
0.5p should be deducted from the remaining 4p for each missing transition. Maximum deduction is thus 4p
of the total 6p.
Assignment 2
A sollution demonstrating a clear understanding of the state transition matrix will give atleast 1p. 0.25p
should be deducted for each missing transition from the remaining 2p. Maximum deduction is 2p out of
the total 3p.
Example state transition diagram
Example state transition matrix
. | 1 close | 2 listen | 3 syn recieved | 4 syn sent | 5 established | application close | network close |
passive open | 2 | . | . | . | . | . | . |
active open | 4 | . | . | . | . | . | . |
listen-syn recieved | . | 3 | . | . | . | . | . |
connection reset | . | . | 2 | . | . | . | . |
listen-syn sent | . | 4 | . | . | . | . | . |
syn recieved-established | . | . | 5 | . | . | . | . |
syn sent-establisehd | . | . | . | 5 | . | . | . |
application close | . | . | 6 | . | 6 | . | . |
passive close | . | . | . | . | 7 | . | . |
timeout | . | . | 1 | 1 | . | 1 | 1 |