DHCP problem in virtual environment
motherwolf
Member Posts: 117
in Off-Topic
Hey guys,
I'm having a problem in my VMware environment with a client PC obtaining an IP from my DHCP server. The server scope has been set to 192.168.10.1-.254 with an exclusion range for .1-.10 and the server is authorized. Everytime I start up the client PC it grabs a 192.168.81.132 address. If I do and ipconfig /all, the DNS server IP is correct and it says that DHCP is enabled. I'm not NAT'ing this environment, it's totally shut off from the outside world so I know it's not getting an IP from my home router. If I flush the DNS cache and the release and renew the IP it will pick up an address from the DHCP server, but only sometimes. I'm at a total loss! It's really annoying having to fiddle with this everytime I want to fire up my lab. Any suggestions are appreciated, thanks.
I'm having a problem in my VMware environment with a client PC obtaining an IP from my DHCP server. The server scope has been set to 192.168.10.1-.254 with an exclusion range for .1-.10 and the server is authorized. Everytime I start up the client PC it grabs a 192.168.81.132 address. If I do and ipconfig /all, the DNS server IP is correct and it says that DHCP is enabled. I'm not NAT'ing this environment, it's totally shut off from the outside world so I know it's not getting an IP from my home router. If I flush the DNS cache and the release and renew the IP it will pick up an address from the DHCP server, but only sometimes. I'm at a total loss! It's really annoying having to fiddle with this everytime I want to fire up my lab. Any suggestions are appreciated, thanks.
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□Do you have an alternate IP address configured? It will use that instead of an APIPA address if you can't contact the DHCP server.
I don't know where else you'd be getting a 192.168.81.x address from since it's outside of your scope. Are you sure there are no other DHCP servers (or another scope on your existing one) on the network?
When you say that it sometimes gets an address, what address is it? Is it 192.168.81.132 or is it an address from the scope?
When you say that DNS is correct, is it getting that information from the DHCP server, or have you configured that manually?
DHCP doesn't rely on DNS, so there's no need to flush the cache or even worry about having DNS configured correctly.
If you configure a static IP address, can you ping the DHCP server? -
motherwolf Member Posts: 117No, there is no alternate IP configured and there is not another DHCP server running. When it finally does pick up an address it is from my configured scope. But in order for that to happen I have to release and renew the 192.168.81.132 address several times.
-
dtlokee Member Posts: 2,378 ■■■■□□□□□□Is the 192.168.81.0 assigned to one of the VMNet adapters on the host machine with some sort of DHCP running?The only easy day was yesterday!
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□It really sounds like you have a competing DHCP server somewhere, and you're just occasionally getting the response you're anticipating as a fluke. Maybe it's just late, but I can't think of any other explanation (aside from the alternate configuration) as to why you would get that address if you're configured to use DHCP. I think DT might be on to something:VMWare Workstation Help wrote:Choose: Edit > Virtual Network Settings > DHCP
You need to configure the virtual DHCP server if you want to assign IP addresses to each virtual machine and the host on the private network (that is, if you want to use host-only or NAT networking). Using DHCP to assign IP addresses is simpler and more automatic than statically assigning them.
To add a new virtual network to the list, click Add. In the dialog box that appears, choose the network you want to add from the drop-down list, and click OK. (At this point, you cannot change any of the other settings in the DHCP Settings dialog box.) On the DHCP tab, click Apply to activate the new network. You can now select the newly added network and change the settings, as follows.
To change DHCP settings for a virtual network, select it in the list, and click Properties. In the DHCP Settings dialog box that appears, you can change the range of IP addresses provided by the Workstation DHCP server on a particular virtual network. You can also change the duration of DHCP leases provided to clients on the virtual network. (If you want to change the subnet settings, you need to use the Host Virtual network Mapping tab.)
You can completely stop the DHCP service for all virtual networks by clicking Stop, and then clicking Apply. If the service is stopped, you can start it by clicking Start and then Apply.
(You can also modify DHCP settings by choosing Edit > Virtual Network Settings > Host Virtual Network Mapping, selecting a specific bridged adapter, then clicking the > button for that virtual network.) -
Sie Member Posts: 1,195As stated above VMWare does include a DHCP service that is running by default you will need to disable this. The above steps will work for you, or you could attempt to disable to VMWare DHCP service though the first is more recommened.Foolproof systems don't take into account the ingenuity of fools
-
motherwolf Member Posts: 117Yup, you guys are right. I wasn't aware of the VMware DHCP service. I just stopped the service so hopefully that'll do the trick. Thanks for the help.
-
blargoe Member Posts: 4,174 ■■■■■■■■■□I don't remember the details of how to disable the built-in DHCP, but I do remember that if you open the Help file in your VMWare console, and do a search, you will find everything you need to knowIT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...