# Return IP from multiple NICs

**URL:** <https://discourse.nodered.org/t/return-ip-from-multiple-nics/31270>\
**Category:** General\
**Created:** [7 August 2020 14:20 UTC](https://discourse.nodered.org/t/return-ip-from-multiple-nics/31270 "2020-08-07T14:20:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 August 2020 15:51 UTC](https://discourse.nodered.org/t/return-ip-from-multiple-nics/31270/2 "2020-08-07T15:51:19Z")

</div>

You can use the `ip` command in an exec node to fetch the data you want. For example to get information on all interfaces (try these in a terminal first so you can see what you are dealing with)  
`ip address show`  
so you could run that and then parse the result to find what you want. Alternatively, to get the data for particular interfaces you can run  
`ip address show eth0`  
`ip address show wlan0`  
You could do some of the parsing in the command, so to get the ip4 address (I guess you want that rather than ip6) for wlan0  
`ip address show wlan0 | grep "inet "`  
which should then be quite easy to extract the address from.  
If you study the docs for the ip command there may well be options you can specify to home in on exactly what you want, there are lots of options and I don't know it well enough to say.

---

_[View the full topic](https://discourse.nodered.org/t/return-ip-from-multiple-nics/31270)._
