# Udp out, eth0 interface

**URL:** <https://discourse.nodered.org/t/udp-out-eth0-interface/82504>\
**Category:** General\
**Created:** [31 October 2023 23:13 UTC](https://discourse.nodered.org/t/udp-out-eth0-interface/82504 "2023-10-31T23:13:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubasmyk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kubasmyk/32/38021_2.png) [@kubasmyk](https://discourse.nodered.org/u/kubasmyk)\
**Post date:** [31 October 2023 23:13 UTC](https://discourse.nodered.org/t/udp-out-eth0-interface/82504/1 "2023-10-31T23:13:18Z")

</div>

Hi there,

I’m trying to send udp broadcast message to ip address 255.255.255.255  
I can see the message successfully comes out on the eth1 as this is where my router with internet location is located.

However I require the udp to be sent to eth0 which I have some hardware in need of communicating with.

How can i do this?

Also Im able to listen to broadcast messages just fine using udp in node just fine with packets from my special hardware.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [1 November 2023 10:13 UTC](https://discourse.nodered.org/t/udp-out-eth0-interface/82504/2 "2023-11-01T10:13:48Z")

</div>

This is a networking issue so not Node-RED dependent. Instead it will depend on your operating system. The issue is that your default route will be pointing to the internet which is probably what you want to maintain. Do you really need to broadcast to 255.255.255.255 ? You should be able to use the broadcast address of the subnet that eth0 is on ... eg 192.168.1.255 or 10.255.255.255 for example. (depending on the class of the subnet) and then it should go to that subnet instead.

---

<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:** [1 November 2023 13:23 UTC](https://discourse.nodered.org/t/udp-out-eth0-interface/82504/3 "2023-11-01T13:23:10Z")

</div>

Assuming that you are on a debian based OS then the command `route` will show you the mask to use for the interface. You may have to install the net-tools package.

---

<div class="post-metadata">

**Author:** ![kubasmyk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kubasmyk/32/38021_2.png) [@kubasmyk](https://discourse.nodered.org/u/kubasmyk)\
**Post date:** [1 November 2023 15:25 UTC](https://discourse.nodered.org/t/udp-out-eth0-interface/82504/4 "2023-11-01T15:25:22Z")

</div>

sudo ip route add 255.255.255.255/32 dev eth0 worked for me nicely

---

<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:** [15 November 2023 15:26 UTC](https://discourse.nodered.org/t/udp-out-eth0-interface/82504/5 "2023-11-15T15:26:17Z")

</div>

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