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

Re: Startup network scripts



--- Rick Stevens <rstevens vitalstream com> wrote:
> Ajit Warrier wrote:
> > I have set dhclient so that it now does send the
> name
> > to the DHCP server and consequently gets
> registered in
> > the DNS server as well. Now when I run dhclient
> from
> > the terminal, it does everything correctly as
> > described. So that's a success!
> > 
> > However, when I restart the RHL9 unit, it once
> again
> > does not register the name. Once it has rebooted,
> if I
> > run dhclient from the terminal, it registers the
> name
> > with the servers.
> 
> The dreaded chicken-and-egg thing.  You don't get a
> hostname the first
> time because you didn't ask for one.  The second
> time, you've set
> a host name so you send it to the DHCP server and it
> works.

******************************
But by setting it in dhclient.conf am I not asking for
the hostname to be sent? I do know that when I run
dhclient explicitly the name _is_ getting registered
so that means that dhclient is indeed sending a name
and the DHCP-DNS server are accepting it. Then why is
it that dhclient does not do the same thing when the
computer is booting up?
I also looked at /etc/sysconfig/network-scripts/ifup.
There is a section there that suggests that it is
looking for the DHCP name to send first in something
called PUMPARGS, then in DHCPCDARGS and finally in
dhclient. That section is like this - 

    if [ -n "${DHCP_HOSTNAME}" ]; then
       # Send a host-name to the DHCP server (requ. by
some dhcp servers).
       PUMPARGS="${PUMPARGS} -h ${DHCP_HOSTNAME}"
       DHCPCDARGS="${DHCPCDARGS} -h ${DHCP_HOSTNAME}"
       if [ -x /sbin/dhclient ] ; then
          if [ -w /etc/dhclient-${DEVICE}.conf ] ;
then
             if ! grep "send *host-name
*\"${DHCP_HOSTNAME}\"" /etc/dhclient-${DEVICE}.conf >
/dev/null 2>&1 ; then
                echo "send host-name
\"${DHCP_HOSTNAME}\";  # temporary RHL ifup addition"
>> /etc/dhclient-${DEVICE}.conf
             fi
          elif ! [ -e /etc/dhclient-${DEVICE}.conf ] ;
then
             echo "send host-name
\"${DHCP_HOSTNAME}\";  # temporary RHL ifup addition"
>> /etc/dhclient-${DEVICE}.conf
          fi
       fi
    fi

Does this mean that it is lookinf for the info in a
file like dhclient-eth0.conf?
******************************


> 
> Make sure you have "HOSTNAME=" set in
> /etc/sysconfig/network to force
> the hostname you want.

******************************
Yes HOSTNAME was already set
******************************

> 
> > My guess if that either dhclient is not being used
> by
> > my RHL9 client while booting up (it is a standard
> > "everything" install and I have changed nothing)
> or
> > the partitions the files are on, are not
> accessible at
> > the time dhclient is starting up. So my questions
> are
> > - 
> > 
> > 1. How can I check to see what DHCP client is
> being
> > used during startup - dhclient or dhcpcd?
> 
> Do a "whereis" or "which" on both and see which
> actually has a path.
> RH8.0 uses dhclient, RH9 uses dhcpcd.

******************************
Actually I think RHL9 is using dhclient because when I
did whereis dhclient and which dhclient, I got the
correct responses and for dhcpcd I got no dhcpcd in
the path.
******************************
 
> > 2. Is there a way to run dhclient after startup
> > explicitly? Is this a good idea?
> 
> "service network start" or "service network
> restart".  It is not a
> good idea to do it unless you need to.
>
----------------------------------------------------------------------
> - Rick Stevens, Senior Systems Engineer    
> rstevens vitalstream com -
> - VitalStream, Inc.                      
> http://www.vitalstream.com -
> -                                                   
>                 -
> -            Beware of programmers who carry
> screwdrivers            -
>
----------------------------------------------------------------------
> 
> 
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list redhat com
>
https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request redhat com
> Subject: unsubscribe


__________________________________
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]