Week 8 Flashcards
What is TCP? What are its features?
Transmission Control Protocol
- Connection-oriented
- Reliable
What is meant by TCP being connection oriented?
- A virtual circuit established between two devices
- To the application, connections appears to be a point-to-point full duplex connection
- Messages split into segments for transmission
What is meant by TCP being reliable?
- Errors are detected and corrected
- Segments are re-assembled in the correct order
Difference between simplex, duplex and half duplex?
Simplex = One device sends and one recieves
Duplex = Both devices send and recieve at the same time
Half duplex = Both devices can send and recieve but not at same time, have to wait turns recieving and sending
Are TCP segments enveloped?
Yes, evnveloped in IP packets
What use TCP?
HTTP
SMTP
IMAP
SSH
Why can it be detrimental to send too many TCP segments at once?
May overload recieved or intermediate path with lower bandwidth
Why should we transmit TCP segments?
- Sending too large segments requires IP to fragment
- Large segments also increase errors
What are the two approaches to determine TCP segment size?
- Use reasonable MTU
2. Use Path MTU Discovery (PMTUD)
What is a ‘reasonable’ MTU?
This is accepting that sometimes IP needs to fragment.
What is Path MTU Discovery?
- Sends IP packets to destinations, asking routers to NEVER fragment
- If router HAS to fragmentm, return ERROR
- Increase packet length until error occurs, use last known error-free MTU
How to manage TCP congestion?
- Start slow: Wait for ACK after each segment
- Increase speed with each ACK: sending more segments each time
- Fall back to slower speed when no ACK arrived (packet lost)
What does the data link layer do to frames that have errors?
Discards frames with errors
Why is TCP reliable?
Because of TCP ARQ (Automatic Repeat ReQuest)
- Echange ACKs letting sender know that packets where recieved correctly
- Sender re-transmits if no ACK recieved within certain time
What numbers does a TCP packet include?
- Sequence Number - How many bytes we’ve transmitted
- Acknowledgement number - How many bytes reciever recieved from sender
IF seq != ack then recived incorrectly