Broadcast over multiple/specific NIC for wake on lan problem
I'm having a problem with wake-on-lan. The configuration is as follows :
One server, two nics.
One nic is for local lan, and the other is connected directly (crossover) to a NAS (there is a reason why the NAS is connected directly to the server, and not the LAN)
The nic for the LAN is eth0 in the range 192.168.0.xxx, the other eth1 on range 192.168.1.xxx. Up to here everything works great, I can connect without issues, so all links work correctly.
The problem however is when I want to wake-on-lan the NAS from the server. I've tried three different programs (the client app delivered with the NAS, a PERL script and a PYTHON script) to do the WOL, but they all fail. When I tcpdump I see that the broadcast is sent only over eth0 and not eth1 as well. This means that the NAS doesn't get to see the magic WOL packet and won't start up.
The broadcast address used in the scripts is 255.255.255.255, and other ones won't work (I've tried 192.168.1.255 as it said in ifconfig).
Is there any way I can specify which interface to choose when broadcasting the magic packet e.g. in Python?
Or do the routing tables have something to do with this?