Re: UDP Broadcast on machine with multiple NIC cards

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Phil Frisbie, Jr. (phil_at_hawksoft.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 09:17:24 -0700

joe wrote:

> Hi,
>
> I need to send a broadcast to the private LAN in a workstation that has
> multiple NIC cards.
>
> When I send a UDP packet to INADDR_BROADCAST which is defined as
> "255.255.255.255", the packet is broadcast to all NIC's in the workstation.
>
> My question is - how do I restrict the broadcast to a specific Interface,
> yet still use 255.255.255.255 as the destination?

When you bind the UDP socket to an IP/port do you use INADDR_ANY or the actual
address for the interface?

-- 
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com


Relevant Pages

  • UDP Broadcast on machine with multiple NIC cards
    ... multiple NIC cards. ... When I send a UDP packet to INADDR_BROADCAST which is defined as ... the packet is broadcast to all NIC's in the workstation. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Help! "Martian" (packet) invasion via FiOS cablemodem
    ... The wording in "TCP/IP Blueprints" suggests that broadcast packet ... interface internal to cable modem, it's a device talking _to_ it. ... from Verizon or the Internet). ... If the packets annoy you, use iptables to quietly drop (all from ...
    (comp.os.linux.networking)
  • Re: Different behavior of pinging INADDR_BROADCAST?
    ... interface that is specified via its broadcast address. ... taking "local hardware network" to be the specific interface that is to be ... And a patch for 'ping' should be applied ...
    (freebsd-net)
  • Re: Do UDP broadcasts work in FreeBSD?
    ... sending a UDP packet to 255.255.255.255 will actually cause a packet with that destination to be generated from all network interfaces which are "UP". ... On FreeBSD, IIRC, the behavior you get is that it will send to the local network broadcast address for each interface using the network broadcast address. ...
    (freebsd-questions)
  • Re: Binding sockets to devices in FreeBSD
    ... be configured with the same broadcastaddress in FreeBSD. ... > same netmask and thus broadcast address). ... IP_SENDSRCADDR to set the souce of a packet. ... IP_ONESBCAST option and use the broadcastaddress of the interface on ...
    (freebsd-net)