VMware Cloud Community
scollinguk
Contributor
Contributor
Jump to solution

Isolate DHCP in vswitch

Hi All,

I am hoping for a little help as I have spent the last 4 hours searching the internet for an answer and cant find one!

I have a relatively simple ESXi setup which I am using for a development platform. I am currently only using one NIC on the host server which is connected to a physical switch which the rest of the production network for the company is using.

What I am trying to do is establish a simple test network with three servers, a DC, another member server and an Exchange server. The DC is setup to perform DHCP using the 192.168.1.x range. The DC has two virtual NICs, one connected to a vswitch which is connected to the physical switch and the second NIC which goes to a separate vswitch which the other servers are connected to. The reason for DHCP is so that the tech team can create new VM machines with different OS's and don't need to worry about setting up static IPs each time. The DC receives a IP from the production network on the 192.168.0.x network range.

As a picture shows a thousand words here is the network config:

Capture.PNG

The problem that I have is that some devices on the production network are getting an IP address assigned to them from the DHCP server on the VM instead of the DHCP in the production network. I have current unauthorised the DHCP server to stop this happening but cant find a way to isolate the DHCP server so that it only gives IP address to VMs connected to vSwitch1.

Many thanks,

Scott

0 Kudos
1 Solution

Accepted Solutions
scollinguk
Contributor
Contributor
Jump to solution

Hi Rocco,

Thanks for the help.

I did a little focused research on development infrastructure setups rather then focusing on the VMware side of things and found that Server 2008 will broadcast DHCP packets on all NICs assigned with a static IP even if its not on the bindings. However, when the NIC is set to DHCP then the server will not broadcast down it.

So what I have ended up doing is setting the NIC to DHCP and then reserving the IP address for the server so that it always gets the same IP from the production DHCP server and the DHCP server wont give it to anyone else.

I have tested this using dhcploc and it works perfectly.

Many thanks,

Scott

View solution in original post

0 Kudos
4 Replies
rsicilia
Expert
Expert
Jump to solution

Hi Scott, I think the best solution is binds DHCP service only on the vNIC connected to the vSwitch1.

--

Rocco Sicilia

Rocco Sicilia [aka: BrC] - http://www.roccosicilia.it - VTSP 4-5, VCP 4-5, vExpert 2013/2014
0 Kudos
scollinguk
Contributor
Contributor
Jump to solution

Hi Rocco,

DHCP is only bound to the NIC attached to vSwitch1 but for some reason it is still broadcasting on the NIC attached to vSwitch0.

Many thanks,

Scott

0 Kudos
rsicilia
Expert
Expert
Jump to solution

Really? It's strange.... can you post your DHCP service configuration?

--

Rocco Sicilia

Rocco Sicilia [aka: BrC] - http://www.roccosicilia.it - VTSP 4-5, VCP 4-5, vExpert 2013/2014
0 Kudos
scollinguk
Contributor
Contributor
Jump to solution

Hi Rocco,

Thanks for the help.

I did a little focused research on development infrastructure setups rather then focusing on the VMware side of things and found that Server 2008 will broadcast DHCP packets on all NICs assigned with a static IP even if its not on the bindings. However, when the NIC is set to DHCP then the server will not broadcast down it.

So what I have ended up doing is setting the NIC to DHCP and then reserving the IP address for the server so that it always gets the same IP from the production DHCP server and the DHCP server wont give it to anyone else.

I have tested this using dhcploc and it works perfectly.

Many thanks,

Scott

0 Kudos