TCP/IP and the Internet
How Networks are Interconnected into an Internet
A gateway (denoted by "G" in diagram below) connects networks together.
IP Addresses and Host Names
Two forms:
-
Human readable:
-
Example: vtopus.cs.vt.edu
-
Dotted decimal:
-
Example: 128.173.40.1, where:
-
-
128.173
-
denotes .vt.edu
-
.40
-
denotes .cs
-
.1
-
denotes host number 1 (out of 255 possible hosts in .cs.vt.edu)
IP Protocol
IP is a connectionless protocol for layer 3
Unit of Transfer
Datagram
Service Provided
-
Unreliable:
-
lost, duplicated, reorded, delayed delivery
-
Connectionless:
-
each datagram from host A to B can follow
different path
-
fragments of a single datagram may follow different paths
-
Best-error delivery:
-
IP is unreliable only when network resources (e.g.,
gateway buffers, network bandwidth) are exhausted or network fails
-
Functions performed by IP:
-
Defines unit of transfer in internet:
-
2^16 byte limit on a packet
-
packet header format
-
Performs routing
-
Protocol for unreliable, connectionless delivery:
-
What does host/gateway do when datagram arrives
-
When can datagram be discarded?
-
When/how to report errors (ICMP - Internet Control Message Protocol)
TCP
Comparison of IP, UDP, and TCP
|
IP |
UDP |
TCP |
| connection-oriented? |
no |
no |
yes |
| message boundaries? |
yes |
yes |
no |
| data checksum? |
no |
opt. |
yes |
| positive ack? |
no |
no |
yes |
| timeout and rexmit? |
no |
no |
yes |
| duplicate detection? |
no |
no |
yes |
| sequencing? |
no |
no |
yes |
| flow control? |
no |
no |
yes |
TCP Functions
TCP provides reliable, in-order delivery of the bits comprising a message.
Each message is split into segments with a maximum segment size
(usually matching the frame size or the Interent's maximum transfer unit
[smallest frame size]):
Another way of looking at the Internet is how TCP passes a portion of
a message through lower protocol layers:
Associations
Every "connection" in the Internet is identified by a 5-tuple:
-
protocol name (e.g., TCP)
-
source host IP address
-
source host port number (specifies source process)
-
destination host IP address
-
destination host port number (specifies destination process)
TCP Header
TCP uses a 20 byte header (just as IP uses). Note that the header has fixed
size -- making it fast and easy to parse. (In contrast, HTTP headers
are wildly varying in size, since they weren't designed by networking people.)
Flow and Congestion Control
TCP performs two additional functions.
-
flow control: ensuring that a fast sender does not
bombard a slow receiver with packets
-
congestion control: slowing or increasing transmission speed to match total
load (or congestion) of the Internet paths separating source and destination
TCP is designed to perform well for connections that are held for a long
time, and transfer a lot of data. In contrast, HTTP connections are
held for short times - just a few packets. So Web transfers could be improved
if TCP was also optimized for short transfers. Here's an example from Improving
the Start-up Behavior of a Congestion Control Scheme for TCP , J.C. Hoe,
SIGCOMM 96, August.
Last modified on 4 Feb 1998.
Send comments to abrams@vt.edu.
[This is http://ei.cs.vt.edu/~wwwbtb/Notes/Protocols/tcpip.html.]