UDP Broadcast and multiple interfaces

60 views
Skip to first unread message

Paul J R

unread,
Sep 22, 2016, 2:08:01 PM9/22/16
to nodejs
Hi All,

For the last couple of days i've been attempting to implement a DHCP server and have run up against a few limitations that I think spell the end of idea (in pure JS at least).

Handing udp broadcast itself is fairly straightforward, but when its coming in from multiple interfaces there seems to be no way to know which interface a message arrived on - which makes processing dhcp more or less impossible. I was just wondering though if anyone has tried to do something like this with any success?

John Shaver

unread,
Sep 23, 2016, 12:14:40 PM9/23/16
to nod...@googlegroups.com
Hey Paul,

I've not tried this myself, but wouldn't you specify which address to
listen to (and therefore which interface) when you call bind. If you
specify, that address, it should only listen on the interface
associated with that address, right? If you wanted to listen on
multiple interfaces, you could create a new server for each address to
call bind on. Maybe I'm completely off base, there. Hope it helps.

-John Shaver
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+un...@googlegroups.com.
> To post to this group, send email to nod...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/4236f8d0-00ba-4d00-b7a7-aa7013353a2c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages