You are not logged in.
I've found today that dhcpcd seems to refuse to set the ip on an interface if the ip has been set statically before.
For instance if I set my ip like so:
sudo ifconfig eth0 10.100.100.240 netmask 255.255.255.0 broadcast 10.100.100.255
and then run
sudo dhcpcd -nd eth0
It says that it gets the ip and lease from the server and then forks into the backround.
I'm not going to post the output because it's a pain in the ass to get it off the segregated network.
HOWEVER ifconfig stills shows the old ip.
dhclient DOES work however.
Also if my settings in rc.conf are set to dhcp dhcpcd properly sets the ip on the interface on boot.
If i set the ip statically in rc.conf, then change them to dhcp and do /etc/rc.d/network restart the same thing happens so it's not something I'm doing.
Is this a bug in dhcpcd or arch or something?
If it's a bug in arch I'll submit it but I wanted to see if anyone had any ideas first.
Last edited by SavageMessiah (2010-04-02 16:44:02)
Offline
I don't think it's a bug, probably you need to bring the interface down first
ifconfig eth0 down
Then issue the dhcpcd command.
I would think it would be the same using the configs
/etc/rc.d/network stop
Then change the configs to dhcp, then start
/etc/rc.d/network start
Offline
Nope, did the following and it didn't have any effect:
sudo ifconfig eth0 down
sudo dhcpcd -nd eth0
Offline
I had a similar problem - setting IP manually and then not being able to tell dhcpcd to do its thing but 'sudo ifconfig eth0 down' and a reboot worked.
I have this in my /etc/rc.cionf
eth0="dhcp"
INTERFACES=(eth0)
Offline
I would think you could do:
/etc/rc.d/network restart
instead of a reboot to accomplish this
Offline
Unfortunately a reboot is a last resort for a heap of reasons I can't go into here. network restart doesn't help. It seems to be something with dhcpcd. If you've manually set the ip for an interface dhcpcd WILL NOT EVER change the ip for it until you reboot. Taking the interface down and up again doesn't help either. I think I'll just run dhclient after the settings change, that one actually works in these circumstances.
Offline