02.02.2018 Views

Practical_modern_SCADA_protocols_-_dnp3,_60870-5_and_Related_Systems

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

98 <strong>Practical</strong> Modern <strong>SCADA</strong> Protocols: DNP3, <strong>60870</strong>.5 <strong>and</strong> <strong>Related</strong> <strong>Systems</strong><br />

Processing on receipt of message:<br />

• Receive T′ = M followed by R′<br />

• Invert R′ <strong>and</strong> form T = M appended with R<br />

• Divide T by P (using modulo-2 division)<br />

• Discard quotient QC, keep calculated remainder RC<br />

• If RC = 0, result is GOOD, copy M to data output<br />

• If RC not = 0, result is BAD, reject message<br />

It is noted that this CRC has a ‘Hamming distance’ of 6. This means that at least 6 bits<br />

must have been received in error to obtain a false GOOD DATA result.<br />

Summary of data link operation<br />

Summary of data link layer:<br />

• Receives link service data units from higher layer<br />

• Forms the LPDU by including addresses, the control byte, <strong>and</strong> CRC codes<br />

• Uses procedures to deliver the frame across the physical layer<br />

• Function codes provide for link initialization <strong>and</strong> error recovery<br />

• Reassembles LSDU at secondary station<br />

• Provides status indications to higher levels<br />

5.5 Transport layer (pseudo-transport)<br />

5.5.1 Description of transport layer<br />

The primary function of the transport layer in DNP3 is to implement message disassembly<br />

<strong>and</strong> reassembly. This allows for the transmission of larger blocks of data than can be<br />

h<strong>and</strong>led by the data link layer. Because this functionality is fairly limited compared to the<br />

wider OSI definition of the transport layer, the prefix ‘pseudo’ is often used. For simplicity<br />

the layer is referred to in this text as the transport layer.<br />

5.5.2 The transport protocol data unit<br />

The transport layer takes the user data, the transport service data unit (TSDU) <strong>and</strong> breaks<br />

it down into one or more transport protocol data units (TPDUs) <strong>and</strong> sends each to the data<br />

link layer for sending. The TPDUs become the user data within the data link layer, that is<br />

the LSDUs.<br />

Recalling that the LSDUs can be a maximum of 250 bytes of user data, this defines the<br />

maximum size of the LPDU, including any transport layer overheads. In fact the transport<br />

functions are accomplished with a single header byte, leaving 249 bytes for carrying data.<br />

This is pictured in the diagram following.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!