TCP UDP and Reliable Data Transfer Mechanisms Flashcards
What are the responsibilities of the transport layer service
- Provide logical communication between application processes running on different hosts
How do transport protocols run? And what does this mean?
They run in end systems meaning the send side breaks application messages into segments and the receiver side reassembles segments into messages to pass to the application layer.
What are 2 main forms of transport layer protocol?
TCP and UDP (transmission control protocol) (user datagram protocol)
What does UDP provide? 4
- Unreliable connectionless transport layer protocol
- demultiplexes IP packets
- Error checking of data
- Has multiple applications in the host
What kind of services is UDP used by?
- Streaming media
What famous services sometimes go on top of UDP?
- SNMP
-DHCP - DNS
What happens if a UDP segment checksum field returns incorrect?
We dump the segment
What is TCP?
connection-oriented data streaming service transport layer protocol
What does TCP provide? 4
- Full duplex reliable mechanisms (go back n, selective repeat)
- A recovery mechanism for out-of-order packets, duplicates, lost packets, corrupt packets
- Flow and congestion control mechanisms
- Support for multiple application processes in the same system
In reliable data transfer (RDT) what are two things that can accidentally trigger a resend leading to unnecessary loss?
- Premature timeout
- Delayed acknowledgement
What are 2 RDT mechanisms?
- Stop and wait
- Sliding Window protocol
How does TCP initiate a connection?
- 3-way handshake: send connecting signal with initial SYN message, server sends TCP SYNACK msg, to ack the SYN then client sends an ACK to server –> connection is established
Where does the senders window start and end from for TCP?
First segment in window is the first that has been sent, but not yet ACKED in return, and the last element of the window will one that is ready to be sent but not yet sent.
When sending a segment with a sequence number –> if the previous ACK had number 92 and the previous Sequence had number = 27, what will the next sequence number and returning ACK be?
- Next sequence number : 92
- Next ACK: 28
(next sequence is same as previous ACK - next ACK is one more than previous sequence)
How does TCP close its connection?
- 4 way handshake
- client initiates with .close() command
- FINbit is sent
- Server responds with ACK
- Then server sends its own FINbit and then when it receives the last ACK to its FINbit from client, connection is fully shut
What kind of service does TCP provide and where?
TCP provides reliable data transfer service on top of IP connectionless service
What 3 things does TCP do to increase reliability?
- Pipelined sliding window segments so we can have a window size.
- Cumulative acknowledgements
- Single retransmission timer
What are retransmissions triggered by? (2)
- Timeout events
- Duplicate acknowledgements
How does TCP implement flow control?
It has a TCP socket buffer where it stores segments going to application layer, and another where segments going down to the network layer are stored too.
What are 2 congestion control approaches that can be followed? And which is taken by TCP?
- Network-assisted congestion control
- End to end congestion control (taken by TCP)
What is network assisted congestion control?
- Routers provide feedback to end systems such as:
- There is a single bit indicating congestion
- Explicit rate for sender to send at
What is end to end congestion control?
- No explicit feedback from system aka from network routers
- Congestion is inferred from end-system observed loss and delay (aka not receiving ACKS , buffers getting filled.)
What are some causes of congestion?
- If there is no space in the dedicated buffer (the new packets will either be dumped or will timeout
- The shared output link buffers are often bottlenecks
What happens as segments keep on getting added to the network traffic?
The throughput will increase initially and then the system will become congested, if this continues, throughput will reduce to 0, this happens when rate of entry is about half the system capacity (C/2)