450 likes | 647 Views
Application. Transport. you are here. Network. Link. Physical. Application. Transport (process-to-process). Network (unreliable, host-to-host). Transport (process-to-process). Network (unreliable, host-to-host). Transport (process-to-process). Network (unreliable, host-to-host).
E N D
Application Transport you are here Network Link Physical
Application Transport (process-to-process) Network (unreliable, host-to-host)
Transport (process-to-process) Network (unreliable, host-to-host)
Transport (process-to-process) Network (unreliable, host-to-host)
src port dst port :
Connection-Oriented Socket (Src Port, Src Addr, Dest Port, Dest Addr)
Connectionless Socket (Dest Addr, Dest Port)
UDP Segment Header src port dst port length checksum
UDP Checksum 0110011001100000 0101010101010101
UDP Checksum 1011101110110101 1000111100001100
UDP Checksum 0100101011000010
UDP detects errors (no recovery)
Reliable Data Transfer rdt1.0, rdt2.0, rdt3.0
Application Application Transport Transport rdt_send() deliver_data() Network Network udt_send() rdt_recv()
Finite State Machine Event Action
hungry get up & eat sleep awake stomach full go back to bed
rdt 1.0 underlying channel is reliable
rdt 1.0 sender rdt_send(data) wait for call pkt = make_pkt(data) udt_send(pkt)
rdt 1.0 receiver rdt_recv(pkt) wait for call extract(pkt, data) deliver_data(data)
send data recv pkt send pkt deliver wait for call wait for call
rdt 2.0 channels with bit-errors
ARQ: AutomaticRepeat reQuest Error detection Receiver feedback (ACK NAK) Retransmission
rdt 2.0 sender wait for call wait for ACK/NAK
rdt 2.0 receiver wait for call
rdt 2.1 channels with bit-errors
rdt 2.1 sender wait for call 0 wait for ACK/NAK 0
wait for call 0 wait for ACK/NAK 0 wait for ACK/NAK 1 wait for call 1
rdt 2.1 receiver wait for 0 wait for 1
wait for call 0 wait for 0 wait for ACK/NAK 0 wait for 1 wait for ACK/NAK 1 wait for call 1
wait for call 0 wait for 0 wait for ACK/NAK 0 wait for 1 wait for ACK/NAK 1 wait for call 1
rdt 2.2 NAK-free
No NAK Send ACK of last correctly received packet instead
rdt 3.0 lossy channels with bit-errors
How to tell if a packet is loss? (can’t know for sure)
Use Timeout (may lead to dup. packets)
rdt 3.0 sender wait for call 0 wait for ACK 0