0% found this document useful (0 votes)
10 views

DNP_DataLink_layer

The document outlines the DNP3 protocol architecture, detailing its structure based on the OSI model, specifically focusing on the Data Link Layer. It describes the frame format, control fields, and various function codes used for communication between primary and secondary stations. Additionally, it explains the transmission procedures for sending and confirming user data, including error handling and link status requests.

Uploaded by

toshi.naman
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

DNP_DataLink_layer

The document outlines the DNP3 protocol architecture, detailing its structure based on the OSI model, specifically focusing on the Data Link Layer. It describes the frame format, control fields, and various function codes used for communication between primary and secondary stations. Additionally, it explains the transmission procedures for sending and confirming user data, including error handling and link status requests.

Uploaded by

toshi.naman
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

DNP

Protocol Architecture
 IEC Enhanced Performance Architecture

Application

Presentation

Session

Transport

Network

Data Link Layer

Physical

 DNP3 is built on OSI Layers 1,2 and 7


Basic Message Breakdown
Application Message Unlimited Size

Pseudo Transport frame = 2048 Bytes (MAX)

Data Link frames = 292 Bytes (MAX)

Physical

Communication Media
DNP
DATA Link Layer
Data Link Layer
 The Data Link Layer is the second layer in the
Open System Interconnection (OSI) model.

 The data link layer accepts, performs and


controls transmission service functions required
by the higher layers.
PURPOSE OF THE DATA LINK LAYER

 The data link layer must provide transfer of information or


Link Service Data Unit (LSDU) across the physical link as
described by the ISO-OSI standard.
 LSDU is converted to LPDU
 individual LPDUs received by the data link layer must be
assembled into one LSDU and passed to higher layers.
 The layer provides for frame synchronization and link
control

 Data link provides indications of other events such


as link status
FT3 FRAME FORMAT
 An FT3 frame is defined as a fixed length header block followed
by optional data blocks.

 START 2 starting octets of the header (0x0564).


 LENGTH - 1 octet count of USER DATA in the header and body.
This count includes the CONTROL, DESTINATION and SOURCE
fields in the header. The CRC fields are not included in the count.
The minimum value for LENGTH is 5 indicating only the header is
present and the maximum value is 255.
 CONTROL Frame control octet.
FT3 FRAME FORMAT (Contd..)

 Destination - 2 octet destination address. The first octet is the LSB and
the second octet is the MSB.
 Source - 2 octet Source address. The first octet is the LSB and the second
octet is the MSB
 CRC - 2octet Cyclic Redundancy Check sum.
 User Data - Each block following the header has 16 octets of User
defined data except the last block of a frame which contains 1 to 16 octets of
User defined data as needed.
Control Field
 The control field contains the direction of the frame, type of frame and
flow control information.

 DIR – Physical Transmission Direction (1- Station A to B)


 PRM – Primary Msg ( 1 = frame from primary/initiating station ,
0=frame from secondary/responding station)
 FCB – Frame count bit
 FCV – Frame count bit valid
 DFC – Data flow control bit
 Function code
FCB & FCV

 The frame count bit is used for suppressing losses and


duplication of frames to the same secondary station. This
bit toggles for each successful SEND-CONFIRM service
that is initiated by the same primary station and directed
to the same secondary station.
 The frame count valid bit enables the functioning of the
FCB bit.
 FCV =0 indicates the state of the FCB bit is ignored
 FCV =1 indicates to a secondary station that the state of
the FCB bit must be checked against the state of the FCB
bit of the last frame sent with the FCV bit set.
DFC

 The data flow control bit is used to prevent the


overflowing of buffers in a secondary station.
 The secondary station returns this bit set to a 1
if further SEND of user data to this secondary
station will cause data link buffers to over flow.
 The primary station must interrogate the
secondary station using REQUESTRESPOND
Request Link Status until the DFC is returned
with a value of 0.
FUNCTION CODE from Primary Station (PRM =1)
 The function code identifies the type of frame.
FUNCTION CODE from Secondary Station (PRM =0)
Source and Destination Address
 The source address field is 2 octets in size and specifies the
address of the station that the frame originated from.

 The first octet of the address is the low order octet and the second
octet is the high order.
 The destination address field is 2 octets in size and specifies the
address of the station that the frame is directed to

 The first octet of the address is the low order octet and the second
octet is the high order.
CRC Fields
 A two octet cyclic redundancy check is appended to each block in a
frame.
 The START,LENGTH, CONTROL, DESTINATION and SOURCE
fields are all included whencalculating the CRC for the header.
 The two octet CRC is generated from the following polynomial
Data Link layer frame format
User Data

 The blocks following the header may contain from 1 to


16 octets of user data.
 If more than 16 user data octets follow the header (block
0), each block must contain 16 octets of data except for
the last block. The last block will contain the leftover.
 Each data block has a CRC appended to it.
 The data link layer passes all of the user data and the
source address from the header to the higher layers
when a SEND user data frame is received.
DATA LINK FUNCTION CODES -Reset

This function code is used to synchronize a primary and


secondary station for further SEND-CONFIRM transactions.
 The RESET command only enables communications in one
direction, from the primary to the secondary station.
 The primary station must send this function code when it
wishes to first communicate with the secondary station or
after a communications failure has been recognized by the
primary station.
 In ‘Un-rest’ state the secondary station will not accept
messages from the primary station until it has received and
replied to a RESET command from that primary station.
 The RESET command also synchronizes the FCB bit
between primary and secondary stations.
DATA LINK FUNCTION CODES -Reset of User
Process

 This function code is used to reset the data link


user process.
 Upon reception by a secondary station, an
INDication should be sent to the data link user.
 If accepted by the data link user, an ACK
confirm frame is sent in reply otherwise a NACK
confirm frame is sent in reply.
DATA LINK FUNCTION CODES -Test

 The TEST command is used to test the state of the


secondary data link.
 The secondary station compares the FCB bit in the
primary message with the expected FCB for that primary
station.
 If they do not match the secondary should send the last
secondary confirm frame.
 Else it should send a ack confirm frame and toggle the
expected fcb for the primary
 The secondary station also sets the DFC bit accordingly
in the response.
DATA LINK FUNCTION CODES –User Data
 The User Data function is used to send confirmed data to a
secondary station.
 The frame sent contains the user data from the primary data
link user that is to be passed to the data link user of the
secondary station.
 The primary station expects an ACK from the secondary
station confirming a successful transaction
 Upon reception of this message, if the secondary station data
link layer user is not ready to accept the message, the
secondary station sends a NACK to primary.
 In this case the primary station will wait and retry for till a
configured number of retries or set the secondary station as
offline.
DATA LINK FUNCTION CODES –
Unconfirmed User Data
 This function is used to send user data to the
secondary station without needing confirmation.

 The frame sent contains the user data from the primary
data link user that is to be passed to the data link user
of the secondary station.

 Efficient bandwidth usage due to the lack of


confirmation messages.
DATA LINK FUNCTION CODES –Request Link
Status

 This command is used to request the status of the


secondary data link.
 A secondary station will respond to this request with
a LINK STATUS confirm frame with the DFC bit set
to 1 if the data link is busy or the data link user
cannot accept any more user data and 0 indicating
that the data link is not busy and the data link user
can accept more user data.
Transmission Procedure -Reset of Secondary
Link
Transmission Procedure -Reset of User
Process
Transmission Procedure –Send/Confirm User
Data
Transmission Procedure –Send/Confirm User
Data Multiple frames
Transmission Procedure –Send/ no reply
expected
Transmission Procedure –Send/Nack
Transmission Procedure –Request / Respond

You might also like