Académique Documents
Professionnel Documents
Culture Documents
A single logical connection between processes. Hides intricacies of underlying network structure. Takes an application message, divides it into smaller chunks (called PDUs for protocol data units), adds headers and sends.
UDP
Stands for User Datagram protocol. Acts as a simple demultiplexer between processes.
Once datagram arrives at a destination host, which process is it to be forwarded to ? The processes are distinguished using port numbers.
Note: IP multiplexes data from various processes! Best Effort -- as with IP. UDP applications --DNS, routing updates.
Queues
Packets arriv e
Ports
Processes identified using port numbers -- an abstraction. 16 bit representation of ports. Destination port is usually well known In Unix usually in /etc/services as an example -- DNS has port 53 on which messages are received. Can use well known port to agree on a different port to communicate.
UDP checksum
Computed over the UDP header, the contents of the message body and something called the pseudoheader.
Pseudoheader -- from IP header, contains protocol number, source IP address, destination IP address and UDP length field.
Arrange the contents into 16 bit words, add the words, take the 1s complement and include as checksum.
Why UDP ?
No connection set up. No need to maintain state. Smaller packet overhead (8 bytes whereas TCP has 20 bytes) Unregulated send rate -- especially if packet loss is not an issue.
TCP basics
A sliding window protocol is at the heart of TCP. TCP establishes an explicit logical connection between a client and a server. There is an explicit connection establishment phase (similar to dialing a connection) -- the two sides agree to exchange data.
There is a explicit teardown phase -- the connection is torn down.
The two parties establish some shared state to enable the sliding window algorithm to begin.
Challenges
Remember, sliding window specifies how many segments should be in flight at a given time. The RTT of a logical connection is highly variable. Delay bandwidth product okay only if there is a single connection -- however, if there are many connections, and the number is varying on the different links through which a TCP connection passes,estimation of this product is difficult. TCP tries to learn about the resources for a connection.
Segments
TCP is a byte oriented protocol -- This means that sender writes bytes into a TCP connection and receiver retrieves bytes. But TCP does not really directly transmit bytes. Buffers enough to fill a reasonably sized data unit called segment and sends it to receiver. Receiver retrieves bytes and stores in buffer.
Write bytes
Read bytes
Segment
Segment
Segment
Transmit segments
Urgent data
Data to interrupt operation underway
called out of band communications.
The Urgent flag says that there is urgent data in the front of the segment body upto what is specified by the UrgPtr field.
Connection Establishment
Client is the caller Server is the callee In the SYN+ACK message, both the SYN and ACK flags are set. It is a three way handshake!
Active participant (client) (server)