3

I have one DHCP server which provides the IP address to cleints.

But for my testing i want that one other computer should act as DHCP server and give IPs to three virtual machines on that computer ,but in different range as the other server

Is it possible

Window 2008 server

5 Answers 5

2

You would only have one DHCP server, just setup multiple DHCP scopes. Information on configuring scopes here: http://technet.microsoft.com/en-us/library/dd759218.aspx

2
  • When i add new scope then in the end it says it conflicts with the previous scope my previous scope has ip 10.0.11.1 - 10.0.11.200 with subnet 255.255.255.0 i want new scope from 10.0.11. 201 - 10.0.11.210 with 255.255.255.0 where i am doing wrong with subnet or with addresses
    – John
    Dec 14, 2009 at 3:21
  • This sounds like you are trying to add reservations in the same subnet as your general scope. With the ISC dhcpd, just add the out-of-pool reservations. dhcpd prefers it this way Dec 14, 2009 at 3:39
2

IN the past dhcpd scopes were the only way togo, but for a while now DHCPD offers a type of clustering of DHCP servers. The setup is not to hard. Full detail here, but I have cut and paste the details here to make things simpler.

Server examples:

dhcp-server-a (192.168.200.2/24)

authoritative;
ddns-update-style none;

failover peer "dhcp-failover" {
  primary; # declare this to be the primary server
  address 192.168.200.2;
  port 647;
  peer address 192.168.200.3;
  peer port 647;
  max-response-delay 30;
  max-unacked-updates 10;
  load balance max seconds 3;
  mclt 1800;
  split 128;
}

subnet 192.168.200.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.200.255;
  option routers 192.168.200.1;
  option domain-name-servers 192.168.200.1;
  pool {
    failover peer "dhcp-failover";
    max-lease-time 1800; # 30 minutes
    range 192.168.200.100 192.168.200.254;
  }
}

dhcp-server-b (192.168.200.3/24)

#
# /etc/dhcpd.conf for secondary DHCP server
#

authoritative;
ddns-update-style none;

failover peer "dhcp-failover" {
  secondary; # declare this to be the secondary server
  address 192.168.200.3;
  port 647;
  peer address 192.168.200.2;
  peer port 647;
  max-response-delay 30;
  max-unacked-updates 10;
  load balance max seconds 3;
}

subnet 192.168.200.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.200.255;
  option routers 192.168.200.1;
  option domain-name-servers 192.168.200.1;
  pool {
    failover peer "dhcp-failover";
    max-lease-time 1800; # 30 minutes
    range 192.168.200.100 192.168.200.254;
  }
}
1
  • Sorry just now noticed windows 2008 server.... my bad :) Dec 14, 2009 at 4:42
0

You can't run multiple DHCP within the same network without special conditions. Level 3 switches and routers have the ability to route DHCP request, and you can send them to specific servers at that point. You can set up scopes, which can handle request for/in multiple subnets

Depending on your virtual management software you might be able to do what you want. Your software might be able to configure the Host machine as a router, and if it does, it should automatically do dhcp for you. If you have enough configuration, you can have your Host machine forward request to your main DHCP server which would then be able to hand out IP's from the proper scope.

0

You can have multiple DHCP servers on a network if they are set to only hand out addresses to certain machines.

It's common to have a DHCP server just handing out IP to certain MAC addresses for testing, especially for embedded systems. Tiny DHCP is a simple DHCP server that runs on windows

0

Depends on your dhcp server software.

If you have the isc dhcpd, it should be relatively straight forward to add a second scope which only contains reservations for the three specific targets. As long as the server has a virtual interface on the subnet that the three specific targets are on, it should offer the reservations to those clients, not general-pool leases from the general pool.

You must log in to answer this question.