1 of 54

Ch 6- Transport Layer

  • Introduction:
  • Transport layer Protocols & its Services
  • Transport service primitives
  • Elements of transport protocols
    • Connection establishment & release
    • Flow control
    • Multiplexing & Demultiplexing
  • Protocol: TCP & UDP
  • Congestion control
  • QOS and its improvement

Computer Networks

2 of 54

Transport Layer

  • Introduction:
    • Build on network layer n/w layer to provide data (segment) transport from Process on S to D (process to process)
    • Reliability that independent of physical network currently in use
    • Abstraction: Application need to use network
    • Services provided to the application layer
      • GOAL: provide efficient, reliable and cost effective data transmission to its users
      • Process (Application Layer)
      • Transport entity: s/w & h/w of layer
        • Entity: at OS-kernel ,
        • its separate user process

Computer Networks

3 of 54

Transport QoS

  • The introduction of the Transport Layer is to add an additional layer where the user has some control over the QoS.
  • Users cannot control the QoS in the Network Layer.

  • The Transport Layer can manage connections at the Network Layer,
  • picking up dropped connections and making sure that the application doesn’t have to deal with problems

4 of 54

Avoiding Different Network Types

  • The Transport Layer is responsible for hiding the underlying Network Layer.

  • This allows people to code for one basic network standard without having to worry about the different underlying networks.

  • This makes the Transport Layer the first layer in the transport service user upper levels, connecting directly to the transport service provider lower levels.

5 of 54

Computer Networks

The network, transport, and application layers.

Transport layer adds reliability to the network layer

• Offers connection less (e.g., UDP) and

Connection oriented (e.g, TCP) service to applications

6 of 54

Transport Service Primitives

Computer Networks

Transport Layer: boundary between the provider and user of the reliable data transmission service.

Primitive

Packet sent

Meaning

LISTEN

(none)

Block until some process tries to connect

CONNECT

CONNECTION REQ.

Actively attempt to establish a connection

SEND

DATA

Send information

RECEIVE

(none)

Block until a DATA packet arrives

DISCONNECT

DISCONNECTION REQ.

Request a release of the connection

Primitives that applications might call to transport data

for a simple connection-oriented service:

• Client calls CONNECT, SEND, RECEIVE, DISCONNECT

• Server calls LISTEN, RECEIVE, SEND, DISCONNECT

7 of 54

Transport Service Primitives

Nesting of TPDU (Transport Protocol Data Unit) segment, packets, and frames.

  • The messages sent from one transport entity to another is known as a TPDU (Transport Protocol Data Unit).

8 of 54

Berkeley Sockets (1)

A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by packet arrivals. The solid lines show the client’s state sequence. The dashed lines show the server’s state sequence.

9 of 54

Berkeley Sockets (2)

The socket primitives for TCP

10 of 54

Elements of Transport Protocols

  • Addressing
  • Connection establishment
  • Connection release
  • Error control and flow control
  • Multiplexing
  • Crash recovery

Similarity between data link and transport layer

  • Connection establishment
  • Connection release
  • Error control and flow control

11 of 54

Elements of Transport Protocols

  1. Environment of the data link layer.
  2. Environment of the transport layer.

12 of 54

Addressing

TSAPs, NSAPs, and transport connections

13 of 54

TP - Addressing

  • Where to we send data?

  • On the Internet, we make connections to ports or AAL-SAPs. The book uses the generic term TSAP (Transport Service Access Point).

  • An IP address is an example of a Network Service Access Point (NSAP).

14 of 54

Common Ports

  • All ports under 1024 are reserved for system use, although system administrators are able to access and even remap these ports.
  • Applications look for common servers under common ports.
  • These servers often don’t run all the time – an inet deamon starts them when needed.

15 of 54

Addressing

How a user process in host 1 establishes a connection �with a mail server in host 2 via a process server.

16 of 54

TSAPs and NSAPs

  • Transport layer adds TSAPs

• Multiple clients and servers can run on a host with a single network (IP) address

• TSAPs are ports for TCP/UDP

17 of 54

Connection Establishment

Maintain history problem if crashed

  • Restricted network design.
  • Putting a hop counter in each packet.
  • Time stamping each packet.

  • Also acknowledgement needs to be erased with time T

18 of 54

Avoiding Duplicates

  • We could use throwaway transport addresses.
  • We could give each connection a connection identifier.
  • We could devise a way to kill off old packets in the network. This would make the problem more manageable.

19 of 54

Connections

  • The three-way handshake was introduced to establish a connection.
  • The first machine sends a CONNECTION REQUEST to host 2 containing a sequence number.
  • Host 2 replies with an ACK acknowledging the sequence number and sending it’s own initial sequence number.
  • Host 1 acknowledges Host 2’s choice of sequence number in the first data packet.

20 of 54

Connection Establishment

Three protocol scenarios for establishing a connection using a

three-way handshake. CR denotes CONNECTION REQUEST. Normal operation.

21 of 54

22 of 54

