1. TCP
TCP, universally because it provides reliable end to end bidirectional byte stream service that almost all applications want
three-way handshake
Tear down
Propeties
TCP:Port Demultiplexing
- 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
UDP
- checksum has IPv4 message because it helps to check
3. ICMP
Ping
4. End-to-End Principle
End-to-End Principle
Error Detection
- 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
Error Detection: 3 chemes
Checksum
CRC
6. Finite State Machine
Finite State Machine
Finite State Machine
7. Reliable Communication
7.1 Stop and Wait
Stop and Wait
- How to detect duplicates?
use 1-bit counter
Problem
7.2 Sliding Window
Sliding Window
Sliding Window Sender
Sliding Window Receiver
- cumulative acks: If 4 is lost, the receiver will send ack 3 until time out, so the sender will retransmit 4
Sequence Space
7.3 Retransmission Strategies
Retransmission Strategies
Go-back-N
Quiz
- because receiver window if 1, so it can not buffer any other packets
7.4 TCP Header
TCP Header
- sequence number: first byte of sliding window