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