Solved

DHCP Server netmask

Posted on 1998-07-05
30
1,561 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
ID: 1566867
What scope you specify for such a mask?
0
 
LVL 51

Author Comment

by:ahoffmann
ID: 1566868
 192.168.0.0 .. 192.168.3.254
or
  192.168.4.0 .. 192.168.4.254
0
 
LVL 2

Expert Comment

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

Author Comment

by:ahoffmann
ID: 1566870
DHCP Server: 192.168.2.2/255.255.252.0
0
 
LVL 2

Expert Comment

by:JBirkmann
ID: 1566871
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
ID: 1566872
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
ID: 1566873
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
ID: 1566874
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
ID: 1566875
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
ID: 1566876
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
ID: 1566877
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
ID: 1566878
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
ID: 1566879
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
ID: 1566880
Read your question,
you got the answers to your question;

good luck
0
 
LVL 1

Expert Comment

by:shermanj
ID: 1566881
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
ID: 1566882
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
ID: 1566883
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
ID: 1566884
> 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
ID: 1566885
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
ID: 1566886
> 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
ID: 1566887
So, have you tried just extending the .2.0 scope to include .3.0?
0
 
LVL 51

Author Comment

by:ahoffmann
ID: 1566888
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
ID: 1566889
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
ID: 1566890
I would halucinate too ;-))
This is the reason for this question.
0
 
LVL 1

Expert Comment

by:shermanj
ID: 1566891
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
ID: 1566892
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
ID: 1566893
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
ID: 1566894
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
ID: 1566895
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
ID: 1566896
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

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet Speed Test 5 101
Mac OS client and windows client file sharing issue 2 74
How to best manage folder and file security 4 90
BGP routing on Windows 2016 7 38
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

919 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

20 Experts available now in Live!

Get 1:1 Help Now