Académique Documents
Professionnel Documents
Culture Documents
Chapter 12
TCP
• TCP Services
• Segments and Options
• Flow Control and Error Control
• TCP Timers
• Connections
• State Transition Diagram
• Congestion Control
• TCP Operation and Design
Application
layer
SMTP FTP TFTP DNS SNMP ... BOOTP
Transport
layer TCP UDP
IGMP ICMP
Network
layer IP
ARP RARP
Data link
layer
Underlying LAN or WAN
technology
Physical
layer
Internet
Domain of IP protocol
TELNET TELNET
(Client) (Server)
64,295 23
TCP TCP
Header Data
End of option
Single-byte
No operation
Options
Maximum segment size
Timestamp
Options
Code: 0 END-OP
00000000
a. End of option ~
~ Data ~
~
b. Used for padding
Code: 1
00000001
a. No operation option
Code: 2 Length: 4
00000100 Maximum segment size
00000010
1 byte 1 byte 2 bytes
Code: 3 Length: 3
Scale factor
00000011 00000011
1 byte 1 byte 1 byte
Code: 8 Length: 10
00001000 00001010
Timestamp value
redaehoduesP
32-bit destination IP address
8-bit protocol
All 0s (6) 16-bit TCP total length
Sequence number
redaeH
Acknowledgment number
Sliding window
1 2 3 4 5 6 7 8 9 10 1112 13 14
a. Before sliding
Sliding window
1 2 3 4 5 6 7 8 9 10 11 12 13 14
b. After sliding
Sliding window
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Acknowledged
bytes Bytes 4 to 7 Bytes 8 to 13 Bytes 14 to 16
have been sent can be sent cannot be sent
Pointer
Sliding window
1 2 3 4 5 6 7 8 9 10 1112 13 14
a. Window of size 7
Sliding window
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Sliding window
1 2 3 4 5 6 7 8 9 10 11 12 13 14
a. Window of size 7
Sliding window
1 2 3 4 5 6 7 8 9 10 1112 13 14
Sender Receiver
Segment 1
seq: 1001, 4000 by
tes 4000
0
ack: 5001 win:100 Buffer
Segment 2
seq: 5001, 1000 by
tes
Time Time
Segment 1
seq: 1201, 200 by
tes
Segment 2
seq: 1401, 200 by
tes
Segment 3
seq: 1601, 200 by ack: 1601
tes
Segment 3
OK OK corrupted
Segment 3, retran
smitted
Time-out seq: 1601, 200 by
tes
ack: 1801
OK
Time Time
Segment 1
seq: 1201, 200 by
tes
Segment 2
seq: 1401, 200 by
tes
Segment 3
seq: 1601, 200 by ack: 1601
tes
OK OK Segment 3
lost
Segment 3, retran
smitted
Time-out seq: 1601, 200 by
tes
ack: 1801
OK
Time Time
Sender Receiver
OK OK OK
Time Time
Timers
Sender Receiver
Segment 1: SYN
seq: 1200, ack: ---
N + ACK
Segment 2: SY
k: 1201
seq: 4800, ac
Time Time
Sender Receiver
Segment 1: FTN
seq: 2500, ack : ---
Segment 4: ACK
seq: 2501, ack
: 7002
Time Time
Forouzan Notes COSC 6377 - Fall 2000 12-24
CLOSED
26
24
22
20
18
16 Threshold
14
12
10
08
06
04
02 Transmission number
1 2 3 4 5 6 7 8
Application Application
program program
TCP TCP
header TCP data header TCP data
IP IP
header IP data header IP data
a. Encapsulation b. Decapsulation
TELNET TELNET
client server
TCP TCP
TCP TCP
(Multiplexer) (Demultiplexer)
IP IP
Application layer
Message from
application
T Timers
TCBs
C
P
Main
Input module Output
processing processing
module module
IP layer
Forouzan Notes COSC 6377 - Fall 2000 12-30
... ..
.