UDP/TCP/IP Protocol Architecture
Ø
Overall Picture of the TCP/UDP/IP protocols
Ø
Standard Services and Protocol Usage
Ø Overall Picture of the
TCP/UDP/IP protocols:
IP
, UDP
, TCP &
Encapsulation
Encapsulation
à
Reliability: Requires ACK & Retransmission.
It dynamically computes RTT for
estimating how long to wait for ACKs:
millisecs for LANs, seconds
WANs.
à
Sequence
Numbers: To detect packet
loss, reordering and duplicate removal.
à
Flow
Control: Tell peer
exactly how many bytes it is willing to accept
(receiver
buffer called window).
à
Full
Duplex: send and recv data in both directions.
à
Connection
Establishment: 3-way
handshake
à
Options: Each synch segment contains:
§ MSS
Option: maximum segment size (the maximum amount
of data it is willing to accept in each TCP segment).
§ Window
Scale Option: maximum window is 65,535 bytes,
it can be scaled (left-shifted) by 0-14 bits providing a
maximum of 65,535x2**14 byte (one gigabyte).
à Connection Termination: Requires 4 segments
ê
ê Watching the Packets: Packet
exchange for TCP Connection
ê
Time-Wait state:
(around 2 minutes)
ü To allow old duplicate segments to
expire in the Network.
ü The end that performs the active
close is the one that goes through TIME-WAIT state in order to ACK the
final FIN.
ü Port
numbers: 16 bit
integers (65,535).
ü Socket
Pair: four_tuple < localIP,
localPort, foriegnIP, foriegnPort >
ü Concurrent
servers: listen, connect and accept
,
Buffer Sizes and Limitations:
ü MTU: Maximum Transmission Unit (Ethernet
1500 bytes).
ü Path
MTU: smallest MTU in a
path.
ü If IP datagram exceeds MTU it is fragmented & reassembled at the final destination.
ü If DF (Do't fragment) bit is set, ICMP is returned
(this is the basis for the path MTU
discovery).
ü IP with 576 bytes
will not be fragmented.
ü TCP MSS is = (interface MTU - header lengths).
TCP Output:
Return from write means: reuse application buffer,
but data may still be in the socket buffer of sender
and it does not mean the peer got it.
ü Simple.
ü Connectionless.
ü Unreliable.
UDP
Output:
No
buffering, packets are copied directly into the datalink
output queue.
Ø
Standard
Services and Protocol Usage:
Standard Internet Services:
Sample (More details at: /etc/services)
Protocol
Usage by Common Internet Applications: