View Only
  • 1.  vSwitch and DHCP

    Posted Jul 20, 2011 06:32 PM


    I've just created a vSwitch1 in my ESXi 4.1 host to have an isolated network space, as shown in the image below:

    And when any VM boots up, it doesn't have any dynamic IP address.  That means there's no DHCP server "attached" to this network.  Of course, I could manually assign IP addresses to them.  And of course I could also throw in a third full-fledged VM into the network to play just the role of DHCP server.  But is there any "hidden" DHCP server that I could activate by typing some magic command in ESXi? :smileyhappy:


  • 2.  RE: vSwitch and DHCP
    Best Answer

    Posted Jul 20, 2011 06:36 PM

    No not with ESXi - you will need to either hard code IP addresses or as you point abd build a virtual DHCP server and attach to vSwitch 1

  • 3.  RE: vSwitch and DHCP

    Posted Jul 20, 2011 06:39 PM

    Sorry - there is no hidden DHCP server.  You need to either connect these VMs to the outside world, or add a VM to their vSwitch that has a DHCP server.

  • 4.  RE: vSwitch and DHCP

    Posted Jul 20, 2011 08:36 PM

    If you feel a bit more adventurous, create a vm to serve as a router (ubuntu will do), attach a vNic to each vSwitch.  Enable DHCP forwarding on the otherwise isolated vSwitch interface, sending requests to your existing DHCP server, and create a zone on that for the new network.

  • 5.  RE: vSwitch and DHCP

    Posted Jul 21, 2011 01:43 PM

    OK, I see.

    If I created the "isolated" network, it's because I want it to be ... isolated!  So I'm not going to connect vSwitch1 to the outside world (with or without a router).

    I've found m0n0wall ( which suits my need and it's the lightest alternative I could find.  Actually, m0n0wall is designed as a firewall but since it has DHCP server implemented, we just need to connect one of its network interfaces and activate DHCP for that interface ... and that's it!  Its VM image is very small, just about 10MB!  But it needs about 150MB RAM and 500MHz from CPU to run, which is OK compared to a full Windows server (which was my original idea to use a VM).

    After deploying it, we need to change its network adaptor.  And then some configuration in text mode after bootup.  If you aren't used to it, that might not be very obvious and would take a bit longer -- needs to read the documenations.  So, it would take about 10 to 30 minutes to set up the DHCP server which isn't that bad.

    I'm too used to VMware Workstation's virtual networking stuffs.  Really handy.  Too bad that they are not ported to ESXi.