VMware Cloud Community
samansalehi
Enthusiast
Enthusiast

How to set DHCP for VMs in VMware ESX 4?

Dear Friends

I create three host that all of them configure in VLAN 2 that is not in DHCP and never configure auto IP for the machines that in that VLAN.

In one of these hosts, I have two vswitches, one of these vswitch is set to the NIC that connect to vlan 2.

another one set to the other NIC of host that configure in VLAN 4 which this VLAN in a scope and use dhcp for auto IP.

But the problem is, the VMs won't get the auto ip.

Would u please help me?

Reply
0 Kudos
9 Replies
samansalehi
Enthusiast
Enthusiast

Dear friends

i need ur help.

please help me.

Reply
0 Kudos
npeter
Expert
Expert

Have you created a port group in this vSwitch (connected to vlan4) and added your VM's Nics to this port group?

-nObLe
Reply
0 Kudos
patrickds
Expert
Expert

How is your VLAN set up?

Did you set up the VLAN ID on the VM network port group?

If the ports on your physical switch are configured with static VLAN setting to VLAN4, you should not tag in your port group.

What kind of switch is it?

I've run in to some switches i had to set the ports to 'switch mode'  on, to allow using them with VMs, otherwise they would not accept multiple MAC addresses on one port.

Reply
0 Kudos
samansalehi
Enthusiast
Enthusiast

Yes. I set the port group.

Reply
0 Kudos
samansalehi
Enthusiast
Enthusiast

I think your answer may help, would u please time me to check?

Reply
0 Kudos
npeter
Expert
Expert

ok,

Assign a static IP of same series to the VM's NIC connected to above portgroup and check if you can ping DHCP server.

-nObLe
Reply
0 Kudos
samansalehi
Enthusiast
Enthusiast

This is the correct answer.

     If the ports on your physical switch are configured with static VLAN setting to VLAN4, you should not tag in your port group.

Reply
0 Kudos
samansalehi
Enthusiast
Enthusiast

Thanks to all

Reply
0 Kudos
samansalehi
Enthusiast
Enthusiast

I try to mark the helpful and correct answer, but it won't work, i try it later, thank u again

Reply
0 Kudos