Professional Documents
Culture Documents
2.1-2.5 TCP Service Model
2.1-2.5 TCP Service Model
2.1-2.5 TCP Service Model
Link Link
Link Link Data
Hdr Frame
Source Destination
A End-Host End-Host B
Application Application
TCP TCP
Network Network Network Network
Syn + Ack
Ack
A
time
B
A
Data H TCP Segment
B
A B
Fin
(Data +) Ack
Fin
Ack
Property Behavior
Stream of bytes Reliable byte delivery service.
Reliable delivery 1. Acknowledgments indicate correct delivery.
2. Checksums detect corrupted data.
3. Sequence numbers detect missing data.
4. Flow‐control prevents overrunning receiver.
Bit 0 Bit 31
PSH
ACK
SYN
RST
FIN
TCP Data
IP Data IPv4 Hdr 104-bit globally unique ID
(Internet-wide)
IP DA
Source Port
TCP Data IP SA
Destination Port
Protocol ID = “TCP”
1. Host A increments source port 2. TCP picks ISN to avoid overlap with previousconnection
for every new connection with same ID.
A B
Syn +ISNA
Ack
Connection Setup
3-way handshake
ISN (initial sequence number)
B
A B
Well known Well known
TCP port number = 80 TCP port number = 23
Web Mail Web Mail
client client Server Server
IP IP DA = B IP DA = B
Dest port = 80
IP SA = A IP SA = A
Proto = Data Src port = Proto =
TCP 123456 TCP
Unit 2.2
IP Data
Bit 0 Bit 31
2. Routing Tables
Algorithms to populate router forwarding tables
IP Datagram
Network IP Data IP Hdr
Link Link
Link Link Data Hdr Frame
Source Destination
End-Host http http End-Host
RFC 792
A B
A B
Unit 2.4
Compress Data?
Reformat/translate/improve requests?
Serve cached data?
Add security?
Migrate connections across the network?
Or one of any of a huge number of other things?
The function in question can completely and correctly be implemented only with the knowledge
and help of the application standing at the end points of the communication system. Therefore,
providing that questioned function as a feature of the communication system itself is not possible.
(Sometimes an incomplete version of the function provided by the communication system may be
useful as a performance enhancement.)We call this line of reasoning...“the end-to-end argument.
-- [RFC 1958]
Unit 2.5
Checksum adds up values in packet (IP,TCP)
Very fast, cheap to compute even in software
Not very robust
Cryptographically strong MAC means flipping one bit of M causes every bit in the new c to be
randomly 1 or 0 (no information)
Not as good for error detection as a CRC!
But protects against adversaries
Checksum adds up values in packet (IP,TCP)
Very fast, cheap to compute even in software
Not very robust