Good instructions, David!

When I get back home I'll try all that on my linux box.  In fact, I'm
guessing that I could use something like mc (Midnight Commander) to open
that tar'd file, edit it, and re-compress all at one go!

I'd like to see John include that feature in the Windows setup proggie,
especially since he's already writing a basic dhcpd.conf.......

BTW... Based on my experience with dhcpd the parenthesis "(" and ")" are
most important!  

(actually, memory says they may be "{" and "}", but whatever....

                                
Thanks for taking the time, and helping me to find the goofy thing...

                                        --==jb==--

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
John Burton
Sr. Project Lead
Rural Y2K Systems
INTEGRIS Health/Information Systems
Voice: (405)951-8613
Fax: (405)951-9832


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 12, 1999 9:07 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [ShareTheNet] DHCP


Apparently there was a hiccup in my mail server this weekend, so I'm
going to try sending this again.  My apologies if it shows up twice:

------------------- BEGIN INCLUDED MESSAGE ----------------

John --

There *is* a dhcpd.conf file in STN -- sort of.  It gets built dynamically
as part of the startup sequence, so if you want to modify it you have
to jump through some hoops :-)

First, I'm talking about STN version 2.1.3; other versions may do things
differently.  Second, I'm assuming you have a Linux or Unix system on
which you can make the modifications you want.  Third, I'm assuming
you have a way of transfering files from the Linux machine to your
Windows STN configuration machine (a floppy disk will do, although
network connections or cross mounting is more convenient).

To find where dhcpd.conf is created, you have to uncompress and untar
the dhcpd.tbz file from the STN distribution.  First find dhcpd.tbz;
it will be on your Windows installation machine wherever you installed 
STN, usually in "/Program Files/ShareTheNet".  Copy this file onto 
your Linux machine (it doesn't really matter where).  Now create
a new directory on your Linux machine, and "cd" to that directory.
Decompress/untar dhcpd.tbz into the new directory like so:

         bunzip2 < "<temp directory>/dhcpd.tbz | tar xvf -

You should end up with the directories "bin" and "etc" under
your new (empty) directory.  Find the file <newdirectory>/etc/rc/S80dhcpd 
and open it for editing.  You should see the following in this
script:

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Build the config file
cat <<EOF > /etc/dhcpd.conf
subnet $INET_NETWORK netmask $INET_NETMASK {
        range                                           $DHCPD_BEG
$DHCPD_END;
        default-lease-time                      $DHCPD_DEFLEASE;
        max-lease-time                          $DHCPD_MAXLEASE;
        option  subnet-mask                     $INET_NETMASK;
        option  broadcast-address       $INET_BROADCAST;
        option  routers                         $INET_IPADDR;
        option  domain-name-servers     $DNS;
        option  domain-name                     "$NAMED_DOMAIN";
}
EOF
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

You can add your commands to lock down a specific IP address for
a specific MAC; I ended up with something like the following:

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Build the config file
cat <<EOF > /etc/dhcpd.conf
subnet $INET_NETWORK netmask $INET_NETMASK {
        range                                           $DHCPD_BEG
$DHCPD_END;
        default-lease-time                      $DHCPD_DEFLEASE;
        max-lease-time                          $DHCPD_MAXLEASE;
        option  subnet-mask                     $INET_NETMASK;
        option  broadcast-address       $INET_BROADCAST;
        option  routers                         $INET_IPADDR;
        option  domain-name-servers     $DNS;
        option  domain-name                     "$NAMED_DOMAIN";
}
host specialhost1 {
  hardware ethernet 00:01:02:0f:0e:0d;
  fixed-address specialhost1.domain;
}
EOF
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Of course, you should replace specialhost1, the MAC address, and
the domain with your own host name, MAC address, and domain.

Now, save your changes to S80dhcpd, then cd to your new directory
again (if your editor creates a backup version of S80dhcpd, be sure
to delete it before the next step).  Tar and compress your new
dhcpd.tbz:
             tar cv . | bzip2 > <temp directory>/dhcpd.tbz

Then copy the new dhcpd.tbz to the ShareTheNet installation directory,
and finally, rebuild your STN floppy.

Notes:

1) You can probably use $NAMED_DOMAIN for the domain part of 
   specialhost1.domain above, but I haven't yet confirmed that 
   this works. Something like:
     fixed-address specialhost1.$NAMED_DOMAIN;

2) You should probably save the original version of dhcpd.tbz before
   you change it.  Renaming it to dhcpd.tbz.orig or something similar
   works fine.

3) Instead of using the Windows installation, you can get dhcpd.tbz
   from the STN floppy, and replace it with your modified version.
   I did this to verify that the changes worked, then modified the
   Windows installation so that I would get the changes each time
   I rebuilt the floppy.

4) Why, you ask, would anyone want to do this?  In my case, it was
   to support a notebook computer which I use (dual-boot Linux/Windows)
   both at work and at home.  The most convenient way to support this 
   machine is to have it use DHCP to obtain an IP address at each 
   location; however, at work a dynamic address causes problems 
   when it comes to mounting servers' directories -- the
   servers won't allow it if they can't map the (potential) client's 
   IP address to a known and trusted name, and the only way to do
   this (as far as I have been able to discover) is to allow my
   notebook to have a "permanent" address at work.  The changes to
   dhcpd.conf allow this to happen.  And of course the same issues
   apply on the home network.  I can let my notebook use DHCP to
   get an address on each network, but other machines on each
   network know the notebook by a "permanent" address.

5) It would be nice if STN supported this sort of thing,
   either from the Windows config or via the http STN server.
   It doesn't look like it would be too hard to implement.

Hope this helps.

Regards.

-- Dave Strauss


On Mon, 11 Oct 1999 11:53:47 -0500, "Burton, John  R"
<[EMAIL PROTECTED]> wrote:
>  
>  An idea for STN's DHCP server.  I'd like to see an option in the DHCP
setup
>  that'd allow me to define a specific IP address for a specific MAC
address.
>  That is, I'd like a permanent lock for 192.168.1.4 to be MAC address
>  00-00-86-1D-A1-3C.  
>  
>  In the package dhcpd I can do that in the dhcpd.conf file.  However, I
don'
>  t believe there IS such a file on an STN disk.
>  
>  Also, anyone had further thoughts on a DMZ for STN?? 
>  
>  This package is so cool!  I just shifted my DNS and DHCP services from my
>  COL box to the STN box.  I really do like it, and it seems to be doing
>  exactly what it says it'll do.  The DHCP request above isn't a BIG deal,
but
>  if I had my 'druthers I'd like to see a DMZ built in.  Even if I have to
>  ensure all my NICs are of the same type to save room on drivers....
>  
>                                       --==jb==--
>  
>  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>  John Burton
>  Sr. Project Lead
>  Rural Y2K Systems
>  INTEGRIS Health/Information Systems
>  Voice: (405)951-8613
>  Fax: (405)951-9832
>  
>  
>  _______________________________________________
>  ShareTheNet maillist  -  [EMAIL PROTECTED]
>  http://www.webserv.com/mailman/listinfo/sharethenet
>  

------------------- END INCLUDED MESSAGE ----------------

_______________________________________________
ShareTheNet maillist  -  [EMAIL PROTECTED]
http://www.webserv.com/mailman/listinfo/sharethenet

_______________________________________________
ShareTheNet maillist  -  [EMAIL PROTECTED]
http://www.webserv.com/mailman/listinfo/sharethenet

Reply via email to