Solved

DHCP Server netmask

Posted on 1998-07-05
30
1,556 Views
Last Modified: 2013-12-19
Does anybody know how to setup DHCP server using (responding) to netmask for example 255.255.252.0 ?

Configured with such a netmask, the service starts but didn't respond (checked with DHCP Locator), no messages in event log.
The DHCP server works fine with netmask 255.255.255.0 or 255.255.0.0 .

Any suggestions?
0
Comment
Question by:ahoffmann
  • 14
  • 7
  • 5
  • +3
30 Comments
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
Comment Utility
What scope you specify for such a mask?
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
 192.168.0.0 .. 192.168.3.254
or
  192.168.4.0 .. 192.168.4.254
0
 
LVL 2

Expert Comment

by:JBirkmann
Comment Utility
what IP-Adress and subnet mask does your server have?
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
DHCP Server: 192.168.2.2/255.255.252.0
0
 
LVL 2

Expert Comment

by:JBirkmann
Comment Utility
okay
the scope   192.168.0.0 .. 192.168.3.254 is in the IP area of your DHCP server (with this mask your network is from  192.168.0.0 to 192.168.3.255). You shouldn´t use the complet ip range for dhcp (!), restrict the range to the number of addresses you approx. need (your DHCP server is in the same area!). And avoid a scope with a zero in the network digits, as 192.168.0.x or 192.163.0.x ...
DHCP has a problem with.
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
JBirkmann, still tested your suggestion (see examples at my first comment). I also always excluded the first and last IP address (.0 .255).

Avoiding scopes with zeros in it? It's a legal IP host address according to my netmask. Did M$ make simple things buggy?
(Even, I disn't use the scope with the zero ;-))
0
 
LVL 2

Expert Comment

by:JBirkmann
Comment Utility
at last i´m not sure, whether you are using the other scope ( 192.168.4.0 .. 192.168.4.254) or not. If yes, how are the two networks connected
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
It's one network, with DHCP running well.
Because I'm running out of IP addresses I tried to use more host bits with another netmask. Simple task I thought ...
So actually my scope is 192.168.2.20 .. 192.168.2.250 with netmask 255.255.255.0
I just want to increase the number of hosts served by DHCP, so I added scope 192.168.3. but DHCP didn't respond.

If I change the scope's netmask (regedt32)-: to 255.255.252.0 DHCP didn't respond to any request (even those for 192.168.2.),
probaly 'cause DHCP is "so clever" to waste its database by adding the netmask to each entry, even it is defined global in the registry.
0
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
Comment Utility
Since you have the subnet mask 255.255.252.0 and the DHCP server is 192.168.2.2, so your hosts in the same subnet  should be in the scope from 192.168.0.1 to 192.168.3.254. The DHCP scope can be this scope, but should be exclude 192.168.2.2 (DHCP server) and other fixed IPs of servers.

For the subnet 192.168.4.0, you need a DHCP agent enabled router on the net in order to let the DHCP server can assign address on the other subnet,

BTW, M$ supports all zero and all one in subnet.

In addition, M$KB Q167014 may help you find some reasons on why DHCP client may fail to obtain a DHCP assigned IP address
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
bbao, all my servers are excluded from the scopes (see last comment).
Again, I don't have subnets, and my net is not routed, I just changed the netmask (should write IP addresses hex or binary:).

bbao, I'll check M$KB Q167014. So far I reopen this question to get more e-e hints ;-)
0
 
LVL 1

Expert Comment

by:Fonnie
Comment Utility
Since 192.168 is an internal network number, why not just bite the bullet, spend a day and change to 10.x.x.x
That way you never have to renumber again.

0
 
LVL 2

Expert Comment

by:JBirkmann
Comment Utility
remove the old scopes from your dhcp-server, create a new one with the same subnet mask as your server (255.255.252.0), exclude your servers and other fix addresses and don´t change entries in the registry;
192.168.x.x isn´t an internal network number, you can use this addresses every time you want, cause these are private addresses (internal network numbers only used with IPX protocol)
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
JBirkmann, I thought of this too (removing my existing scope).
But I have, 'cause of historical reason, more than 100 static mappings there. Do you know how to save them and read them back in my new scope. Otherwise this is not a solution of my problem :-(
0
 
LVL 2

Expert Comment

by:JBirkmann
Comment Utility
Read your question,
you got the answers to your question;

good luck
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
Extend the existing scope and change the subnet.  Use 255.255.240.0 for your subnet mask.

I think part of your problem is that with subnet mask 255.255.252.0, anything in 192.168.0.0, .1.0, .2.0, and .3.0 will think 192.168.4.0, .5.0, etc. are on the other side of a router.  *This includes your DHCP server.*  That could cause trouble.
0
New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
shermanj, how do I change the subnet mask (I only know of one entry in the registry).
Also, why should I use 255.255.240.0 instead of 255.255.252.0?
Of course, .4.0 and .5.0 must be routed to .1.0 etc. (according to my prefered netmask).
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
Subnet mask lives in two places:  Network Neighborhood properties (Protocols|TCP/IP), and in DHCP Manager (can't tell you where exactly off the top of my head).  

255.255.240.0 is just a larger IP block.  That way, you don't have to worry about expanding things again later.  Reason I mention this is because of the note you left earlier about using .4.0 in a scope.  .4.0 would have to be routed to .1.0 according to that subnet mask, so use 255.255.240.0 to make it not try to find a router to talk to.

Ooooh, please don't make this into an IP training class, pleeease?

Listen, go out to your local big-ol'-bookstore and get "Mastering Windows NT Server 4.0" by Mark Minasi.  It has a dynamite section on TCP/IP, including what subnet masks to choose, how to set up routers, how to set up DHCP servers, etc.  If you really want me to, I could post the section on how IP routing works, but it's pretty big...
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
> Reason I mention this is because of the note you left earlier about using .4.0 in a scope.

This note contains 2 examples according to my prefered netmask ;-)

> please don't make this into an IP training class ...
No, I know "something" about TCP/IP (see my netmask again).
And about you suggestion about bying a book:
 I'm realy afraid bying a book about NT again, all those I still have contain tooo much errors, useless.
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
That note contains one example inside the same subnet as .2.0 and one outside.  Which one are you wanting to use?

I have not found any errors in the book I mentioned.  It's really very good...  And its IP networking section is pretty generic except the later parts about configuring NT to do the stuff that's discussed.

'Course, I guess I'm assuming you're using NT 4.0 SP3...  Maybe you're not...?
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
> Which one are you wanting to use?
Doesn't matter. I always take care that the DHCP server resides in the same subnet as the scope it serves.

NT4.0 SP3 (+ some hotfixes)
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
So, have you tried just extending the .2.0 scope to include .3.0?
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
Extending a scope? Some of the things which are not implemented ;-(
You just can add a new scope, but not one which covers an existing (M$'s definition of change := delete + create).

My question misses the point that I don't want to loose my existing scope, I want to change/extend it (see Birkmann's comment from July 15 1998 :-)
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
I thought you could... In DHCP Manager, double-click your scope.  Input new start and end addresses.  Maybe subnet mask, too, if nessicary.  Push OK.  Maybe I'm halucenating, but I thought you could do that...
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
I would halucinate too ;-))
This is the reason for this question.
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
Okaaaayyy, maybe I AM halucenating...  Okay, when you create a second scope (.3.0), I forget, does it automatically activate?  You may just need to turn it on.  Also, you may have to restart the DHCP Server service to make it start responding to requests.

