Lapsap201110141
Enthusiast
Enthusiast

vSwitch and DHCP

Jump to solution

Hi,

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

esxi4-vmnet-test.png

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? Smiley Happy

TIA

0 Kudos
1 Solution

Accepted Solutions
weinstein5
Immortal
Immortal

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

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

View solution in original post

0 Kudos
4 Replies
weinstein5
Immortal
Immortal

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

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

View solution in original post

0 Kudos
mcowger
Immortal
Immortal

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.

--Matt VCDX #52 blog.cowger.us
0 Kudos
J1mbo
Virtuoso
Virtuoso

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.

0 Kudos
Lapsap201110141
Enthusiast
Enthusiast

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 (http://m0n0.ch/wall/) 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.

0 Kudos