1. TCP
TCP, universally because it provides reliable end to end bidirectional byte stream service that almost all applications want
- PSH tells TCP layer delivers message immediately upon arrival, useful sending short segment data which is time critical such as a key stroke
2. UDP
- checksum has IPv4 message because it helps to check
3. ICMP
4. End-to-End Principle
- D has some bugs in memory, thus when it receives data from C and transmit to E, some of the data will be lost
- So the correct position for error detection should be in the application layer, rather than link layer.
5. Error Detection: 3 chemes
6. Finite State Machine
7. Reliable Communication
7.1 Stop and Wait
- How to detect duplicates?
use 1-bit counter
7.2 Sliding Window
- cumulative acks: If 4 is lost, the receiver will send ack 3 until time out, so the sender will retransmit 4
7.3 Retransmission Strategies
- because receiver window if 1, so it can not buffer any other packets
7.4 TCP Header
- sequence number: first byte of sliding window