How to restart DHCP server service (if I remember right :)
At command prompt type:
net stop dhcp server
net start dhcp server

Maybe this helps?
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
shermanj, while talking to me as if I'm a bloody newby without a glue of NT, why did you not tell me to reboot after changing any bit? I really checked out a lot of things 'till I asked the world about my (oops, NT's) problem.
Sorry, but you told me nothing new.
Meanwhile I'm dreaming, halucinating that NT, sometimes, will work just like real OSs, will just do it ...
0
 
LVL 1

Expert Comment

by:shermanj
Comment Utility
Hey, I was a newbie at NT as of a few months ago, but I can do most of the stuff I want to with it now...  Though I must admit I haven't played with DHCP much other than the initial setup.

Have a little patience ahoffmann; there are a lot of newbies in this site, so I have no clue weather you're one of them.

Well, I can't think of anything else to try...  Anyone else?
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
shermanj, don't worry, I'm joking, sometimes, (probably I should use more emoticons:) sorry.
Let's return to the focus of this question.
0
 
LVL 51

Author Comment

by:ahoffmann
Comment Utility
Setting up a new scope with my requested netmask (in a separate test network) works fine.
So I think my question should better read:

  How can I change the netmask in an existing DHCP scope
  without loosing any data?

(see also my comment from: Wednesday, July 29 1998 - 06:23AM PDT)

BTW, using a superscope also didn't work (got crazy responds fromDHCP server).
0
 
LVL 7

Accepted Solution

by:
linda101698 earned 100 total points
Comment Utility
ahoffmann asked that I post this as an answer so it can be moved to the PAQ.

Linda Gardner
Customer Service @ Experts Exchange

# SYNOPSIS
#       dhcpcmd <ip-of-DHCP-server> enumclients <ip-of-DHCPscopr> -h | gawk -f this file
# DESCRIPTION
#       Generate commands to rebuild DHCP database.
# RESTRICTIONS
#       Does not detect multiple IP and/or Mac addresses.
{
   ip   = $2;
   name = $3;
   mac  = $NF;
   if (name == "(null)") { name = ""; }
   if (length(mac) == 12) {
        printf("dhcpcmd 192.168.xxx.xxx addreservedip 192.168.xxx.0 %s %s %s\n",ip,mac,name)
   } else {
        printf("echo skip: %s %s %s\n", name, ip, mac);
   }
   next;
}


Gnerate the script as suggested in SYNOPSIS above, then remove the apropriate
DHCP scope(s) and add a new scope with the new netmask (255.255.252.0 in my
case).
Add properties and options to the new scope (found no way to extract them):.
Run the generated script (probably you've checked it for uniqueness:).


BTW, keep in mind that M$ left many dragons to beat when using such a netmask.
For example:
   ping 192.168.1.0
   netstat -rn          # route for broadcast address
   DHCP subscopes inside that mask not possible
   etc.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
Resolve DNS query failed errors for Exchange
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now