ELEN 602 Lecture 15 - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

ELEN 602 Lecture 15

Description:

ELEN 602 Lecture 15 More on IP TCP ELEN 602 Lecture 15 More on IP TCP byte stream Send buffer segments Receive buffer byte stream Application Application ACKs ... – PowerPoint PPT presentation

Number of Views:85
Avg rating:3.0/5.0
Slides: 15
Provided by: A364
Category:

less

Transcript and Presenter's Notes

Title: ELEN 602 Lecture 15


1
ELEN 602 Lecture 15
  • More on IP
  • TCP

2
TCP Streams
Application
Application
byte stream
byte stream
segments
Transmitter
Receiver
Send buffer
Receive buffer
ACKs
3
TCP end-to-end Flow control
Transmitter
Receiver
Send Window
Receive Window
SlastWa-1
RlastWR1
Rlast
...
...
...
Rnext
Rnew
Octets transmitted and ACKed
Slast
Srecent
SlastWs-1
Slast oldest unacknowledged octet Srecent
highest-numbered transmitted octet SlastWa-1
highest-numbered octet that can be
transmitted SlastWs-1 highest-numbered octet
that can be accepted from the application
Rlast highest-numbered octet not yet read by the
application Rnext next expected octet Rnew
highest numbered octet received correctly RlastWR
-1 highest-numbered octet that can be
accommodated in receive buffer
4
TCP Segment
0 4 10
16
24 31
Source Port
Destination Port
Sequence Number
Acknowledgement Number
U
A
P
R
S
F
Header
R
C
S
S
Y
I
Reserved
Window Size
Length
G
K
H
T
N
N
Checksum
Urgent Pointer
Options
Padding
Data
5
TCP Pseudoheader
0 8
16
31
Source IP Address
Destination IP Address
0 0 0 0 0 0 0 0 Protocol 6
TCP Segment Length
6
3-way Handshake for connection establishment
Host A
Host B
SYN, Seq_no x
SYN, Seq_no y, ACK, Ack_no x1
Seq_no x1, ACK, Ack_no y1
7
Sequence numbers
Host A
Host B
SYN, Seq_no n
SYN, Seq_no n, ACK, Ack_no n1
Seq_no n1, ACK, Ack_no n1
Delayed segment with
Seq_no n2
will be accepted
8
TCP application example
Host B (Server)
Host A (Client)
socket bind listen accept (blocks)
socket connect (blocks)
SYN, Seq_no x
SYN, Seq_no y, ACK, Ack_no x1
connect returns
Seq_no x1, ACK, Ack_no y1
write read (blocks)
accept returns read (blocks)
request message
read returns
write read (blocks)
reply message
read returns
9
TCP Window control
Host A
Host B
t0
Seq_no 1, Ack_no 2000, Win 2048, No Data
t1
Seq_no 2000, Ack_no 1, Win 1024, Data
2000-3023
t2
Seq_no 3024, Ack_no 1, Win 1024, Data
3024-4047
t3
Seq_no 1, Ack_no 4048, Win 512, Data 1-128
t4
Seq_no 4048, Ack_no 129, Win 1024, Data
4048-4559
10
TCP Header overhead
TCP Header
20 bytes of TCP header
20 bytes of IP header
IP Header
11
Connection Termination
Host A
Host B
FIN, seq 5086
ACK 5087
Data, seq. 303, ACK 5087
Deliver 150 bytes
ACK 453
FIN, seq. 453, ACK 5087
ACK 454
12
TCP State diagram
CLOSED
passive open, create TCB
applic.close
active open,create TCB send SYN
LISTEN
receive SYN, send SYN, ACK
receive RST
send SYN
applic. close or timeout, delete TCB
SYN_SENT
SYN_RCVD
receive SYN, send ACK
receiveACK
receive SYN, ACK, send ACK
applic. close, send FIN
ESTABLISHED
receive FIN, send ACK
applic. close, send FIN
CLOSE_WAIT
receive FIN send ACK
applic. close send FIN
CLOSING
FIN_WAIT_1
receive ACK
LAST_ACK
receive ACK
receive ACK
receive FIN, ACK send ACK
receive FIN send ACK
2MSL timeout delete TCB
FIN_WAIT_2
TIME_WAIT
13
Routing for mobile hosts
Foreign network
Home network
Foreign agent
Mobile host
2
Home agent
Internet
3
1
Correspondent host
14
IP to IP Encapsulation
Outer IP Header
IP Header
IP Header
IP Payload
IP Payload
Write a Comment
User Comments (0)
About PowerShow.com