Announcement

Collapse
No announcement yet.

virtual machine won't get its IP address from router by DHCP :(

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • virtual machine won't get its IP address from router by DHCP :(

    In brief:

    I'm having difficulty getting my virtual machine to acquire its IP address, using DHCP, from my [physical] router. It is getting an IP address, but not the address I specify using the router's interface!

    The problem seems to be unique to my VM; I have no problems doing this with physical PCs.


    Here is my problem in more detail:

    I have several (physical) PCs. They all get their IP addresses from my Linksys router: http://en.wikipedia.org/wiki/Linksys_WRT54G_series (which is running DD-WRT firmware).

    I have just set up a virtual machine, running Windows XP Pro, as a guest OS on Virtual Server. (This is hosted on my main Windows Vista PC.)

    I want the VM to acquire its IP address in the same way as my physical PCs, via DHCP. Using VMRC+ I have given my VM a [virtual] NIC that is connected to the host's physical NIC.

    Using my router's web interface, I added the virtual NIC's MAC address to the list of static leases in the usual way. This did not have the desired effect: the VM does indeed seem to get an IP address by DHCP, but it gets an arbitrary IP address, not the one I specified using the router's interface!

    It does look like the router is indeed dishing out an IP address, but it is as though the router does not identify the VM's MAC address correctly, so it gives the VM a randomly chosen 'spare' IP address 192.168.1.x.





    Stuff I have tried:
    • I have verified that the host and guest have different MAC addresses.
    • I have double- and triple-checked that the MAC address in my static lease table is the correct MAC address for the VM's NIC.
    • I have verified the virtual MAC address, both using ipconfig -all on the VM, and in VMRC's 'settings' page for my VM.
    • I have tried setting the virtual MAC address to 'static', using the VMRC+ interface, as I noticed it occasionally changed when set to the default 'dynamic'.
    • Again using VMRC+, I have verified that for my external network - the network to which my VM's NIC is connected - the 'built-in DHCP server' is disabled (which is the default setting).
    I came to this forum because the problem seems specific to my VM. I don't have DHCP problems with any physical PCs.


    Any advice would be welcome!

  • #2
    Re: virtual machine won't get its IP address from router by DHCP

    If you need a specific IP address for some reason, I would recommend setting it as a static address rather than relying on a DHCP reservation.
    Gareth Howells

    BSc (Hons), MBCS, MCP, MCDST, ICCE

    Any advice is given in good faith and without warranty.

    Please give reputation points if somebody has helped you.

    "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

    "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

    Comment


    • #3
      Re: virtual machine won't get its IP address from router by DHCP

      D you use a bridged nic on the virtual machine?
      Marcel
      Technical Consultant
      Netherlands
      http://www.phetios.com
      http://blog.nessus.nl

      MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
      "No matter how secure, there is always the human factor."

      "Enjoy life today, tomorrow may never come."
      "If you're going through hell, keep going. ~Winston Churchill"

      Comment


      • #4
        Re: virtual machine won't get its IP address from router by DHCP

        First, the official point of view: Vista is not a supported host OS!
        Second: please check in your DHCP server if the MAC the VM reported is the same with the MAC you set on the VM itself.

        Sorin Solomon


        In order to succeed, your desire for success should be greater than your fear of failure.
        -

        Comment


        • #5
          Re: virtual machine won't get its IP address from router by DHCP

          Originally posted by sorinso View Post
          First, the official point of view: Vista is not a supported host OS!
          Apologies. For clarity, I am using Vista Business, which I believe is supported:
          http://www.microsoft.com/downloads/d...displaylang=en
          http://www.microsoft.com/downloads/d...displaylang=en
          (I hope these links work ok.)

          Comment


          • #6
            Re: virtual machine won't get its IP address from router by DHCP

            Originally posted by sorinso View Post
            Second: please check in your DHCP server if the MAC the VM reported is the same with the MAC you set on the VM itself.
            It is. However I'm very pleased to announce your suggestion indirectly helped me find the source of the problem. I appreciate all the replies, so for completeness I'll post what was going wrong...


            The problem relates to DHCP, rather than being a VM issue per se; however I think the problem occurred due to the default setting of Virtual Server, which is for NICs to have dynamic MAC addresses.

            So, this may be a problem that is more likely to afflict VMs than physical NICs.

            Basically I'm being a bit of an amateur with DHCP (I confess I'm no network expert). At some point the router allocated the desired IP address of 192.168.1.103 to my VM. Then Virtual Server decided at some point to change the MAC address. I remedied the situation by making the VM's MAC address static, and updating the DHCP reservation table on the router.

            Unfortunately my router did not 'free up' the desired IP address, which was still reserved for the defunct virtual NIC. Sorinso, your reply prompted me to look more closely at my router's DHCP client list, on its LAN status screen:


            Host Name IP Address. . MAC Address . . . Expires
            --------- ------------- ----------------- -------
            dev-pc. . 192.168.1.101 00:10:5E:XX:XX:XX never
            server64. 192.168.1.102 00:50:11:XX:XX:XX never
            xppro-vm. 192.168.1.103 00:03:FF:A4:EE:BE never
            eee-pc. . 192.168.1.104 00:15:AF:XX:XX:XX never
            vista-pc. 192.168.1.105 00:01:29:XX:XX:XX never
            * . . . . 192.168.1.106 00:03:FF:AE:EE:BE never


            The penny dropped when I noticed there is a 'Delete' button next to each entry in this table!

            It would seem that, since 192.168.1.103 - reserved for a NIC that no longer exists - had not expired, my router opted to conjure up a new IP address (192.168.1.106) for my VM.

            The MAC I've highlighted in red was the old NIC (from when the MAC address was dynamic). The one in red is the new NIC (which is now static).

            The solution was to delete the desired IP address from the list of DHCP clients manually, freeing it up so that it could be reallocated to my VM's new NIC.

            I feel a bit stupid now, but hey, you learn a new thing every day... even if it is just how inept you are...

            Thanks for the responses, much appreciated.

            Comment


            • #7
              Re: virtual machine won't get its IP address from router by DHCP

              Cooooool... I am glad you solved the problem.
              And thank you for posting back the results !! on me

              Sorin Solomon


              In order to succeed, your desire for success should be greater than your fear of failure.
              -

              Comment

              Working...
              X