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

We currently have a Gateway(debian 5) which is running a dhcp server. Currently a testing phase is going on in the company and the number of VM's are just increasing day by day and ip conflicts are all over the place.( They need internet connectivity on the VM's so it has to run in bridged mode).

I would like to know if there is a method where the dhcp server can assign a range of ip's to the VM's after determining that it is a VM and not a physical machine?

I tried doing this :

subnet 0.0.0.0 netmask 0.0.0.0 {
    range 10.10.10.x 10.10.10.y;
    }

Please advise!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You don't state what virtualisation software you are using, but most allow you to set the mac address of the virtual network interface when using a bridged connection.

For example, using Vmware, you use this method.

If you were to assign MAC addresses, as 00:50:56:XX:YY:ZZ where XX and YY are arbitrary values then you could create static DHCP leases using the ZZ value of your mac address.

For example 00:50:56:12:34:01 would have IP 10.10.10.1 and 00:50:56:12:34:FE would have IP 10.10.10.254.

Again, you don't state what DHCP server you are using, but looking at your example, you could try dropping this in your subnet declaration:

host virtualmachine01 {
    hardware ethernet 00:50:56:12:34:01;
    fixed-address 10.10.10.1;
}

// Miss a few...

host virtualmachineFE {
    hardware ethernet 00:50:56:12:34:FE;
    fixed-address 10.10.10.254;
}
share|improve this answer
    
Virtualization software used is VmWare Workstation 6.5 throughout. DHCP server is isc-dhcpd-4.1.1-P1. host solus{ hardware ethernet 00:14:2a:cf:04:15; option routers 10.10.10.1; option domain-name-servers 10.10.10.1; fixed-address solus.company.com; } It's basically like this, with hosts mapped to their ip's in bind9. I will try to follow the method you've specified. Thank you! –  Nel Mar 25 '11 at 7:49

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.