Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to configure dhcpd (on a Linux box) to assign a Windows PC 2 separate IP configurations? Right now I've configured the two IP addresses manually and it does exactly what's needed, but I can't figure out how to achieve the same thing with DHCP.

For example, is it possible to set up a virtual interface that piggy-backs onto the first interface and gets its own configuration?

Alternatively, is it possible to run a script upon getting IP values from DHCP that would then be able to configure the secondary IP?

share|improve this question
    
That's not how DHCP works. Just out of curiousity, why does the PC need 2 separate IP configs? Perhaps we can offer an alternative solution. –  John Gardeniers Jan 10 '11 at 21:31
    
I'm trying to match the current topology, but yes I'm starting to think this warrants a separate question. –  IndigoFire Jan 11 '11 at 23:10
add comment

2 Answers

up vote 1 down vote accepted

I tried to tackle this a few years ago.. I got halfway there and forgot about the project.

Virtualization software (VMWare, VirtualPC) virtual NICs can pull DHCP through the host's NIC, so it can certainly be done..

I ended up making use of a 'Virtual Loopback Adapter'

Here'e the thread on EE (scroll down) - http://www.google.com/#q=http://www.experts-exchange.com/Networking/Protocols/Transport/TCP-IP/Q_24010688.html

Good luck!

share|improve this answer
    
support.microsoft.com/kb/839013 < link to virtual loopback adapter –  goofology Jan 10 '11 at 19:06
    
Thanks for this. I've tried installing the loopback and bridging it, but Windows then treats it as one adapter. If it could be used as an ethernet bridge with two separate IP layers, that would be ideal. Seems to me like this is pretty close to impossible with the basic Windows tools. –  IndigoFire Jan 13 '11 at 16:41
add comment

When you make a virtual network device (which you're doing on your windows PC), you should set its MAC address to be different from the physical network card. If they both make DHCP requests, they should be treated as two different machines, and each be given separate IP addresses. If you set up your DHCP server (on your linux machine) to reserve IP addresses to either of them, or both of them, then you can specify what addresses each interface will receive.

In general, DHCP servers aren't aware of the physical layer, but the DHCP request made includes the mac address of the requesting interface. Because this is a field in the packet which is volunteered by the DHCP protocol, rather than being automatically attached by the physical network device, you should be able to get this working simply by creating a virtual network device, and setting its MAC address (sometimes referred to as MAC address spoofing).

share|improve this answer
add comment

Your Answer

 
discard

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.