Ans_NET331_Sheet2

advertisement
Kingdom of Saudi Arabia
Prince Norah bint Abdul Rahman University
College of Computer Since and Information System
NET331
Answers of Sheet (2)
T.Najah Al-Subaie
Q1) The following is a dump of a TCP header in hexadecimal format.
00CD0019 00000EF1 00000D5D 502200D1 01BF0010
a. What is the source port number?
Source port 00CD=205
b. What is the destination port number?
Destination port 0019 (SMPT email)=25
c. Is the packet directed from a client to sever or vice versa?
Since the destination port is a well known port number then the packet is directed
from a client to server.
d. What is the client process?
(SMPT email)
e. What is the sequence number?
Sequence number 00000EF1=3825
f.
What is the acknowledgment number?
Acknowledgment number: 00000D5D=3421
g.
What is the value of the header length field and what is the length of the
header?
Header length field: 5
Header length = 4*5=20
h.
Which control bits are set? And what do they represent?
Control bits set: URG and SYN
URG means segment is urgent
SYN flag synchronizes sequence numbers to initiate a TCP connection
Q2) TCP opens a connection using an ISN of 12,000. The other party opens the
connection with an ISN of 13,340. After the connection has been established, the
client sends a packet of 15 bytes. Then, the server replies with a packet of 20
bytes. But the server's packet was lost. After handling this event, the connection
was terminated. Draw a figure that shows this scenario (show the connection
establish, data transfer, connection release phases). Justify your solution.
Q3) Consider hosts A and B communicating over a TCP connection. Assume
unrealistically that the initial sequence number for each of A and B is 0. Assume
that all segments sent between A and B have 20 byte headers. A sends B a
segment with a 20 byte payload, B responds with a segment with a 30 byte
payload and then another segment with a 40 byte payload, and finally A
responds with a segment with a 50 byte payload. Give the value of the sequence
number field and acknowledgement number fields for each segment.
Download