Re: NetReg: Patch for CIDR notation subnets

New Message Reply Date view Thread view Subject view Author view Attachment view

From: Robert Lowe (robert.h.lowe@lawrence.edu)
Date: Mon Aug 05 2002 - 16:06:49 CDT


Chris Mielke wrote:
>
> How should I setup non-contiguous pools in subnet.dat if they are in the
> same subnet? For example, I have a 10.74.0.0/16 network handing out ip
> addresses in the following ranges:
>
> range 10.74.255.1 10.74.255.254 #for unknown clients
> range 10.74.1.1 10.74.2.255 #for know clients
>
> Should this just be 10.74.0.0/16:Description:763: in subnet.dat or should
> it be something different. Thanks.

Close...

10.74.0.0/16:Descripton:763::

Don't forget the trailing colon.

If you want to carve a particular piece of that subnet, you could do
something like:

10.74.0.0/16:Description:763:10.74.255.0/24:

...even though you may not actually have a separate subnet. All this
will do is make sure that only clients with leases from 10.74.255.0/24
can register.

-Robert

> -----Original Message-----
> From: owner-netreg@southwestern.edu
> [mailto:owner-netreg@southwestern.edu]On Behalf Of Robert Lowe
> Sent: Friday, August 02, 2002 11:50 AM
> To: netreg@southwestern.edu
> Subject: NetReg: Patch for CIDR notation subnets
>
> Hi!
>
> Look in http://http://www.netreg.org/contrib/ for the file:
>
> netreg-cidr-patch.tar.gz
>
> This contains many changes to NetReg 1.3.
>
> Noteable changes:
>
> ** Subnets
>
> . A replacement for subnet.dat, stored in /etc/netreg, contains four
> colon separated fields:
>
> 1. Subnet/mask length for registered clients
> 2. Location
> 3. Number of IP addresses to lease from the subnet for registered
> clients, e.g. the sum of your specified ranged from dhcpd.conf.
> 4. Subnet/mask length for unregistered clients, if different. If
> blank, the assumption will be that you use addresses from the
> subnet specified in the first field.
>
> . All subnets are specified in CIDR notation, e.g. 192.168.64.0/20.
>
> ** subnet.pl
>
> . A new require file including global variables and subroutines needed
> for parsing the subnet.dat file, determining whether an IP address is
> part of a given subnet, and a sanity check for CIDR notation subnets,
> e.g. 192.168.114.0/20 is not valid -- it should be 192.168.112.0/20.
>
> ** variables.pl
>
> . Deletion of $ALLOW_DOMAIN
> Instead, the IP address of the user's host is compared with the
> subnets for unregistered clients. If it does not fall into one
> of them, registration is denied.
>
> . Some additions
> - $LDAP_URL added for "branding" purposes, removing references to
> Southwestern University. You should URL-encode any special
> characters. Leave <USERNAME> in the URL where you want the
> username to be substituted.
> - $SUBNETFILE points to the location of subnet.dat. Since this is
> used in both register.cgi and admin.cgi, it had to be somewhere
> where both could read it without requiring password access.
>
> ** admin.cgi
>
> . The meter for the subnet overview is now scaled. It uses the field
> from subnet.dat which specifies the number of useable addresses for
> this purpose. As such, you can now easily tell if an address pool
> is filling up.
>
> . When viewing a subnet, the entries are sorted by user/MAC address.
>
> . A new CGI parameter 'exact' was added. When the subnet details are
> displayed, this is used with usernames to avoid having the find_conf()
> routine return similar results, e.g. test might return entries for
> test, mytest, testing, etc.
>
> . All searches are case insensitive
>
> . Server Manager
> The 'ps aux' command was changed to 'ps auxw'. This avoids the appearance
> that one of the crucial daemons is down, simply because it was started by
> a script that included the full path, e.g. apache. (Note, several systems
> of System V heritage do not support these BSD-style switches, e.g.
> Solaris,
> but perhaps noone has ever tried NetReg on anything other than Linux.)
>
> . Numerous small changes for efficiency, and I'm sure someone can find
> even more. Mostly these had to do with file handling (all file open
> errors are now reported), or pattern matching.
>
> *************
>
> If you decide to use these changes, please test carefully. If you come
> across any bugs, let me know and I'll be happy to address them.
>
> -Robert
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg
> Send requests for assistance to: owner-netreg@southwestern.edu
> **********************************************************************
>
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg
> Send requests for assistance to: owner-netreg@southwestern.edu
> **********************************************************************
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************


New Message Reply Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:37 CDT