slides22 Flashcards
purpose of flow control
TCP implements flow control, i.e., adjusting the rate of sending packets up or down to make best use of current conditions
(a) in the network and (b) in the receiving host
what is the advertised window
The destination has only a limited amount of buffer memory it can store new segments in
If the application is not reading the data as fast as it arrives, the buffer will fill up
The window size is the amount of buffer the receiver has left: the receiver sends this value in each segment going back to the sender
If the amount is very small, the sender can slow down sending until space in the receiver is freed up
Urgent pointer (URG flag)
The urgent pointer is a pointer into the data stream that indicates where the current urgent data block ends
Urgent data includes things like interrupts that need to be processed before any other data that is buffered
The OS should notify the application when an URG is received, e.g., using an interrupt
The OS interrupt code would then read through the urgent data block and act appropriately on what it finds there
PSH
tells OS to get this data to the app straight away.
When the stream of data is all sent, the server would wait a while for convenience in case something else tagged along (all before reporting back to the application). so the PSH at the end of the stream helps the server not to waste time
The destination OS might be holding back data for some reason before passing it on to the application, e.g., collecting together segments into one large buffer for efficiency reasons
Or holding back notifications to the application that data has arrived: again not to swamp the application with loads of notifications of small amounts of data
This flag says send the buffered data to the application, don’t wait
what is the data of an ack only message
nothing, empty
what’s the difference between TCP and IP layer and UDP
TCP is connection oriented
IP is not
UDP is not connection oriented. Each datagram in UDP is treated individually
UDP is a connectionless protocol
describe Setup and Teardown in TCP
get that weak shit outta here, go look at the slides slides22.pdf p45 onwards
three way handshake
These segments in the three way handshake contain no data: they are overhead in setting
up the connection
Overhead in time and overhead in packets on the network After the handshake we can start sending data
The client (first one to initiate) is said to do an active open, while the server does a passive open
If both initiate at the same time, both connections to each other whill be merged into 1
FIN flag
called an orderly release
set to indicate a half close: this indicates no more data will be sent from this end
when is active and passive used in TCP
active is the first host doing something, the other one is passive
RST flag
called abortive release
close connection and drop buffer
MSL
The maximum segment lifetime (MSL) is a value that represents the longest time a segment can live in the network before being discarded
why A TCP connection is required stay in TIME WAIT for twice the MSL
This is in case the final ACK (of the final FIN) was lost and needs to be retransmitted
The OS has to keep the connection hanging around for a little to cover this case
Even if the process that used the connection has exited