Bit Twister <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> On 26 Sep 2003 10:14:07 -0700, Matthew Weymar wrote:
>
>>Hi,
>>
>>Booting up RH w/ 2.4.18-10smp kernel for the first time in a long
>>time, in a new and different network than the one to which this box
>>used to be connected - and in which DHCP worked just fine.
>
>
> maybe
> /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
> /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
These seem pretty innocuous, do they not?...
> need changes or your dhcp client is using a stale file which needs to
> be deleted.
Per 'man dhcpcd', I add "local0.* /var/log/dhcpcd.log" to
/etc/syslog.conf, reboot (same problem) and check the dhcpcd.log file,
where the only entry refers to the timing out issue. I then run
'dhcpcd
-d". I get:
dhcpcd: MAC address = xx:xx:xx:xx:xx:xx
and then eventually a prompt. Sadly, eth0 is still without an IP
address.
Checking /var/log/dhcpcd.log, however, reveals:
localhost dhcpcd[pid]: broadcasting DHCP_REQUEST for 192.168.x.x
localhost dhcpcd[pid]: timed out waiting for DHCP_ACK response
localhost dhcpcd[pid]: broadcasting DHCP_DISCOVER
localhost dhcpcd[pid]: timed out waiting for a valid DHCP server
response
Interestingly my router's IP is: 192.168.y.1(!), so it seems that
you're
right that there's something "stale" in there. "But what? where?" I am
asking myself....
After *much* poking around, I have come across a post by Brian Cluff
on
another list in which he mentions deleting the
/etc/dhcpc/dhcpcd-eth0.info file, and "getting an IP without a hitch."
Opening this file up and seeing my "bad" 192.168.x.x IP filled me with
optimism - that deleting this file would put me in business,
obviously.
Alas, 'tis not the case.
After deleting /etc/dhcpc/dhcpcd-eth0.info, /var/logdhcpcd.log
(following 'dhcpcd -d') indicates that I'm still "broadcasting
DHCP_REQUEST for 192.168.x.x."
I figure dhcpcd is picking this up from /etc/dhcpc/dhcpcd-eth0.cache,
and so I delete that, run 'dhcpcd -d' again and find that
/var/logdhcpcd.log now includes only the latter two of the four lines
above:
localhost dhcpcd[pid]: broadcasting DHCP_DISCOVER
localhost dhcpcd[pid]: timed out waiting for a valid DHCP server
response
I try creating a new /etc/dhcpc/dhcpcd-eth0.info, substituting
192.168.y.x for 192.168.x.x, but I get these same two lines (above),
and
only these two lines again.
Now I search the net on "new /etc/dhcpc/dhcpcd-eth0.info" and see that
perhaps I should have run "ifdown eth0" and then "ifup eth0". I delete
/etc/dhcpc/dhcpcd-eth0.info again, and run ifdown & ifup. Both
operations fail.
I find a LinuxPlanet.net tutorial on "xDSL and Linux: Go Speed Racer!"
Being a fan, I try the script they suggest (see below). This does
nothing for me. Still no IP address.
Pausing to take a breath... hoping for more suggestions....
Addendum: In light of Jeroen Geilman's reply to my original post, I
try 'pump -i eth0', and find that it does not work.
I think that one of my problems is that since DHCP fails on startup,
NIC
is not properly recognized (because it doesn't have an IP?...) I don't
know.
Tks,
Matthew
From
http://linuxplanet.com/linuxplanet/tutorials/1454/4/:
#!/bin/sh
#
# Name: renet
# Author: Nicholas Donovan <(E-Mail Removed))
# Function: resets the IP by bumping a request from DHCPCD
#
# Revisions:
# remove the old information
rm /etc/dhcpc/dhcpcd-eth0.cache -f
rm /etc/dhcpc/dhcpcd-eth0.info -f
# kill the runtime PID reference
rm /var/run/dhcpcd-eth0.pid -f
# request a new IP from server...
echo "making new DHCP request..."
# I added the '-d' argument - unnecessarily??? -- MDW
/sbin/dhcpcd -d
sleep 3
# if changed properly tell it then pipe to log file...
echo "(dhcpcd) IP address changed to $1" | logger
# Display the new IP
clear
echo "Your new DHCP address is:"
/sbin/ifconfig eth0
# End of Script
Simply chmod 744 this script and place it into the /sbin directory.