TLDR; How do you apply changes to
/etc/udev/rules.d/70-persistent-net.rules without restarting? (See this documentation about ethernet interface logical names.)
I have a bootable USB flash drive running an image made by remastersys of 11.04. I want to be able to use this bootable USB drive to run a DHCP server from any computer. To do this, I have to assign a static IP address to
/etc/network/interfaces and reference
However, the network card is assigned ethX based on MAC address, so this only works on the first computer where the USB flash drive is used -- each subsequent computer's NIC will be assigned to
It seems that there are two strategies that could work to solve this problem:
- Dynamically rewrite
/etc/default/isc-dhcp-serverbased on the first
ethXthat comes up when you run
ifconfig-- this should be whatever NIC is actually in the computer.
/etc/udev/rules.d/70-persistent-net.rulesso that whatever MAC address is assigned to the NIC is named
I know I can do #1 because changes to these files can be applied by restarting
However, #2 seems cleaner to me as I believe the
/etc/udev/rules.d/70-persistent-net.rules will build up a bunch of crud as this USB drive is used in different computers.
Any help would be appreciated.