Beruflich Dokumente
Kultur Dokumente
Connection Control 9
– application process on a remote machine requests connection to server’s TSAP via its
local TSAP
– transport entities use the network link to process the communication request either
as connection oriented service (session) or as connectionless data delivery 6
Addressing
Constant TSAP address services
Dynamic TSAP assignment to the service
processes
– Initial connection protocol by process server
6/9
7
Classes of the transport protocol
Protocol Network
class Functions
type
0 A Minimal functions
2 A Connection bonding
• Symmetric release
• treats the connection as two independent unidirectional connections
and release each of them separately
• no data losses 6/13
• synchronization problem (two-army problem)
10
Transport Layer in Internet
• Connection-oriented and connectionless oriented protocols
in Internet
19/1
• TCP (Transport Control Protocol) features:
• connection oriented protocol supporting end-to-end full-
duplex byte stream over network links with losses and
errors
• upper interface to user processes or OS kernel requests
• lower interface to IP
• brakes user/OS data into IP datagrams of 1500-64kB or
restore the IP datagrams into upper level byte stream
• controls the timeout periods, retransmission events,
11
sequencing, etc, over the unreliable IP transfer
TCP addressing
• Addressing based on sockets:
• a socket unifies NSAP end TSAP
• the socket number consists of:
• IP address (NSAP) - 4 bytes
• local port (TSAP) - 16b (up to 64k ports addressing space)
• a socket pair uniquely identifies a transport connection: (socket1,
socket2)
• several connections may ended in a common socket
• socket calls from the OS:
6/6
• port address space:
• 0 - 255 - well-known ports:
7 - Echo; 13 - Daytime; 21 - FTP File Transfer; 23 - Telnet;
49 - Login Host Protocol; 79 - Finger; 80 - World Wide Web
HTTP; 110 - Post Office Protocol - Version 3 (POP3) 12
TCP protocol
• 32-bit numbering (0 - 4G) of the byte sequence
• TPDUs: segments
• Segmentation according the network properties (user data
stream can be split into smaller segments or collected in
larger ones).
• Segment structure:
• header (20B)
• header options
• data (optional, up to 64k)
• Segment header:
• 5 * 32-bit words
6/24 • Source/Destination port - 16b - local end points of the
connection
• Sequence Number/Acknowledgement Number - 32b (4G ) -
the byte numbers in the stream (last received and next expected) 13
TCP protocol
• Segment Header (cont.)
• TCP header length - (4b) - the header length in 32b words - up
6/24
to 16 words of which 5 are standard header and up to 11 are
optional header words
• reserved field of 6b (not used in TCP versions up to now)
• 6 flags field; the value 1 of the flags means respectively:
• URG: Urgent pointer in use. Urgent pointer is a facility that points the
urgent data field. Urgent data contains interrupt messages that are
interpret by the upper levels but not by TCP itself
• ACK: Valid Acknowledgement number. If ACK=0 the contents of the
Acknowledgement number field is ignored
• PSH: Pushed data indicator. “Pushed data” is data that has to be
delivered to the application layer without buffering (i.e. without delay)
• RST: Reset connection. Used in cases of host failure or refusal of
14
connection opening attempt
TCP protocol
• Segment Header - Flags’ field (cont.)
• SYN: Establish connection. Connection request/replay indicator. SYN=1 and
ACK=0 means connection request (no piggybacked acknowledgement) and
6/24 SYN=1 and ACK=1 means connection replay (acceptance) with a
acknowledgement piggybacked in the same segment. SYN segments are
ordered by the sequence numbers in order to prevent delayed duplications.
• FIN: Release connection request. The sender has finished the data
transmission. FIN segments also are ordered by the sequence numbers in
order to prevent delayed duplications.
• Window size. 16b - Indicates the free buffer space of the receiver
after the last received byte (which is Acknowledgement number - 1).
The maximum buffer buffer indicated is 64kB. 0 buffer space means
temporarily to stop data transmission to the receiver.
• Checksum. 16b - checksum over header, data and the pseudoheader:
(set of segment parameters)
• pseudoheader: set of transmission parameters that includes
source/destination IP addresses and the segment length (Note that the control
6/25 over IP addresses is not a functionality of TCP but of IP)
15
TCP protocol
16
TCP connection management
• TCP uses 3-way handshaking for connection establishment:
• the server host (host2) waits for incoming having issued LISTEN or
ACCEPT primitive
• the client host (host1) issued CONNECT primitive specifying TSAP by (IP
6/26 addr., port) couple; the flags SYN=1, ACK=0
• the server host acknowledges the connection if there is active server
process listening the specified port
• simultaneous attempts to open connection lead to failure because of
different sequence numbering (6/26b)
• simultaneous attempts to close connection are not in a collision; FIN
segments are acknowledged (or timed-out) and the connection is closed
• Finite state-machine of a TCP connection:
• set of states 6/27
17
6/28 • set of transitions (the transitions are invoced by event/action pair)
UDP
• UDP (User Datagram Protocol) implements
connectionless unreliable services of the Transport
Layer
• The establishment/release of the connection is skipped
• UDP segment: 6/34
• 8B (2x32b words) header
• extends IP datagram with
• source/destination ports fields
• UDP segment length field (data + 8B header)
• UDP checksum field over header, pseudoheader and data
Resource ReSerVation Protocol (RSVP), described in
RFC 2205. Designed to reserve resources across a network
for an integrated services Internet (QoS).
"RSVP does not transport application data but is rather an
Internet control protocol, like ICMP, IGMP, or routing
protocols.“
RSVP provides receiver-initiated setup of resource
reservations for multicast or unicast data flows with
scaling and robustness. 20
19/1
19/1
21
6/1
6/1
22
6/3
6/3
6/4
6/4
23
6/5
6/5
24
6/6
6/6
25
6/7
6/7
26
6/8
6/8
27
6/9
6/9
28
6/11
6/11
29
6/12
6/12
30
6/13
6/13
31
6/24
6/24
32
6/25
6/25
33
6/26
6/26
34
6/27
6/27
35
6/28
6/28
36
6/34
6/34
37