[ale] Problem with using dhcp and cable modem

Thomas Ringate tringate at tampabay.rr.com
Tue Jun 22 11:55:00 EDT 1999


Joe,

I already have my etc/hosts file set up with all of my local machines in it, and
each WIN98 machine has an "lmhosts" file with the other machines defined.

This was all working just fine until I added the dhcp interface.

I also noticed that yesterday I did a "hostname bandit" command on my
Linux machine, and the name changed to "bandit".  Today it's name is back to "142hfc222",
but when I again did the "hostname bandit" the host name changed back to "bandit.

This however does not change the name on the 10.0.1.x network.  It stays 142.hfc222.

On a WIN98 machine if I do a "FIND" for "bandit" it does not find anything, however,
if I do a find for "142hfc222" it finds it right away, and I can of course access all the
directories I have set up for samba.

The problem is that this name will change every time I get a new IP address on the dhcp
interface, which means I would have to reconfigure each of my WIN98 machines so that
the file "share" name and the network name is what the dhcp client is changing my
host name to.

I suspect something in the "cron" process changed my host name back to 142hfc222 last night.

In what init file is dhcp started, and same question for where is the hostname set?  If I
can stop dhcp from changing the host name, I think everything will be fine.

As far as I can tell, the only thing that is getting altered that I don't want to get altered is the
hostname.

Tom


Joe Knapka wrote:

> DHCP should be setting the IP address for the card connected to the
> cable modem, but not the one on the lan. So you could add an entry
> to the C:\windows\hosts file on each of the Win98 machines
> that looks like
>
> <Linux-box-non-dhcp-address>    bandit
>
> and a similar entry in /etc/hosts on the Linux box. On a small
> network like yours, using hard-coded host names isn't too
> onerous. Alternatively, you could run a DNS server on the
> Linux machine to resolve local names, but I don't know
> how to set that up; maybe someone else on the list has
> some advice.
>
> Good luck,
>
> -- Joe
>
> Thomas Ringate wrote:
> >
> > I am running Red Hat Linux release 5.2
> >
> > I recently added a second NIC card to my Linux PC, and connected a cable modem to
> > that NIC card.  This arrangement requires me to configure the card to use dhcp, and to
> > execute a login program called rrlogin.
> >
> > Everything is working fairly well, except for one thing.
> >
> > Prior to adding the dhcp I had a name of "bandit" for my host name.  I have a local
> > LAN with three WIN98 machines using the Linux PC as a file server with samba. The
> > share name the WIN98 machines use is "bandit".
> >
> > Now because of the dhcp addition my host name has been changed to 142hfc222 which
> > is a combination of the IP address dhcp has assigned to me, and the letters hfc.  dhcp also
> > generates a new resolv.conf on each bootup with just the information that it expects to find there.
> >
> > I would like to get back to having my host name be "bandit", particularly for samba.  I
> > do not want a dynamic host name that changes every few weeks.
> >
> > I have tried the following:
> >
> > the command "hostname" yields 142hfc222
> > If I enter "hostname bandit" my host name then
> > does change to "bandit" but samba still responds to 142hfc222.
> >
> > When in command line mode, the prompt continues to show 142hfc222 rather than "bandit".
> >
> > My suspicion is that I need to change the host name sometime before samba is started running,
> > and after dhcp has done it's thing, but my knowledge of Linux is very limited.
> > I feel extremely lucky just to have my machine working as well as it does.
> >
> > Does anyone have some guidance for a beginner, on how to keep my original host name?
> >
> > Keep in mind I have only figured out how to set all these things using the GUI that Red Hat
> > has built into their x-windows.
> >
> > I have figured out how to edit and add a few things to rc.local and smb.conf
> > I have looked for a file called dhcpd.conf but I am unable to find any such file on my machine.
> >
> > My environment prior to activating dhcp was a ppp dialup which worked perfectly,
> > and my host name did not change when I connected into my ISP.
> >
> > Tom
>
> -- Joe Knapka
> * I speak only for myself, except when the little transceiver
> * at the base of my skull is activated...






More information about the Ale mailing list