I'm setting up a Linux box for a friend. She lives way out from the city and has to use dial up, but sometimes she can bring the computer into town and connect on my LAN or on someone else's LAN. She also has an NAS that does DHCP, so she can easily back up to it from this box or from her Windows laptop. Her DHCP on the NAS is using the 10.x.x.x address space, since none of her friends use that range for their LANs.
I know I can set up a route for the 10.x.x.x address space so when she dials in to the internet, her NIC will be the gateway for that subnet and the modem will act as gateway for everything else.
But I'd like to make it easy, when she brings the system in for troubleshooting or for other reasons, for her to be able to use that one NIC to access both her NAS and my LAN (or another friend's LAN).
I know I can set up a virtual network interface and give it a specific address. I also understand that I can set up a virtual interface and specify it should use DHCP to get the address.
What I would like to do is to do something like this:
eth0: DHCP, using 10.0.0.4 as DHCP server (or any in the range of 10.x.x.x) eth0:1: DHCP using any DHCP server NOT in the 10.x.x.x address range
Is that possible? I know I can order a cheap USB NIC and then use the motherboard NIC as eth0 and that would connect to the 10.x.x.x network and the USB NIC would connect to any other LAN, but I'm hoping there's a way to do this with virtual interfaces so I don't need another piece of equipment.
Is it possible to specify for a network interface the DHCP server to use or the address range the DHCP server must be in (or must not be in)?