From: King, Michael (MKing@bridgew.edu)
Date: Fri Jul 26 2002 - 10:30:16 CDT
Allie,
I'm not using the uniqueHostname subroutine. I had added the uniqueHostname
subroutine into my NetReg 1.2 setup, but I upgraded to NetReg 1.3
NetReg 1.3 uses the following code in the append_host_entry subroutine
open (DHCPDCONFNEW, "$DHCPDCONFPATH/$DHCPDCONFFILE.new");
while (<DHCPDCONFNEW>) {
if ($_ =~ /$FORM{'user'}/) {
($TRASH, $HOST) = split /\s/;
push (@HOSTS, $HOST);
}
}
close(DHCPDCONFNEW);
foreach my $HOST (sort { $a <=> $b } @HOSTS) {
$LAST = $HOST;
}
($TRASH, $SERIAL) = split /-/,$LAST;
$SERIAL++;
The above code caused the problem that I had mentioned. Personally, I'm
going back to my old registration scrip from 1.2, which uses the
uniqueHostname. I was just being a good doobie and reporting a bug. :-)
As for the smaller subnets,
That's exactly what I'm doing.
Here's the quick overview of my config (I know it's not 100% syntax
correct, but it gets the point across.
xxx.xxx.xxx is a fully routable IP address. 192.168.140 is not, but has
access to the registration server.
shared-network Building A {
subnet 192.168.140.0 Mask 255.255.255.192{allow unknown}
subnet xxx.xxx.xxx.0 Mask 255.255.255.0{deny unknown}
}
shared-network Building B {
subnet 192.168.140.64 Mask 255.255.255.192{allow unknown}
subnet xxx.xxx.xxx.0 Mask 255.255.255.0{deny unknown}
}
shared-network Building C {
subnet 192.168.140.128 Mask 255.255.255.192{allow unknown}
subnet xxx.xxx.xxx.0 Mask 255.255.255.0{deny unknown}
subnet xxx.xxx.xxx.0 Mask 255.255.255.0{deny unknown} #Bigger building,
needs more IPS
}
shared-network Building D {
subnet 192.168.140.192 Mask 255.255.255.192{allow unknown}
subnet xxx.xxx.xxx.0 Mask 255.255.255.0{deny unknown}
}
By doing this, I'm not using an entire subnet for each building's
registrations.
As a side note, I'm welcome to rethinking my entire point of view, but it
would have to work. :-)
Mike
-----Original Message-----
From: Allie M Tate [mailto:allie@lsu.edu]
Sent: Friday, July 26, 2002 10:50 AM
To: netreg@southwestern.edu
Cc: MKing@bridgew.edu
Subject: RE: NetReg: Different subnet masks
Actually, the uniqueHostname subroutine looks for a unique name using the
last registered host. It pushes any names starting with the host name in
question then goes through this array looking for a unique number. It may
or may not be the highest number. My registrations are all jumbled as
well. I personally don't have a problem with this. If you are set on
having the numbers in consecutive order at all times you will have to order
the array after it is created. This should find any holes in the numbering
and fill in. But this wouldn't help if you deleted more than one and only
registered one back - you are left with an empty space. Am I making any
sense?? If you REALLY REALLY wanted the numbers in order then I guess you
could rename the host entries in order at any given time. This is all up
to you. Whatever you can code you can do. I'm just brain-storming.
As far as the subnetting goes - I didn't account for subnets smaller than a
255.0 - only larger. It's not impossible, but will require special
handling for the counting and displaying of the subnets on the main page.
The only time I see a need for this consideration is if you have dhcp
configured on more than one of the smaller subnets. IOW - leasing out
addresses from two or more of the same 255.255.255.192 subnet. Once again
- please let me know if I'm not making any sense. If this is the case -
then I'd start thinking on how to script that in. Now that you bring it
up, I may start playing with this in my spare time.
Allie
**********************************************************************
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
**********************************************************************
This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:37 CDT