# How read the dynamic IP of a slave for setting dynamically server modbus/tcp

**URL:** <https://discourse.nodered.org/t/how-read-the-dynamic-ip-of-a-slave-for-setting-dynamically-server-modbus-tcp/66294>\
**Category:** General\
**Created:** [10 August 2022 16:52 UTC](https://discourse.nodered.org/t/how-read-the-dynamic-ip-of-a-slave-for-setting-dynamically-server-modbus-tcp/66294 "2022-08-10T16:52:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OscarVasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oscarvasta/32/62116_2.png) [@OscarVasta](https://discourse.nodered.org/u/OscarVasta)\
**Post date:** [10 August 2022 16:52 UTC](https://discourse.nodered.org/t/how-read-the-dynamic-ip-of-a-slave-for-setting-dynamically-server-modbus-tcp/66294/1 "2022-08-10T16:52:13Z")

</div>

Im tryng to link a industrial RTU whith GPRS sim to node-red by modbus/tcp but the slave change IP each time to start. Then cant set de server for any modbus-node. Any one can help me about a metode to read eny incoming connection from a slave to assingn dinamicli de IP to server ?

---

<div class="post-metadata">

**Author:** ![oivheg](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oivheg/32/28180_2.png) [@oivheg](https://discourse.nodered.org/u/oivheg)\
**Post date:** [11 August 2022 07:13 UTC](https://discourse.nodered.org/t/how-read-the-dynamic-ip-of-a-slave-for-setting-dynamically-server-modbus-tcp/66294/2 "2022-08-11T07:13:57Z")

</div>

if i understand you correctly, then you should look at the examples from teh modbus RTU.  
go to Import --\> examples --\> node-red-modbus.. and find the modbus-switch-tcp.  
that one i believe can help you with what you are asking .

the you can set the ip dynamicaly. see the functions related to the modbus node i have circled

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/5/55d58e22ae0937e907d86832fcb6d38e91b98ae5.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 October 2022 07:14 UTC](https://discourse.nodered.org/t/how-read-the-dynamic-ip-of-a-slave-for-setting-dynamically-server-modbus-tcp/66294/3 "2022-10-10T07:14:05Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
