Computer networks -- 2007-2008 -- info.uvt.ro/Course 8
Appearance
Quick links:
- front;
- courses 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13;
- laboratories agenda, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, evaluation, tools, repository.
Transport layer
[edit]- where it sits in the layer stack;
- generically it involves managing dialogues between hosts;
- functions:
- connection management;
- flow control;
- congestion control;
- error detection / correction;
- multiplexing;
- service addressing;
- buffering;
- issues:
- endpoint / connection addressing;
- connection establishment / termination;
- message acknowledgment;
- message buffering;
- service primitives:
- listen / connect;
- receive / send;
- disconnect;
- service access points:
- TSPA -- Transport Service Access Point;
- NSPA -- Network Service Access Point;
TCP
[edit]- TCP -- Transport Control Protocol;
- characteristics:
- unicast protocol;
- connection oriented;
- ordered;
- reliable;
- full-duplex;
- services:
- it takes a stream of octets and breaks it into smaller blocks;
- it presents a virtual circuit to the application layer;
- it allows multiple streams at the same time;
- functions:
- connection setup and shutdown;
- sequencing;
- retransmission;
- error detection;
- service addressing;
- flow control:
- by using a sliding window;
- congestion control;
- ports;
- links:
Segment
[edit]- structure:
- IP packet header -- 160 bits -- 20 octets;
- source port -- 16 bits;
- destination port -- 16 bits;
- sequence number -- 32 bits:
- what is the current offset in the entire stream for sent (outbound) data;
- acknowledgment number -- 32 bits:
- what is the expected offset in the entire stream for received (inbound) data;
- header length -- 4 bits:
- expressed in 32 bit words;
- reserved -- 6 bits -- must be all 0;
- flags -- 6 bits -- used for connection control;
- window -- 16 bits:
- the amount of receivable (inbound) data that will be accepted next;
- checksum -- 16 bits:
- CRC for both header and data;
- urgent -- 16 bits:
- the offset of urgent data;
- options -- 0 or 32 (or a multiple of 32) bits;
- data;
- flags:
- URG -- indicates that the urgent pointer field is significant;
- ACK -- indicates that the acknowledgment field is significant;
- PSH -- push function;
- RST -- reset the connection;
- SYN -- synchronize sequence numbers;
- FIN -- no more data from sender;
- checksum: the 16 bit one's complement of the one's complement sum of all 16-bit words in the header and text;
Connection life-cycle
[edit]- the big picture:
- connection establishment;
- data exchange;
- connection termination;
- connection establishment:
- three way handshake;
- passive opening: done by the server;
- active opening: done by the client;
- Client: SYN:
- it also selects a random number for the sequence field -- x;
- Server: SYN-ACK:
- it updates the acknowledgment field to x + 1;
- it selects a random number for the sequence field -- y;
- Client: ACK:
- sequence -- x + 1;
- acknowledgment -- y + 1;
- data exchange:
- the sequence and acknowledgment fields are used;
- connection termination:
- it is independent for each way of the connection;
- there is no strict way of doing it:
- as each end point could start the termination at any time;
- as the messages could be merged together;
- 'four way handshake;
- 'three way handshake;
- 'two way handshake;
- in principle:
- End-1: FIN;
- End-2: ACK;
- connection states:
- LISTEN;
- SYN-SENT;
- SYN-RECEIVED;
- ESTABLISHED;
- FIN-WAIT-1;
- FIN-WAIT-2;
- CLOSE-WAIT;
- CLOSING;
- LAST-ACK;
- TIME-WAIT;
- CLOSED;
- wikipedia:Image:Tcp_state_diagram.svg;
Miscellaneous
[edit]- MSS -- Maximum Segment Size:
- how much data is sent into a single packet;
- cumulative acknowledgment;
- selective acknowledgment;
- out of bound data;
- congestion control:
- receiver window;
- congestion window;
- threshold;
- TCP and wireless connections;
- links:
UDP
[edit]- UDP -- User Datagram Protocol;
- characteristics:
- unicast or broadcast protocol;
- connection-less;
- unordered;
- unreliable;
- services:
- it takes a block of data from the application layer, and it passes it -- intact -- to the destination;
- it allows multiple services at the same time;
- functions:
- error control;
- service addressing;
- ports;
Datagram
[edit]- structure:
- source port -- 16 bits;
- destination port -- 16 bits;
- length -- 16 bits;
- checksum -- 16 bits;
- data;
- links:
SCTP
[edit]- SCTP -- Stream Control Transmission Protocol;
- characteristics:
- connection-oriented;
- message-oriented;
- reliable;
- ordered (can be turned off);
- multi-streaming (multiplexing);
- multi-homing;
- links: