my vm windows server 2008 dhcp. didn't distribute ip addresses to my vms xp clients. their network connection was "host-only adapter". i tried to log-in some users and checked ipconfig. but their ip address is the same as the ip i assigned them. what mistake did i do? tell me please.

dns & server ip address: 172.31.0.1
for my 4 clients: 172.31.0.5-8

Recommended Answers

All 12 Replies

What VM application are you using... VirualBox?

So, to begin troubleshooting this, if you apply a static IP address to teh VM XP client, are you able to ping the DHCP server? If not, there is a networking issue, most likely in your VM app configuration. If you can, move on to troubleshooting this as a DHCP server issue. Put the XP client back to a DHCP client.

On the DHCP server, if the computer is a member of an AD domain, the DHCP server must be authorized. When you launch the DHCP Admin console, is there a green arrow icon next to the server object indicating that the DHCP server is enabled, authorized and running?

Also, did you make sure that your scope is active and enabled and is has a range of IPs on the 172.31.0.x subnet? If not, the DHCP server will not service these clients.

yes im using virtualbox. and one more question. if i was given an ip block of "17.31.0.0/22" and on my understanding you can choose what ip you want to choose but only from 172.31.0.0 to 172.31.0.22? i'm a little confused about this.

Ok so that is not correct. The /22 is used to indicate that there are 22 bits being used for the subnet mask. /22 = 255.255.252.0.

This subnet mask gives you a total of 1,022 usable IPs (1024 total but one is for the network ID and the other is for the subnet broadcast id).

The range of usable IPs are: 172.31.0.1 - 172.31.3.254

If you need some more help understanding how this works, I have a short summary you can reference: CIDR and Subnetting.

In addition, here is a simple online subnet calculator that can help you with your calculations: Online IP Subnet Calculator.

a little help. i visited the link calculator and checked that ip block. i got the logic why that is the subnet mask and the total hosts/subnet (thanks for that). but i'm confused about how it got the total number of subnets 64?

total number of subnets 64?

If you take the subnet of 172.31.x.x and apply a /22, it results in 64 subnets within the range of (172.31.0.0-172.31.255.255). So it all depends on what the initial "block" of IPs that are given to you. For example, if your provider was to give you 172.31.x.x/16 and you needed 64 subnets, you would use a /22 instead of a /16 throughout your network.

i'm still confused. so how about the same ip block and i just want 32 subnets?

edited:
255.255.252 is
11111111.11111111.11111100.00000000
and the six 1's on host bit is 6
so 2^6 = 64? is this correct?

and my last question is i want 32 subnets so this is
255.255.248.0
11111111.11111111.11111000.00000000
and the last five 1's?
2^5 = 32?

so 2^6 = 64? is this correct?

Yes, that is correct. The more bits you use, the more subnets available for the block, however fewer host IPs per subnet.

11111111.11111111.11111000.00000000
and the last five 1's?
2^5 = 32?

Yes, if you use up 5 bits in the third octect, then there would be 32 subnets avaiable when extending the first two octects.

For example... 172.31.x.x/21 would use 21 bits (5 of them in the third octect), therefore we could break 172.31.x.x into 5 distinct subnets each subnet with 2,046 available IPs.

thanks alot i learned how to compute it. but the problem is i change some setting of my server and client but still the dhcp didn't distribute ip's. my network adapter for both of them is host-only adapter, my dhcp is already authorize and the scope is active.please help me i really want to learn this.

here is my host-only adapter ip address
ip:172.31.0.1
subnet: 255.255.252.0
default gateway: none
preferred dns: none
alternate dns: none

MY WINDOWS SERVER 2008 SERVER IP
ip: 172.31.0.2
subnet: 255.255.252.0
default gateway: none

dns server addresses:  172.31.0.2
                       8.8.8.8
                       8.8.4.4
                       208.67.220.220
                       208.67.222.222

DHCP SETTING
SCOPE
ip range: 172.31.0.1 - 172.31.3.254
ip exclusion: 172.31.0.1 - 172.31.0.30
              172.31.3.225 - 172.31.3.254
in server options
003 Router - 172.31.0.1
006 DNS Server - 172.31.0.2
015 DNS Domain Name - mydomain.com


MY XP CLIENT#1 IP
ip: 172.31.0.4
subnet: 255.255.252.0
default gateway: 172.31.0.2

prefered dns server: 172.31.0.2
alternate dns server: none

btw. i disable the dhcp setting of virtualbox.

the server options and scope options have the same setting

So a few things here... not sure why you would be using the "host-only" adapter. I would think you would rather be using "internal network" for each VM and place them on the same "Name" which is the equivalent of having them on the same logical VLAN.

After you do that, I would still assign static IPs to each VM and first verify that you can PING all of the VMs from the other VMs. This will validate your network configuration.

Then finally leave the VM server with a static IP, change your VM clients back to DHCP, then try again.

i followed your instructions. changed the network adapter to internal network and make my client ips static. and it worked! a really big thanks to you, for giving time to help me. one more question :D. what if i want my server and client internet connection? should i just change their network adapted to NAT? thanks again.

Ok, so the next objective is to provide internet access to the vm server and clients. This is fairly easy (anything is easy once you know how) and you have several options. You could modify the configuration of your vm server but if everything is working on the internal network I would hesistate to have you change it unless you are very comfortable restoring the config if all goes bad...

Here is another option...

Set up another guest server vm. Assign it two network adapters. One on the bridged network and the other the "internal" network. Install the RRAS role with NAT on this server (Video | How to Enable NAT on Windows Server 2008 R2).

Ok on the server for the bridged adapter, since this adapter on the server is bridged to your adapter on the host computer, you can let it receive the DHCP settings from your network, or setup a static IP/mask/gateway/DNS that is compatible with your local area network. For the other adapter that is bound to the "internal network", assign it a static IP and subnet mask, no default gateway, no DNS settings. Next install/enable RRAS on this server. Configure NAT services. NAT requires that you identify the public and private interface. The public interface is the NIC bound to the host adapter (bridged) and the private interface is the one that is bound to the "internal network".

Now on your DHCP vm server, configure its default gateway to point to this new RRAS vm server. Same thing on your DHCP scope so that your clients use this new server as their gateway itself. This new server is acting just like a typical internet router that you may have at your home.

Where you point your DNS settings is up to you. If you are pointing to your ISP's DNS, a public DNS (8.8.8.8) or a DNS within your private LAN, that's fine. If not, you'll need to setup the DNS role on the new guest VM as well and point your VM clients to which ever DNS server you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.