How can I setup a static IP address in my virtualized Windows Server 2008 without breaking the internet?

MJCS
MJCS used Ask the Experts™
on
I've reloaded a Server that I inherited because we were locked out of the Server Admin account as well as the Vmware host.

I loaded WIndows Server 2008 R2 as the host and then created a virtual Server 2008 R2 in hypervisor.

I've done all the updates but have now run into a bit of trouble with configuring it.

When I went to Add DHCP as a role, it complained that the LAN wasn't set to static. I set it to static, but then it killed the internet in the VM.

This is a Dell Server T310 with 2 NIC Ports.

The Router is 192.168.0.1.

Subnet Mask: 255.255.255.0

I set the host as 192.168.1.11 on LAN Port #1

I've got the VM using LAN Port #2. If I leave it on DHCP, the internet works, when I set it static, it stops.

I set it as 192.168.0.111 static. with 255.255.255.0 and 192.168.0.1(router) as the gateway. I've tried with DNS as auto and with DNS as 192.168.0.1 (router)

How can I get a static IP Address to work without breaking internet access?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
It would appear to be OK as you set up.

1. Is .111 outside of the regular DHCP range? Check that.

2. What happens when you ping the outside world. Does ping shed any light?

.... Thinkpads_User
Top Expert 2016
Commented:
did you set your gateway and dns properly.. non functional dns will kill the internet in the virtual machine.

DNS as 192.168.0.1 (router) change it to 8.8.8.8 and 8.8.4.4 (google dns)
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
If the normal setup steps do not help, you might try a TCP/IP repair. The first part of the Microsoft article below should work for Server 2008.

http://support.microsoft.com/kb/299357

... Thinkpads_User
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Senior Solution Engineer
Commented:
When you have the VM set to use dhcp, what DNS servers is it using? You can learn this by running "ipconfig /all" in a DOS window. That will be the set of DNS servers you need to set in your static configuration.

You will also want to note the "netmask" and "gateway" addresses. Both must also be carried forward into your static assignment.

Finally, you need to make sure that the address you choose meets a couple of criteria:
1) it must be in the network namespace that matches the router (your first attempt of setting the static address to 192.168.1.11/24 put the host on a different subnet from the router at 192.168.010/24, which will absolutely break things).
2) it must not be an address that the dhcp server can give out to an arbitrary request. If that is possible, your server could easily have an address collision with another machine because the dhcp server won't realize you have already used that address. Check the dhcp settings; if it's using addresses starting at 100, for example, then it is safe to use anything between 99 and 2.

Finally: because you're trying tot get a dhcp server going on this guest, you will need to disable the dhcp service on your router—or wherever it's coming from—or you'll end up with LOTS of addressing errors on your network as clients arbitrarily decide to accept offers from multiple dhcp servers.

Author

Commented:
I got it working. It was a couple of weeks ago and I've forgotten the details. I appreciate all the advise and have divided up points in the order of the quality of the answers in my perception.
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
@MJCS - Thank you, and I was happy to help you with this.

... Thinkpads_User

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial