You are on page 1of 21

1

Transport Layer Concepts


OSI and Protocol Stack 2

OSI Model TCP/IP Hierarchy Protocols

7th
Application Layer

6th
Presentation Layer Application Layer

5th
Session Layer

4th
Transport Layer
Transport Layer

3rd
Network Layer
Network Layer

2nd
Link Layer
Link Layer
1st
Physical Layer
3
Packet Encapsulation
 The data is sent down the protocol stack
 Each layer adds to the data by adding headers

22Bytes 20Bytes 20Bytes 4Bytes

64 to 1500 Bytes
4
OSI Model Layers

 Physical Layer : how the physical bits are sent, details all the electrical
and physical specifications for devices

 Link Layer : set of rules that determine when a device can send
data over a particular medium

 Network Layer : handles the movement of packets, i.e. Logical


addressing, Routing & Path Determination

 Transport Layer : accepts the data from a session and formats the
data into segments for transport across the network

 Session Layer : establishes, manages and terminates communication sessions

 Presentation Layer : translates data formats, Encryption and compression are


performed at this level.

 Application Layer : interfaces directly with the application programs running on the
devices
5
Transport Layer
6
Transport Layer
7
UDP – User Datagram Protocol
 Simple Data Transmission Model , basically an application interface to
IP.
 It adds no reliability, flow-control, or error recovery to IP.
 It simply serves as a mux/demux for sending and receiving datagrams
 NO handshake between the communicating hosts

Datagrams can occasionally be dropped and subsequently


not re-sent
arrive at destination in the wrong order
Arrive without integrity of data

 ADVANTAGE : Fast (Ideal for real-time data transmission)

 DISADVANTAGE : Unreliable, no account for the data lost


8
UDP Header
32 Bit

 Source Port : UDP port number of the process on the sending device
 Dest. Port : UDP port number of the process on the destination device
 Length : Size of Packet ( Header + Data )
 UDP Checksum : Verifies integrity of UDP header only
9
UDP

 Use : Two critical systems utilise the UDP transport protocol precisely
due to it's speed :

1. Domain Name System (DNS) which uses UDP for simple


requests and replies to resolve hostnames on the Internet.
2. Dynamic Host Configuration Protocol (DHCP) used to assign
dynamic IP addresses to hosts

 UDP is used for applications like Voice over IP and Online gaming
where not always 100% of the data is required to function
10
TCP – Transmission Control Protocol

 Provides a reliable, ordered delivery of data packets from one


application on one system to another application on another system

 Detects errors, initiates retransmissions, and controls the flow of


information

 Protocol Steps:
1. Set up connection
2. Transfer data
3. Close connection

 ADVANTAGE : flow control and error correction

 DISADVANTAGE : Low speed


11
TCP Header
0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Source Port Destination Port
Sequence Number
Acknowledgement Number
Data - - - - Window
Offset
Checksum Urgent Pointer
Options (0 to 10 Words of 32 Bits)
TCP Payload

 Acknowledgement Number is the sequence number that the receiver


expects to receive next
 Offset is the number of 32-bit words in the TCP header
 Flags : Urgent (URG), Acknowledgement (ACK), Push (PSH), Reset
connection (RST), Synchronous (SYN), Finish (FIN), Congestion
Window Reduced (CWD) and ECN-Echo (ECE)
 Checksum is used to verify the integrity of the TCP header and data
 Urgent Pointer is used when urgent data is being sent
12
TCP
 Uses :

1. Used by Domain Name System (DNS) for larger messages, especially


zone transfers as reliability of the data is much more important in
these cases
2. Used by Border Gateway Protocol (BGP) to maintain the table of IP
networks
3. Ideal for Emails and FTP
13
Session Comparison
14
TCP : Connection

Client Host Client Host

Send SYN seq=x Send FIN seq=x


Receive SYN segment Receive FIN segment
Send SYN seq=y, Send ACK x+1
Receive ACK segment
Receive SYN ACK x+1
+ACK segment Send FIN seq=y,
Receive FIN ACK x+1
+ ACK segment
Send ACK y+1
Send ACK y+1
Receive ACK segment Receive ACK segment

Establishing a TCP Connection Closing a TCP Connection


15
TCP : Data transfer

Client Host

Send Packet 1
Start Timer Packet Lost Packet should arrive
Timer ACK should be sent
ACK would normally
Arrive at this time

Time Expires

Retransmit Packet1
Timer Start Timer Receive Packet 1
Send AXK 1
Receive ACK 1
Cancel Timer
16
Comparison:

TCP UDP
Transport Control Protocol User Datagram Protocol
Addresses several endpoints inside an
purpose
IP device with different Port Numbers
classification connection-oriented connectionless
sequence numbers count no sequence numbers
implementation bytes of the data stream -order and completeness
-order and completeness of packets is not guaranteed
of packets guaranteed
-no retransmission possible
-retransmission of missing
data
flow-control implementation no flow-control
using window sizes to implementation
prevent overflow of receiver

overhead 20 bytes 8 bytes


File-Transfer (ftp) Network Management (SNMP)
applications Web-surfing (http) Network Time Protocol (NTP)
e-Mail (SMTP, pop3) Routing (RIP, OSPF)
17
SCTP
 In order to address the limitations of TCP and UDP the Signaling
Transport (SIGTRAN) working group in the IETF developed SCTP

 Places messages and control information into separate chunks

 Chunk – Data or Control - each identified by a chunk header

 Multi-Streaming : Refers to the capability of SCTP to transmit several


independent streams of chunks in parallel
Eg : transmitting web page images together with the web page text
Features :
• Improved error detection
• Validation and acknowledgment mechanisms protect against
flooding attacks and provide notification of duplicated or missing
data chunks
• Path selection and monitoring select a primary data transmission
path and test the connectivity of the transmission path.
18
SCTP Header
 Consists of two basic sections:
1. The common header, which occupies the first 12 bytes and is
highlighted in blue
2. The data chunks, which occupy the remaining portion of the packet.
 Each chunk has a type identifier that is one byte long yielding, at
most, 255 different chunk types

Bits 0–7 24–31

+0 Source port Destination port

32 Verification tag

64 Checksum

96 Chunk 1 type Chunk 1 length

128 Chunk 1 data

… …

… Chunk N type Chunk N length

… Chunk N data
19
Mapping Layer 4 to Applications
20
Questionnaire:
 In the OSI model, as a data packet moves from the lower to the upper layers, headers are
 Added
 Removed
 Re-arranged
 modified
 In the OSI model, what is the main function of the transport layer?
 node-to-node delivery
 process-to-process message delivery
 Synchronization
 process-to-process message delivery
 _______ is a process-to-process protocol that adds only port addresses, checksum error
control, and length information to the data from the upper layer.
 TCP
 UDP
 IP
 None of the above
 Packets in the IP layer are called _________ .
 segments
 Datagrams
 Frames
 None of the above
21

Thank You

You might also like