Extra Questions about TCP

advertisement
King Saud University
College of Computer and Information Sciences
Department of information technology
1st semester 1433/1434
IT 424
Extra Questions about TCP
Answer the following questions:
Q1: The following is a dump of a TCP header in hexadecimal format:
00CD0018 00000EF1 00000D5D 702200D1 01BF0010
Please answer the following two parts of questions:
1.
2.
3.
4.
5.
6.
7.
8.
What is the source port number?
What is the destination port number?
What is the sequence number?
What is the acknowledgment number?
What is the length of the header?
Which control bits are set? And what do they represent?
What is the window size?
What does the last four digits ‘0010' of the above dump represent? What
action will the destination node take when it receives this packet?
Q2: When a host A receives two SYN segments from the same port of a host B, the second
SYN can be a retransmission of the original SYN or a new request for connection (in the case of
a failure followed by a restart of B). How does A differentiate between these two cases?
Q3: The TCP connection in the following figure corresponds to the transfer of 4 Web pages
from a Web server to a Web browser. We assume that the size of the request of the Web page is
100 bytes and the returned Web page is 1000 bytes. There are no transmission errors.
1. Complete the sequence numbers and acknowledgment numbers missing in the figure.
1
Web Browser
Web Server
Seq 143256 ,
SYN (0)
SYN
Seq 250712 , Ack …………
SYN, ACK (0)
Seq 143257 , Ack ………….
ACK (100)
Seq 250713 , Ack …………..
ACK (1000)
Seq …………. , Ack ………….
ACK (100)
Seq ………….. , Ack ………….
ACK (1000)
Seq ………….. , Ack ………….
ACK (100)
Seq ………….. , Ack ………….
ACK (1000)
2
Seq ……………. Ack…………
ACK (100)
SYN
Seq …………. , Ack …………..
ACK (1000)
Seq ………….. , Ack ………
FIN, ACK (0)
Seq ………….. Ack ……………
ACK (0)
Seq …………… , Ack …………
FIN, ACK (0)
Seq : ………….. Ack ………….
ACK (0)
3
2. What is the role of each segment?
Segment 1:
Segment 2:
Segment 3:
Segment 5,7,9:
Segment 4, 6, 8, 10:
Segment 11:
Segment 12:
Segment 13:
Segment 14:
Q4:
We consider a network of two routers. The first router connects a client1 and the second router
connects a client 2. Both clients use the TCP connection to the network.
Client1
R1
R2
Client2
a) Must the routers have TCP software?
b) In fact, the client1 mainly performs a file transfer FTP to client2 on port 21. The emitted
fragments have a length of 8000 bits. The first segment has the sequence number 1. What is the
sequence number of the second segment?
c) Suppose that the ACKs are grouped for every four segments receipts. What is the value given
in the acknowledgment field of the first acknowledgment packet?
4
Q5:
Consider the following exchange
No seg
source
dest
No seq
No ack
flag
1
2
C1/ P1
C2/ P2
C2/ P2
C1/ P1
0
0
X
………
3
4
5
6
7
8
9
C1/ P1
C1/ P1
C2/ P2
C1/ P1
C1/ P1
C2/ P2
C2/ P2
C2/ P2
C1/ P1
C2/ P2
C2/ P2
C1/ P1
………
1
0
………
2001
0
………
1
1001
1
1
2001
SYN
SYN/
ACK
ACK
ACK
ACK
ACK
ACK
ACK
Wind
size
X
X
Data size
X
4096
4096
4096
4096
4096
0
………
………
1000
1000
0
0
0
● Specify the correct values in the blanks.
● What is the total amount of data the computer C1/P1 can send without receiving ack (seg 9 and
following)?
Q6:
Host A and B are directly connected with a 200Mbps link. There is one TCP connection between
the two hosts, and host A is sending to host B a huge file over the connection. Host A can send
application data into the link at 100Mbps. But host B can read out its TCP recieve buffer at a
maximum rate of 50Mbps. Describe the effect of TCP flow control.
Q7:
Host A is sending a huge file to host B over a TCP connection. No packet is lost and timers never
expire. Denote the transmission rate of the link connecting A to the internet by R bps. Say that A
can send data into its TCP socket at rate 10 · R bps. Also, say that B has a buffer that can contain
all the file while A can hold only 1/100 of the file. What would prevent A from continuously
passing data to its TCP socket at 10 R bps?
5
Download