Connection Establishment

Three protocol scenarios for establishing a connection using a

three-way handshake. CR denotes CONNECTION REQUEST. Old duplicate CONNECTION REQUEST appearing out of nowhere.

23 of 54

Connection Establishment

Three protocol scenarios for establishing a connection using a

three-way handshake. CR denotes CONNECTION REQUEST. Duplicate CONNECTION REQUEST and duplicate ACK

24 of 54

Connection Release

  • We can release the connection symmetrically or asymmetrically.
  • Asymmetric is just like a telephone – when one person ends the connection, it is broken.
  • Asymmetric release can cause data loss if one side sends data that is not received before the disconnect.

  • Symmetric – treats the connection like two unidirectional connections, requiring each end of the connection to be released.
  • Unfortunately, determining when the two sides are done is difficult.
  • This problem is known as the two-army problem.

25 of 54

Connection Release

  • Symmetric – treats the connection like two unidirectional connections, requiring each end of the connection to be released.
  • Unfortunately, determining when the two sides are done is difficult.
  • This problem is known as the two-army problem.

26 of 54

Connection Release

  • Host 1 sends a Disconnect Request (DR) to Host 2.
  • Host 2 replies with a DR and starts a timer just in case the reply is lost.
  • Host 1 will ACK the DR from Host 2 and release the connection.
  • When the ACK arrives, Host 2 will drop the connection.
  • If the final ACK is lost, the time will take care of the disconnection.

27 of 54

Connection Release Protocols (1)

28 of 54

Connection Release Protocols (2)

29 of 54

Connection Release

Abrupt disconnection with loss of data,

one way release or two way release

30 of 54

Connection Release

Four protocol scenarios for releasing a connection. �(a) Normal case of three-way handshake

31 of 54

Connection Release

Four protocol scenarios for releasing a connection. �(b) Final ACK lost.

32 of 54

Connection Release

Four protocol scenarios for releasing a connection. � (c) Response lost

33 of 54

Connection Release

Four protocol scenarios for releasing a connection. � (d) Response lost and subsequent DRs lost.

34 of 54

Error Control and Flow Control

  • Foundation for error control is a sliding window

(from Link layer) with checksums and retransmissions

  • Flow control manages buffering at sender/receiver
    • Issue is that data goes to/from the network and applications at different times
    • Window tells sender available buffering at receiver
    • Makes a variable-size sliding window

35 of 54

Error Control and Flow Control

36 of 54

Error Control and Flow Control

37 of 54

Multiplexing

(a) Multiplexing. (b) Inverse multiplexing.

38 of 54

Crash Recovery

  • TCP is very reliable protocol.
  •  It provides sequence number to each of byte sent in segment
  • It provides the feedback mechanism
    • when a host receives a packet, it is bound to ACK that packet having the next sequence number expected,

(if it is not the last segment).

  • When a TCP Server crashes mid-way communication and re-starts its process it sends TPDU broadcast to all its hosts.
    • The hosts can then send the last data segment which was never unacknowledged and carry onwards.

39 of 54

Crash Recovery

40 of 54

Congestion Control at Transport layer

  • TCP Congestion Control :

resource bottlenecks and unpredictable user access pattern

  • TCP uses go-back-n model with cumulative acknowledgement
  • Algo: Slow-Start, Congestion Avoidance and Fast Retransmit

41 of 54

Congestion Control at Transport layer

  • Open loop: prevent or avoid congestion

  • Closed loop:

allow system to enter congested state, detect it and remove it

42 of 54

Congestion Control

Two layers are responsible for congestion control:

− Transport layer, controls the offered load [here]

− Network layer, experiences congestion [previous]

• Desirable bandwidth allocation

• Regulating the sending rate

43 of 54

Congestion Control

Desirable Bandwidth Allocation

Efficient use of bandwidth gives high goodput, low delay

44 of 54

Congestion Control

Desirable Bandwidth Allocation

Fair use gives bandwidth to all flows (no starvation)

• Max-min fairness gives equal shares of bottleneck

45 of 54

Congestion Control

Desirable Bandwidth Allocation

We want bandwidth levels to converge quickly when traffic patterns change

46 of 54

Regulating the Sending Rate (TCP-Congestion control)

47 of 54

Regulating the Sending Rate� (TCP-Congestion control)

48 of 54

  1. A fast network feeding a low-capacity receiver.

(b) A slow network feeding a high-capacity receiver.

(TCP-Congestion control)

49 of 54

Window management in TCP.

50 of 54

The Internet Transport Protocols: TCP

  • Introduction to TCP
  • The TCP service model
  • The TCP protocol
  • The TCP segment header
  • TCP connection establishment
  • TCP connection release

51 of 54

The TCP Segment Header

52 of 54

The UDP Segment Header

UDP (User Datagram Protocol) is a shim over IP

• Header has ports (TSAPs), length and checksum.

53 of 54

QOS at this layer

54 of 54

End (Ch-6 Transport layer)

?

Thanks.