Professional Documents
Culture Documents
Application
Transport
Internet
Transmission Control
Protocol (TCP)
ConnectionOriented
User Datagram
Protocol (UDP)
Connectionless
Data-Link
Physical
Bit 15 Bit 16
Source Port (16)
Bit 31
Destination Port (16)
20
Bytes
Window (16)
Urgent (16)
Options (0 or 32 if Any)
Data (Varies)
3
Port Numbers
Application
Layer
Transport
Layer
F
T
P
T
E
L
N
E
T
S
M
T
P
D
N
S
T
F
T
P
S
N
M
P
R
I
P
21
23
25
53
69
161
520
TCP
UDP
Port
Numbers
4
Telnet Z
Destination
Port
Host Z
Host A
SP
DP
1028
23
TCP Three-Way
Handshake/Open Connection
Host A
Send SYN
(seq = 100 ctl = SYN)
SYN Received
Established
(seq = 101 ack = 301
ctl = ack)
Host B
SYN Received
Send SYN, ACK 2
(seq = 300 ack = 101
ctl = syn,ack)
SYN_SENT
(passive open)
(active open)
SYN_RCVD
ESTABLISHED
ESTABLISHED
FIN_WAIT_1
(active close)
CLOSE_WAIT
(passive close)
FIN_WAIT_2
LAST_ACK
TIME_WAIT
CLOSED
10
TCP States
State
Description
CLOSED
LISTEN
SYN RCVD
SYN SENT
ESTABLISHED
FIN WAIT 1
FIN WAIT 2
TIMED WAIT
CLOSING
CLOSE WAIT
LAST ACK
Windowing
Windowing in networking means the quantity of data segments
which is measured in bytes that a machine can transmit/send on
the network without receiving an acknowledgement
12
Receiver
Send 1
Receive 1
Send ACK 2
Receive ACK 2
Send 2
Receive 2
Send ACK 3
Receive ACK 3
Send 3
Receive 3
Send ACK 4
Receive ACK 4
Window Size = 1
13
Destination
Port
Acknowledgment
Sequence
I just
sent number
11.
Source Dest.
Dest. Seq.
Seq. Ack.
Ack.
1028
23
10
10
100
1028
23
11
11
101
1028
100
11
11
1028
101
12
12
14
Windowing
There are two window sizesone set to 1 and one set to 3.
When youve configured a window size of 1, the sending machine
waits for an acknowledgment for each data segment it transmits
before transmitting another
If youve configured a window size of 3, its allowed to transmit
three data segments before an acknowledgment is received.
15
Windowing
16
17
Flow Control
Another function of the transport layer is to provide optional flow
control.
Flow control is used to ensure that networking devices dont send
too much information to the destination, overflowing its receiving
buffer space, and causing it to drop the sent information
The purpose of flow control is to ensure the destination doesn't get
overrun by too much information sent by the source
18
Flow Control
A
SEQ 1024 3
SEQ 2048
3072
B
SEQ 3072
in 0
W
073
3
Ack
in
W
073
3
Ack 3072
19
Bit 15 Bit 16
Source Port (16)
Bit 31
Destination Port (16)
Length (16)
Checksum (16)
8
Bytes
21
TCP vs UDP
22
23