|
| 1 | +.. _dnp3resolve: |
| 2 | + |
| 3 | +Resolve Link Addresses |
| 4 | +====================== |
| 5 | + |
| 6 | +Overview |
| 7 | +-------- |
| 8 | + |
| 9 | +The ``dnp3linkaddr`` tool is designed to **discover the link address of a DNP3 outstation**. |
| 10 | +Since many DNP3 deployments require knowledge of the correct remote link address |
| 11 | +before initiating communication, this tool provides automated resolution methods |
| 12 | +instead of relying on brute force. |
| 13 | + |
| 14 | +The tool currently uses two approaches: |
| 15 | + |
| 16 | +1. **Self-Address Method** |
| 17 | + Send a ``REQUEST_LINK_STATUS`` message using the *Self* address (``0xFFFE``). |
| 18 | + If the outstation supports this optional feature, it will reply with its configured link address. |
| 19 | + |
| 20 | +2. **Passive Listening Method** |
| 21 | + Listen for ``REQUEST_LINK_STATUS`` messages periodically sent by the |
| 22 | + outstation (as required by `DNP3 specification section 9.2.6.5`). |
| 23 | + This allows link address resolution without requiring the *Self* address feature. |
| 24 | + |
| 25 | +.. note:: |
| 26 | + |
| 27 | + Some outstations poll at different intervals — typically between **5 and 60 seconds**. |
| 28 | + You may need to wait for up to a full cycle before receiving a ``REQUEST_LINK_STATUS`` frame. |
| 29 | + Be patient, especially when relying solely on the passive listening method. |
| 30 | + |
| 31 | + |
| 32 | +Usage |
| 33 | +----- |
| 34 | + |
| 35 | +**Resolve using the Self-Address method (default):** |
| 36 | + |
| 37 | +.. code-block:: bash |
| 38 | +
|
| 39 | + dnp3linkaddr 127.0.0.1 |
| 40 | +
|
| 41 | +This will attempt to send a ``REQUEST_LINK_STATUS`` message using the *Self* |
| 42 | +address. If the outstation supports it, the tool will display the resolved link |
| 43 | +address. |
| 44 | + |
| 45 | +**Resolve by waiting for a periodic status request:** |
| 46 | + |
| 47 | +.. code-block:: bash |
| 48 | +
|
| 49 | + dnp3linkaddr 127.0.0.1 -no-self -interval 45 |
| 50 | +
|
| 51 | +This disables the *Self* method and waits up to 45 seconds for the outstation to |
| 52 | +send a ``REQUEST_LINK_STATUS`` message. |
| 53 | + |
| 54 | + |
| 55 | +Practical Notes |
| 56 | +--------------- |
| 57 | + |
| 58 | +- The **Self-Address method** is not mandatory in DNP3 and may not be implemented by all outstations. |
| 59 | +- The **passive listening method** is more reliable but depends on the polling cycle of the outstation. |
| 60 | +- Always verify that the **local link address** (``--listen``) matches what the |
| 61 | + outstation expects from the master. |
| 62 | + |
| 63 | +.. hint:: |
| 64 | + |
| 65 | + - Ain't nobody got no time for that - but patience is key here: some |
| 66 | + devices only send ``REQUEST_LINK_STATUS`` messages once every 60 seconds. |
| 67 | + |
0 commit comments