Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

My big idea: Ancient Brain


CA216      CA249      CA318

CA400      CA651      CA668

Transport Layer

Typically an API embedded in Operating System.
e.g. Berkeley UNIX sockets

First true end-to-end layer.
What defines boundary of Transport and Network layers is that Transport code runs only on user machines, not on routers.
Boundary of Network layer is boundary of what routers need to run.

Quality of service:

Transport layer has to manage:


Transport Protocol Data Unit (TPDU)

What transport layers send to each other. Contains the "real" data of the communication.

Remember discussion of packet and frame.

TPDUs (exchanged by transport layer) are contained in packets (exchanged by network layer) which are contained in frames (exchanged by data link layer).


Internet protocol stack:
TCP - Transport layer for Internet.
IP is Network layer (does the routing). IP packets. IP is unreliable (may lose packets).

TCP provides reliable, connection-oriented service on top of IP.

Applications that use TCP:

  1. HTTP
  2. FTP
  3. telnet, ssh
  4. SMTP, POP3


Internet protocol stack:
UDP - alternative Transport layer for Internet.
Unreliable, connectionless.
No acks and re-transmits.
Faster, but may lose packets, or get damaged packet, and packets may arrive out of order.
But much faster.

Applications that use UDP, not TCP:

  1. Streaming media, e.g. RealAudio and RealVideo.
    Often, streaming client uses its own error-checking to compensate for lost/damaged data.
    RTP can use TCP, but mostly uses UDP.

  2. VoIP
  3. Online multiplayer games
  4. DNS


As at c.2002, c.95% of all Internet packets were TCP, c.5% UDP, less than 1% other.
UDP use (video, audio streams, VoIP, online games) growing since,
but TCP use (TCP file sharing, TCP torrents, HTTP video streaming, YouTube) also growing since.



6.2 Transport protocols

We saw previously algorithms for acks, re-transmits and flow control used on frames in Data Link layer (i.e. across a single physical link).
See here and here.

Similar algorithms may be used on higher-level objects to provide a reliable service in Transport layer (i.e. across entire network).
More difficult because instead of a single line (a) the entire network is now in the way (b):

6.5 TCP

TCP header.
See meaning.

Note port nos.
Uses sliding window protocol.
Initially go back n. More recently selective repeat.
Note seq and ack. These refer to next byte expected. Every byte is numbered 0 .. n (and then repeat) in the TCP byte-stream.
n = 232-1 = 4 billion.

TCP checksum (explained here) is quite weak (not CRC).
This is ok since CRC probably also used in Data Link layer (e.g. PPP and Ethernet).
Normal communication sessions will have error-checking in both Data Link and Transport layers.

Feeds      w2mind.org      ancientbrain.com

On the Internet since 1987.