Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've read that OS sends broadcast packets via the 1st interface with IFF_BROADCAST and that you can set/clear this flag with ifconfig [-]broadcast (without an address). But this doesn't work.

In my case packets to 255.255.255.255 are sent via the WAN interface and I want them to go to LAN. The WAN interface is pppoe and has a p-t-p, not broadcast address. The LAN interface has the default broadcast address 192.168.1.255, but changing it to 255.255.255.255 has no effect.

What seems to work is: route add -host 255.255.255.255 dev br-lan

Then I don't understand what the broadcast address of a network interface is for. Maybe to filter the received broadcast packets? I mean This line:

          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
share|improve this question
    
Why do you want to do this? –  devicenull Dec 29 '13 at 1:58
    
Why aren't you sending to 192.168.1.255? Maybe I'm misunderstanding, but you give the exact use case of having per-interface broadcast addresses, and then say you don't get what they're for. They're for doing what you are trying to do. –  Bandrami Dec 29 '13 at 21:44
    
@Bandrami it's not me, it's the router firmware configuring network –  basin Dec 30 '13 at 8:05
    
@Bandrami I don't send to 192.168.1.255, because the program wol sends to 255.255.255.255 by default and I want it to work with default options –  basin Dec 30 '13 at 8:08
    
The "broadcast address 192.168.1.255" is only another way of saying "we have a 24bit netmask" so it has no relevance for interface selection. –  guntbert Jan 5 at 19:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.