VMware vSphere

 View Only
Expand all | Collapse all

DHCP problem in Virtual Machine

  • 1.  DHCP problem in Virtual Machine

    Posted Jun 08, 2012 09:18 PM

    Hi,

    I am having an issue where virtual machine is not getting the IP from DHCP server. It is working fine when using the static IP address.

    This is my test environment. I have 1 Domain Controller where DHCP and DNS is installed.

    I configured everything properly.

    vSphere5 and windows server 2008 VM.  Are there any tools to troubleshoot this issue? Any ideas?



  • 2.  RE: DHCP problem in Virtual Machine

    Posted Jun 08, 2012 09:24 PM

    With the static IP address are you able to ping the DHCP server? Is the Domain Controller Virtual? If it is is it on the same virtual switch as the VM? Are they in the same subnet?



  • 3.  RE: DHCP problem in Virtual Machine

    Posted Jun 08, 2012 09:27 PM

    Yes, I can ping DHCP server with the static IP address. All of them are virtual machines and on the same subnet.



  • 4.  RE: DHCP problem in Virtual Machine

    Posted Jun 08, 2012 09:36 PM

    If you can confirm that the DHCP server is authorized and running and the appropriate scope is defined, you may use e.g. Wireshark to trace the DHCP handshake (http://wiki.wireshark.org/DHCP)

    André



  • 5.  RE: DHCP problem in Virtual Machine

    Posted Jun 09, 2012 10:37 AM

    Do you know this DHCP server works? That is, can other physical or virtual machines get IP addresses?

    The scope is not full?

    What IP address has the DHCP server and which static IP do you set on your VM? It could that they are in fact on different subnets and the ICMP echo (ping) is routed and through that you have connectivity, but for DHCP which is broadcast based is only for local subnets. (Which could be solved by so called DHCP Relay Agents typically running on routers.)



  • 6.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 03:04 PM

    DHCP server never worked so far. No virtual machine gets the IP so far.

    The scope is 10.125.197.90 to 10.125.197.99. Do you know if the scope has any restrictions.

    I had given the static IP 10.125.197.85 and it worked fine to me. They are on the same subnet.



  • 7.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 05:19 PM

    The DHCP server and the servers wanting DHCP addresses are all virtual machines? Are they on the same host or different?

    If the same host, are they on the same or different portgroups?

    And - is the DHCP server authorized in Active Directory?



  • 8.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 06:31 PM

    All are virtual machines. DHCP server is instaleld on the Domain conroller itself. This is a test setup.

    When I look at the system logs in DHCP server VM, I can see lot of warning messages. They are repeating 2 times in an hour interval. I see bunch of error message related to DHCP.

    "Warning: Scope, 10.125.196.0, is 100 percent full with only 0 IP addresses remaining."

    Later, I have created a new scope 10.125.197.110 to 120. I pinged those IPs before I create a scope. Each ping is timed out and came to know that they are not being used.

    But, I have activated the scope and found the following error in system logs.

    "Warinng: There are no IP addresses available for lease in the scope or superscope "DHCPVMs"."

    I pinged those IPs via command line and they are responding. I don't understand this odd behaviour.  Any ideas?



  • 9.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 06:39 PM

    Rajesh Potru wrote:

    All are virtual machines. DHCP server is instaleld on the Domain conroller itself. This is a test setup.

    When I look at the system logs in DHCP server VM, I can see lot of warning messages. They are repeating 2 times in an hour interval. I see bunch of error message related to DHCP.

    "Warning: Scope, 10.125.196.0, is 100 percent full with only 0 IP addresses remaining."

    Later, I have created a new scope 10.125.197.110 to 120. I pinged those IPs before I create a scope. Each ping is timed out and came to know that they are not being used.

    But, I have activated the scope and found the following error in system logs.

    "Warinng: There are no IP addresses available for lease in the scope or superscope "DHCPVMs"."

    I pinged those IPs via command line and they are responding. I don't understand this odd behaviour.  Any ideas?

    The DHCP server is not able to serve out IPs that are already in use, you'll need to either free up those IPs or expand the scope.



  • 10.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 06:43 PM

    Rajesh Potru wrote:

    All are virtual machines. DHCP server is instaleld on the Domain conroller itself. This is a test setup.

    When I look at the system logs in DHCP server VM, I can see lot of warning messages. They are repeating 2 times in an hour interval. I see bunch of error message related to DHCP.

    "Warning: Scope, 10.125.196.0, is 100 percent full with only 0 IP addresses remaining."

    Later, I have created a new scope 10.125.197.110 to 120. I pinged those IPs before I create a scope. Each ping is timed out and came to know that they are not being used.

    This new scope is in the same subnet as the first? I think you will have to combine them into a "Superscope" for this to work.



  • 11.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 07:39 PM

    There is only one scope. I have deleted the earliest one.

    All those IP's are not in use before I enabled the scope in my DHCP vm. Once, I have created the scope, I am seeing those IPs are being in use which is wierd. I tried with different range as well. Note sure which computers are being served with the new IPs. I have used IPutility tool to track these.

    Do you think my DHCP VM has to get some authorization from our local company n/w DHCP server?



  • 12.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 07:47 PM

    Rajesh Potru wrote:

    Do you think my DHCP VM has to get some authorization from our local company n/w DHCP server?

    The Microsoft DHCP service must be authorized by the AD domain it belongs to. If your machine is also a DC it should not be a problem. Do you see a red or green mark in the DHCP console?



  • 13.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 07:51 PM

    I don't see any red mark. I see green tickmark on IPv4 and scope is in *active* status.



  • 14.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 09:58 PM

    I am providing the IP range that is not in use in DHCP scope (10.125.197.160 to 10.125.197.255). But, Once I click OK and close that window, the whole IP range is being taken by some others. Not sure exactly what is happening here. I have only 3 VM's in my network. But, none of them got an IP from DHCP server.  I am running out of ideas..



  • 15.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 10:14 PM

    Could you provide an output from ipconfig /all from the DHCP server and some screenshots of the DHCP Management console?



  • 16.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 10:47 PM

    Please see the attachments. Thanks for your help.



  • 17.  RE: DHCP problem in Virtual Machine

    Posted Jun 12, 2012 05:34 AM

    I see that you have a subnetted network (/22) so it makes it a little harder to see if the DHCP scope is actually on the same LAN as your DHCP server IP, but it seems to be.



  • 18.  RE: DHCP problem in Virtual Machine

    Posted Jun 13, 2012 05:44 AM

    Hi,

    The first thing I noticed from your 1.JPG screenshot is that the MAC address for the devices registering and taking all your IP addresses are invalid. What I would do to firstly confirm that DHCP and this scope is working would be to create a reservation for the device you are trying to get a DHCP address for. Then clear the devices with a name of BAD_ADDRESS - this will then reserve at least one IP for your device which you can then turn on and see if it gets an IP. I expect this to work though it may take the lease period to expire for the device before it does. I can see other things have managed to get a DHCP address before the scope was filled up so pretty sure DHCP is "fine"

    Once it has been confirmed that DHCP is actually working then the next step is better taken with a large glass of water and a large concrete pill. Since the MAC address is not registering correctly what I would do is install your favourite packet capturing tool and run this for a few minutes. Looking through this you should be able to retreive the real MAC addresses from the devices that are filling up the DHCP scopes.

    In the one case I have seen this happen it was due to APC power rails trying to get a BOOTP address but our DHCP server (or rather the scope) was not configured to allocate BOOTP addresses. This resulted in a malform request to the DHCP server that filled up the scope.

    Now that I have scared you with the network capture stuff another option that may work is to allow both DHCP and BOOTP requests to be responded to by the DHCP server. This should at least allow the device to get an IP and from here you will be able to see a MAC address which should allow you to track down the devices or at least type of devices. My money would be on VOIP phones or the like.

    Let us know if this helps.

    Kind regards.



  • 19.  RE: DHCP problem in Virtual Machine

    Posted Feb 18, 2013 05:00 PM

    DHCP scope IP's are being stolen by other VM's or switch ports etc. in the same network. Since, This is a flat network and any person who is spinning a VM is being served by my DHCP VM. So, I freed those IP's and again still being occupied instantaneously.

    So, I have requested the network admin to create a seperate VLAN and sepearate subnet for my testing so that my DHCP IP's won't be grabbed by someone else :smileyhappy:



  • 20.  RE: DHCP problem in Virtual Machine

    Posted Jun 11, 2012 06:07 PM

    Is there any VLAN route? You can also check the mac adress table in your switch is the nay LAN mac address?

    abirhasan 


  • 21.  RE: DHCP problem in Virtual Machine

    Broadcom Employee
    Posted Jun 08, 2012 11:24 PM

    I am going to state the obvious here. Make sure your servers are inthe same network/vSwitch. Check the eventlogs on your DHCP server.