Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is similar to some other questions, but I have a specific need which is not covered in the other questions.

I have an Ubuntu server (11.10) with two NICs. One is built into the motherboard and the other is a PCI express card. I want to have my server connected to the internet via my NAT router and also have it able to wake from suspend using a Magic Packet (henceforth referred to as Wake-On-LAN, WOL). I can't do this with just one of the NICs because each has an issue - the built-in NIC will crash the system if it is placed under heavy load (typically downloading data), whilst the PCI express NIC will crash the system if it is used for WOL. I have spent some time investigating these individual problems, to no avail.

My plan is thus: use the built-in NIC solely for WOL, and use the PCI express card for all other network communication except WOL. Since I send the WOL Magic Packet to a specific MAC address, there is no danger of hitting the wrong NIC, but there is a danger of using the built-in NIC for general network access, overloading it and crashing the system.

Both NICs are wired to the same LAN with address space The built-in ethernet card is set to have interface name eth1 and the PCI express card is eth0 in Ubuntu's udev persistent rules (so they stay the same upon reboot).

I have been trying to set this up with the /etc/network/interfaces file. Here is where I am currently:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static

I think by not specifying a gateway for eth1, I prevent it being used for outgoing requests. I don't mind if it can be reached on on the LAN, i.e. via SSH -- it's IP is irrelevant to WOL, which is based on MAC addresses -- I just don't want it to be used to access internet resources.

My kernel routing table (from route -n) is

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    100    0        0 eth0     U     1000   0        0 eth0   U     0      0        0 eth0   U     0      0        0 eth1

My question is this: Is this sufficient for what I want to achieve? My research has thrown up the idea of using static routing to specify that eth1 should only be used for WOL on the local network, but I'm not sure this is necessary.

I have been monitoring the activity of the interfaces using iptraf and it seems like eth0 takes the vast majority of the packets, though I am not sure that this will be consistent based on my configuration. Given that if I mess up the configuration, my system will likely crash, it is important to me to have this set up correctly!

share|improve this question
up vote 6 down vote accepted

For WOL, you don't need to integrate the interface into the system, it doesn't need an IP address or anything else. All that is needed is that the system wakes up if it receives an WOL signal, which is handled by the BIOS, outside the control of any operating system.

So, in Linux just configure only the interface that you need and you are done.

share|improve this answer
A really minor nit-pick; it's the ACPI interface in the BIOS, and it's somewhat configurable by the OS (though BIOS settings may well override it too). Still +1 as the rest is 100% correct. – Chris S Mar 20 '12 at 12:47
Okay, I've played around a bit and it looks like I do need to bring up the WOL interface in /etc/network/interfaces in order for WOL to work. I just specified it as a static IP address and gave it a dummy address of, so that linux would allow me to bring it up. This seems to work -- there is no route for eth1 listed and I can still use WOL using it's MAC address. – James Womack Mar 20 '12 at 16:19
EDIT: Just found out that you can bring up an interface without specifying an address at all using the "manual" method (see man interfaces). I think I have answered my own question -- might post a full answer soon. – James Womack Mar 20 '12 at 16:27

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.