slides21 Flashcards
who came first tcp or udp
tcp
header of udp
16 bit source port
16 bit destination port
16 bit UDP length
16 bit UDP checksum
is checksum important in UDP
no, unreliable so fine
how does udp compare with other headers
much slimmer
where is udp useful
single request and reply
Where a fast response is required
Where speed is more important than accuracy
what is the procedure when a udp is lost
up to application
tcp challenge
create reliability over unreliability
what is ACK
The basis of the reliability is the use of acknowledgement (ACK) packets for every packet sent
If host A sends host B a packet, B must send an ACK packet back to A to inform it of the safe arrival of the packet
If A does not get an ACK, it resends the packet
Two Armies Problem
infinite exchange of acks
TCP avoids the Two Armies Problem by using timeouts and packet retransmissions
Problems to solve with acks
how long to wait before a resend?
how many times to resend before giving up? how long B should wait before sending the ACK?
IP datagrams can arrive out of order
Problems to solve with tcp
how to maintain order in the data
how to manage duplicates
flow control
TCP packets are often called…
segments
what are the most important headers of tcp
sequence and acknowledgement 32bits each
given Every byte in a TCP connection is numbered, how is data “counted”
The 32 bit sequence number starts at some random value and increases by 1 for each byte sent
So if a segment contains 10 bytes of data, the sequence number on the next segment sent will be 10 greater
how does tcp implement full duplex
by keeping independent sequence numbers and flow control