DNP
Protocol Architecture
IEC Enhanced Performance Architecture
Application
Presentation
Session
Transport
Network
Data Link Layer
Physical
Basic Message Breakdown
Application Message Unlimited Size
Pseudo Transport frame = 2048 Bytes (MAX)
Data Link frames = 292 Bytes (MAX)
Physical
Communication Media
DNP
Transport Link Layer
Transport Layer Functions
It is the responsibility of the transport layer to break long
messages into smaller frames sized for the link layer to
transmit, or when receiving, to reassemble frames into
the longer messages.
In DNP3 the transport layer is incorporated into the
application layer.
The transport layer requires only a single octet within the
message to do its work
DNP Transport Layer
Transport Layer Receives TSDU (User data) and break
them into sequenced TPDUs. (each with Transport
Protocol Control Information (TPCI)).
Each TPDU is sent to the data link layer as Link Service
Data Unit (LSDU) for transmission.
The transport layer receives multiple TPDUs from the
data link layer and assembles them into one TSDU.
When the transport function breaks the message and
create an LSDU, a transport layer header (TH) octet is
added in the beginning of the fragment.
All Transport layer messages have a TH.
DNP Transport Layer
The secondary station checks the TH octet on
reception of each LSDU for the correct
sequence and builds a TSDU message for
higher layers.
The TH contains information that can identify the
first frame, last frame and give every frame a
six-bit sequence number. This information is
required to reconstruct a message
TRANSPORT HEADER
TH User Data
After Data link layer receives a packet of data, it
is presented to the transport layer as shown
above.
The TH field is stripped out before the frame is
combined with other frames belonging to the
same message.
TH – Transport header (one octet in length)
User Data – 1 to 249 octet in length.
TRANSPORT HEADER FIELD DEFINITIONS
TH Bit Definitions- FIN
FIN- The final bit indicates that this frame of user
data is the last frame of a sequence which
compromises a complete user message.
FIN = 0 More frames follows
FIN = 1 Final Frame of sequence
TH Bit Definitions- FIR
The first bit indicates that the frame is the first in
a sequence of frame(s) which comprise a
complete message.
When a secondary station receives a frame with
the FIR bit set, all previously received
unterminated frame sequences are discarded.
If a complete user message is only one frame in
length, both the FIR and FIN bits are set.
FIR = 1First frame of a sequence.
FIR = 0 Not the first frame of a sequence.
TH Bit Definitions- Sequence
The sequence number of the frame is used to check that
each frame is being received in sequence.
It guards against missing or duplicated frames.
All user messages start off with a sequence specified in
the first frame which has the FIR bit set
After sequence number 63 the next sequence number
will be 0.
The sequence number does not have to increment
across message boundaries, i.e. any sequence number
is valid when the FIR bit is set.
FRAME ASSEMBLING
The first frame of the message identified by having the
FIR bit set in the TH field.
The last frame is identified by having the FIN bit set in
the TH field
Source =n Assembling of Data From
FIR =1 Three Data Frames
FIN=0
SEQ =3
USER DATA0
Source =n USER DATA 0
FIR =0
FIN=0
SEQ =4
USER DATA1
USER DATA 1
Source =n USER DATA 0
FIR =0
FIN=1
SEQ =5
USER DATA2
USER DATA 2
USER DATA 1 Complete message
to application layer
USER DATA 0
TRANSPORT SERVICES AND
RESPONSIBILITIES - TRANSPORT FUNCTIONS
The pseudo-transport layer is responsible for
performing the following functions:
Packing user data into multiple frames (more than
one) of the defined DNP V3.00 Data Link frame
format and using the services of the DNP V3.00
Data Link for transmitting the data
Unpacking multiple frames that are received from
the data link into user data
Controlling all aspects of the data link excluding
data link configuration.
TRANSPORT SERVICES AND
RESPONSIBILITIES - TRANSPORT FUNCTIONS
The pseudo-transport layer is responsible for
performing the following Services:
Exchange of SDUs between peer DNP V3.00 pseudo-
transport layers
Error notification to transport user
Sequencing of SDUs
Prioritized SDU delivery
Quality SDU delivery.