LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Broadcast over multiple/specific NIC for wake on lan problem (https://www.linuxquestions.org/questions/linux-networking-3/broadcast-over-multiple-specific-nic-for-wake-on-lan-problem-430650/)

jakko 04-01-2006 10:26 AM

Broadcast over multiple/specific NIC for wake on lan problem
 
Hi!

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?

Thanks!

arno 04-02-2006 05:29 PM

You could add a default gw for access to all ipīs (0.0.0.0) to the router table entry for the eth1 nic (give it an higher metric value then the eth0 has).
But in order to make it work you have to take the eth0 down (by ifdown eth0) before you issue the wake-on-lan command after that eth0 can be reactivated.


All times are GMT -5. The time now is 10:18 PM.