Term
What are the key features of Transmission Control Protocol (TCP) |
|
Definition
- Connection oriented
- Includes ACKs and retransmissions
- Provides flow/congestion control
|
|
|
Term
What are the key features of UDP? |
|
Definition
- Connectionless
- Retransmission/adaptation is up to application
- No flow control
|
|
|
Term
What does the Transmission Control Protocol (TCP) provide? |
|
Definition
- Provides performance and reliability on an otherwise unreliable IP service
- Connection management
- Flow control
- Adapts sending rate to capacity of receiver
- Congestion control
- Backs off in the event of observed packet loss
- Data transmission (and retransmission)
- Unacknowledged segments resent by TCP
- Reassembly of datagrams in the correct order
|
|
|
Term
What is the TCP service model? |
|
Definition
- A sender and receiver create sockets to act as communication endpoints
- Sockets consist of ip address and port number
- Needs connection identifier
|
|
|
Term
What does a socket of an IP address and port number consist of? |
|
Definition
- Port numbers are 16-bit transport endpoint identifiers
- e.g. 152.78.70.1, port 80
- Applications have some API through which they can use sockets to send/receive data, e.g. Berkeley API
|
|
|
Term
What do connection identifiers consist of? |
|
Definition
- Protocol (TCP)
- Source and destination IP address
- Source and destination port number
- This (and other) information is held in Transmision Control Block
|
|
|
Term
Give an example of Berkeley sockets |
|
Definition
|
|
Term
How is a TCP connection established? |
|
Definition
- Server binds() and listens() for client
- Client waits for server
- Client creates TCB, and sends SYN
- Server receives SYN and sends SYN+ACK
- Client receives SYN+ACK and sends ACK
- Client sets as connection established
- Server receives ACK and sets connection established
|
|
|
Term
Show an example of Connection establishment with TCP |
|
Definition
|
|
Term
How is a TCP connection released? |
|
Definition
- Client and servers have established connections
- Client receives close signal from APP, sends FIN
- Client waits-1
- Server receives FIN, and sends ACK, tell App to close
- Server waits for app
- Client Receives ACK
- When app is ready to close, server sends FIN
- Client receives FIN, sends ACK
- Client waits for Double Maximum Segment Life (MSL)
- Server receives ACK and closes its connection
- Client finishes waiting and closes connecition
|
|
|
Term
Show an example of how a connection is released |
|
Definition
|
|
Term
What is client-server operation on ports in regards to a TCP connections? |
|
Definition
- A client will pick a "random" high port number >1024 (Exact method varies on OS)
- Server will use pre-configured number (well known)
- For efficiency, server might have dedicated process listening on all configured service ports
- Spawns a new process to handle incoming service connections when needed
- Some applications may be run directly
|
|
|
Term
|
Definition
- Sends segments of data to receiver
- Maximum Segment Size (MSS) usually chosen based on link's MTU
- Uses 32-bit sequence number for the data
- Number represents the position in the byte sequence of the data being sent
- Segments are used both when data is sent and when data is received
|
|
|
Term
How does the 32-bit sequence number for TCP data segments work? |
|
Definition
- Represents position in the byte sequence of the data being sent
- If first segment has sequence number N, next segment woul dbe N + X if the first segment is X bytes long
- N should be unpredictable to an eavesdropper
- Sequence numbers are used both when data is sent and when it is received
- In an ACK, the next sequence number the receiver is expecting to receive
|
|
|
Term
|
Definition
|
|
Term
What are the characteristics of TCP flow control |
|
Definition
- TCP uses a sliding window protocol to help control the sending rate
- Should not send data unless receiver indicates it has buffer space to accept it
- Otherwise the data is likely to be dropped and the sender will only have to resend it later
- The "sliding window" is effectively the buffer space the receiver says it has available at any give time
- Changes over time because TCP traffic tends not to be a consistent bit rate
|
|
|
Term
How does the TCP flow control sliding window operate? |
|
Definition
- The sender sends a segment with a sequence number and starts a timer
- The receiver replies with a segment with an acknowledgement number showing next sequence number it expects to receive and its available window size
- If sender's timer goes off before this ACK is received, the sender retransmits
- If the receiver sais its window size is 0, the sender should not send more data until the receiver sends a new ACK indicating it has capacity
|
|
|
Term
What are the principles of TCP congestion control? |
|
Definition
- The TCP congestion window indicates the number of bytes a sender may put in the network at a give time
- The congestion window size starts low, and starts incrementing every RTT
|
|
|
Term
What is the TCP congestion window? |
|
Definition
- Indicates the number of bytes a sender may put into the network at a given time
- Packet loss is an indication of congestion
- Runs alongside the receiver's sliding window
- Use the smaller of the two windows when sending
|
|
|
Term
What are some characteristics of the TCP congestion window size? |
|
Definition
- Starts low
- Usually send one segment initially, and wait for the ACK before sending further segments
- Until loss is detected, TCP increases the number of segments it sends each tiem before receiving ACKs
- TCP typically doubles the window every RTT
|
|
|
Term
What is the congestion window threshold? |
|
Definition
- The window size grows until it reaches the threshold - after, the window size only grows additively
- At this point, we add one segment to the window size per successful RTT
- If there is congestion (Packet loss) then threshold is lowered and slow start process repeats
|
|
|
Term
What are some fundamentals of TCP performance? |
|
Definition
- Designed to make best use of available bandwidth
- With consideration for other clients it is "competing" with and for receiver capacity
- Work has been done on different TCP algorithms
- Tahoe, Reno, Vegas, Hybia, etc
- TCP behaviour can't fix problems caused by other protocols
- Large buffering in devices may "trick" TCP
- May no longer get timely notifications of congestion
|
|
|
Term
What are the principles of User Datagram Protocol (UDP)? |
|
Definition
- Connectionless
- Sender just fires a datagram at a receiver
- No UDP acknowledgements
- If retransmission is required, that is the down to the application to do
- UDP applications often use a constant data rate
- Low overhead
|
|
|
Term
|
Definition
|
|
Term
What are the principles of Real-Time Transport Protocol (RTP)? |
|
Definition
- Good example use case of UDP
- Designed for sending multimedia data
- RTP packets have their own RTP header
- Includes sequence number and timing fields
- Allows synchronization of parallel RTP streams
- RTP Control Protocol can report RTP loss
- Used by many common video streaming apps
- Used by multicast video/audo apps
|
|
|
Term
|
Definition
|
|
Term
Give some characteristics of how TCP would deal with video streaming e.g. youtube |
|
Definition
- Client connects via TCP (http) and receives the video data, buffering it if possible before playback
- On a fast link, the client can typically buffer far ahead if watching a pre-recorded video
- Possibly download the whole video while only part played
- Problematic if link capacity not enough, and TCP backs off
|
|
|
Term
Give some characteristics of how UDP would deal with video streaming e.g. VLC |
|
Definition
- Typically uses RTP
- Immediate, with limited buffering, no retransmission
- May experience "glitches" in video, rather tahn video hanging, in the event of congestion
- Well-suited to live video
- RTCP allows sender to adapt rate/quality if it can
- Less overhead
- Very well-suited to multicast
- UDP datagram replicated to all receivers in a group
|
|
|