Short questions on DHCP
conathan at gmail.com
Fri Oct 22 07:34:12 PDT 2004
> > > uses *eth1* for the connection to the world (eth0 for my lan). Probably
> > > very badly done, but working.
> > If it's working, Ken, it's not very badly done :-)
> > [SNIP scripts]
> > My system barfs as follows: /etc/sysconfig/network fails to find
> > $network_devices; I hacked that, and then it fails to find an IP and
> > mentions ifconfig.eth0. This is bull, as I tried IPs in there. So I
> It's the $network_devices that sounds worrying - maybe permissions on
> one or more of the scripts, particularly executable. All of my ifdown
> and ifup scripts are executable, the ifconfig files only need to be
> readable. Or maybe a typo or something else. My /etc/sysconfig/network
> only has HOSTNAME=something in it.
This is usually set in /etc/sysconfig/rc...
> > figured to do it manually. I gather from your scripts you can do it
> > manually by
> > modprobe eth1
> > dhclient eth1 -1
> In your case, s/eth1/eth0/g I think. The '-1' is optional - this is my
> gateway, if it doesn't get an address it might as well give up quickly
> (normally means I need to reboot the set-top box, or wait for someone to
> sort out the upstream).
> Of course, you need the alias for eth0 in modules.conf (always assuming
> the driver is a module).
> > Mind you, this is the first outing for the network bootscript, so that
> > takes me back to all the mistakes made building my very first lfs :-o.
> Yes, bootscripts on current builds are a lot easier.
> > >
> > > Note also that for this version of dhclient the leases are in
> > > /var/state/dhcp/dhclient.leases and you will need to touch that (or
> > > wherever your version is looking) before you can get a lease.
> > Yeah, the dhclient.leases have their own manpage.
> If this doesn't help, can you note the exact error message(s) and
> anything else relevant form the kernel or daemon logs ?
> das eine Mal als Tragödie, das andere Mal als Farce
if I recall, the older bootscripts had something like
if /etc/sysconfig/network-devices/ifup-eth0 existed, then run ifup-eth0.
[there was also a ifdown-eth0] replacing eth0 with whatever you like
you could just stick those lines you got in there, and it should just
work. [assuming ifconfig.eth0 exists. It is sourced by the ifup-eth0
and ifdown-eth0 files, if you want to store varaibes in there, but
even if empty, ifconfig.eth0 will have to exist].
the BLFS 1.0 [not sure when we moved to the newer bootscripts] may
even have some better examples.
Nathan Coulson (conathan)
nathan at linuxfromscratch org
conathan at gmail com
More information about the blfs-support