Re: Preventing loopback broadcasts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ilona wrote:

> Hi,
> I'm writing a program to forward udp broadcasts.
> For protocols such as NNBS and Browser protocol, I need to have 
> multiple subnets appear as one broadcast subnet - for these udp ports.
> For this to happen,  broadcasts received on certain udp ports are 
> broadcast forward on the other interfaces.
> Unfortunately for me, these broadcasts are received back at me, on the 
> interfaces on which they were sent out,
> reulting in a loop.

This is really only a special case of a more general problem: if there 
is a loop in the network itself, you will propagate these packets around 
the loop forever.  One of the most simple approaches to this (you are 
essentially looking at the dense multicast forwarding problem) is 
reverse path forwarding (RPF).  In RPF, each received packet from source 
S is rebroadcast only if it arrived on the interface upon which packets 
_to_ S would be routed - i.e., if they came along the reverse of the 
path to S.  Other solutions are possible (as a brief search through the 
multicast routing literature will show) but few are as simple as RPF, or 
as easy to implement.

> To block these broadcast loopbacks, I tried using the setsockopt 
> command, with the IP_MULTICAST_LOOP set to zero (hoping that, since 
> broadcasts are specific cases of broadcast, this would work) but to no 
> avail.
> Does anyone have any ideas as to how this can be done?
> Help, please!
> Thanks
> Ilona
>
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Casey Carter
Casey@Carter.net
ccarter@uiuc.edu
AIM: cartec69



-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux