Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ARM system that has been pre-loaded with some variant of Linux. I don't know the distribution; I can only see the kernel number in dmesg.

In /etc/network/interfaces, I set eth0 to

auto eth0
iface eth0 inet dhcp

After I save and reboot (or run ifdown eth0 followed by ifup eth0), I can see that the networking system is searching for a DHCP server and actually obtains a lease on a valid IP address, but when I run ifconfig, the interface has not been assigned the address that it pulled down from DHCP. It has been assigned a 192.168.. address.

Where can this possibly be coming from?

I noticed in dmesg that a variable "ip" is passed to the kernel at boot with the same address that is overriding my DHCP address. How can I disable this overriding behavior? I noticed a dynamic environment variable in u-boot called ip. I set it dhcp and saved it to nv storage, but the problem persisted. I tried to set the u-boot environment variable ipaddr to dhcp, but was informed that this wasn't a valid value for the variable.

How can I get the interface to be configured through DHCP?

share|improve this question

The ip parameter is describe here:

The parameters that are passed to the kernel are stored in a variable called bootargs in u-boot.

Do a printenv to check what the value of bootargs is. If you see a parameter "ip=" being passed to the kernel, then you can delete that from bootargs.

There's another possibility through which kernel parameters can be passed.

That is CONFIG_CMDLINE option in kernel configuration.

If your kernel has been build with CONFIG_IKCONFIG support, then there should be a /proc/config.gz file.

Copy that to /tmp and gunzip it and check if the CONFIG_CMDLINE option is present and if it is, whether the ip parameter is being passed or not.

If it is, then you can't do anything about it, only a kernel recompilation can change that situation. I'm not sure if its possible to fetch ip using dhcp again in /etc/rc.local and have it overwrite the ip obtained from the kernel parameter.

share|improve this answer
Thank you for your ideas. I did not mention in the original post, but bootargs is not a defined variable. I did your suggestion with config.gz, but there is nothing in the file that sets the variable ip or has the 192.168 ip address in it. I will try setting the client-ip to dhcp in the ip agrument as suggested in your link and will get back to you. Thanks. – user20926 May 19 '11 at 12:22
It appears as though u-boot had disabled dhcp on the interface. Oddly, as I said before, a valid address was leased, but it was never applied to the interface. By setting dhcp to on in u-boot, the problem was solved. Thanks. – user20926 May 19 '11 at 12:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.