in Network

Summary TCP & UDP and some concepts

Introduction

When working at some school assignments I decided to make a summary of all the things that’s coming my way. As I own a website that’s basically explaining or guiding how things work, I decided to share my summary online. This summary is about the TCP, UDP and some of its concepts. If this didn’t answer your question or if you think I’m missing something, please let me know down below in the comment section!

 

User Datagram Protocol (UDP)

Best efforts: Possible data loss while transferring data or data is delivered out of order. There is no handshaking between UDP sender & receiver. This boosts the speed. Each UDP segment is handled independently of others. When reliability is needed, the reliability is added to the application layer (software). The recovery is application-specific which means that Program X may handle to recovery different than Program Y.

 

Transmission Control Protocol (TCP)

Point to point, which means there is one receiver and one sender. It’s reliable as there are no message boundaries with the byte stream. You can choose by yourself how large your bundle of your segment is. Besides that, it’s also pipelined, you can set a window size for congestion and flow control. Full Duplex Data: bi-directional dataflow in the same connection. MSS stands for Maximum Segment Size.

TCP is connection oriented: it ‘handshakes’ with the other side which means they ‘greet’ the other side and exchanges control messages. Last but not least there is also flow control, flow control ensures the sender will not overwhelm the receiver.

 

Pipelining

Pipelining: sender allows multiple ‘in-flight’, yet-to-be-acknowledged packets. The range of sequence numbers must be increased, buffering at sender and/or receiver. There are two generic forms of pipelined protocols: Go-Back-N & selective repeat.

 

Go-Back-N

Sender can have up to N amount of unacked (unacknowledged) packets in the pipeline. Receiver only sends cumulative ack, it doesn’t ack packets if there’s a gap. Sender has a timer for oldest unacked packet, when the timer expires it will retransmit all packets.

GoBackN

 

Selective Repeat

Sender can have up to N amount of unacked packets in pipeline. Receiver sends individual ack for each packet. Sender maintains timer for each unacked packet, when the timer expires it will only retransmit that unacked packet. Sender window: N consecutive sequence numbers. Limits sequence numbers of sent, unacked packets.

Selective Repeat

TCP Scenario’s

TCP Sequence Ack

TCP Sequence Ack

TCP Loss

Cumulative ACK Scenario

 

TCP: Switching from slow start to CA

The following case: when should the exponential increase switch to linear? (See graph down below).

The answer would be when cwnd (congestion window) gets to ½ of its value before timeout. On loss event the Slow Start Threshhold (ssthresh) is set to ½ of cwnd just before the loss event.

TCP Congestion Control

Principles of congestion control

Congestion basically means that there are too many sources sending too much data too fast for the network to handle. Thus, it’s different from flow control. Manifestations are: lost packets (buffer overflow at routers) or long delays (queueing in routers buffers). Congestion belongs to one of the most common problems.

 

My next summary is about router forwarding and its algorithms. It’s an interesting read and I can only recommend to take a look at it! Please leave any suggestions or questions in the comment section down below!

Related Posts