[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Detailed startup logs?



--- Rick Stevens <rstevens vitalstream com> wrote:
> Ajit Warrier wrote:
> > So if /etc/rc.d/init.d/network calls
> > /etc/sysconfig/network-scripts/ifup, which calls
> > ifcfg-eth0 and if dhclient is called from
> > /etc/sysconfig/network-scripts/ifup only then I am
> > really lost. Because when I do ifup eth0 it does
> not
> > send the hostname to the DHCP server but when I do
> > dhclient eth0 it does send it. One would think
> that
> > both would have the same effect since ifup does
> its
> > magic through dhclient. And the same thing happens
> > when I reboot the system - it comes up without
> sending
> > the hostname. 
> > 
> > That's why I am begining to think I should add a
> > script which will call dhclient eth0 at the time
> of
> > startup rather than ifup eth0, since dhclient eth0
> > also brings the interface up. Is that a good way
> to
> > go?
> 
> Did you ever set the "HOSTNAME=" bit in
> /etc/sysconfig/network?

Oh yes, that is set.

> If you didn't set that, dhclient does NOT know to
> send the desired
> host name to the DHCP server, so the DHCP server
> sends dhclient one
> it thinks is appropriate (probably based on the fact
> that it's the
> same MAC address, it sends the same hostname) and
> dhclient puts in its
> cache.
> 
> When you run dhclient again, it checks its cache,
> sees a hostname in
> there, and sends it in its request to the DHCP
> server.  The DHCP server
> sends the same hostname back.  Does that make it
> clear?

However, dhclient is supposed to take its
configuration from the dhclient.conf where I have set
it to send the desired name.  The man file says that
if it does not get a lease, it tries one from the
/var/lib/dhcp/dhclient-eth0.leases file and there is
no hostname there. 

So I guess I am leaning towards putting up an explicit
start up script to run dhclient eth0 at the time of
bootup. Is this a good idea? If so, where should it be
in the list of scripts - after S10network or are there
other scripts it should come after (or before?) And
what should be there in this script file?

Thanks,

Ajit

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]