Title: NUS.SOC.CS2105
1Application
Transport
you are here
Network
Link
Physical
2Application
Transport (process-to-process)
Network (unreliable, host-to-host)
3Transport (process-to-process)
Network (unreliable, host-to-host)
4Transport (process-to-process)
Network (unreliable, host-to-host)
5src port dst port
6Connection-Oriented Socket
- (Src Port, Src Addr,
- Dest Port, Dest Addr)
7Connectionless Socket
8UDP Segment Header
src port dst port length checksum
9UDP Checksum
0110011001100000
0101010101010101
10UDP Checksum
1011101110110101
1000111100001100
11UDP Checksum
0100101011000010
12UDP detects errors
13Reliable Data Transfer
14Application
Application
Transport
Transport
rdt_send()
deliver_data()
Network
Network
udt_send()
rdt_recv()
15Finite State Machine
Event
Action
16hungry
get up eat
sleep
awake
stomach full
go back to bed
17rdt 1.0
- underlying channel is reliable
18rdt 1.0 sender
rdt_send(data)
wait for call
pkt make_pkt(data) udt_send(pkt)
19rdt 1.0 receiver
rdt_recv(pkt)
wait for call
extract(pkt, data) deliver_data(data)
20send data
recv pkt
send pkt
deliver
wait for call
wait for call
21rdt 2.0
22ARQ AutomaticRepeat reQuest
- Error detection
- Receiver feedback (ACK NAK)
- Retransmission
23rdt 2.0 sender
wait for call
wait for ACK/NAK
24rdt 2.0 receiver
wait for call
25(No Transcript)
26Stop-and-Wait
27What if ACK/NAK is corrupted?
28Idea Retransmit if ACK/NAK is corrupted
29(No Transcript)
30rdt 2.1
31rdt 2.1 sender
wait for call 0
wait for ACK/NAK 0
32wait for call 0
wait for ACK/NAK 0
wait for ACK/NAK 1
wait for call 1
33rdt 2.1 receiver
wait for 0
wait for 1
34wait for call 0
wait for 0
wait for ACK/NAK 0
wait for 1
wait for ACK/NAK 1
wait for call 1
35wait for call 0
wait for 0
wait for ACK/NAK 0
wait for 1
wait for ACK/NAK 1
wait for call 1
36rdt 2.2
37No NAK
- Send ACK of last correctly received packet instead
38rdt 3.0
- lossy channels with bit-errors
39How to tell if a packet is loss?
40Use Timeout
- (may lead to dup. packets)
41(No Transcript)
42rdt 3.0 sender
wait for call 0
wait for ACK 0
43Alternating-bit Protocol
44R 6000 kbpsL 1500 bytesRTT 300 ms