Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have the following problem. I cannot get an IP address using DHCP. I have a 10/100Mb adapter on a set-top box connected to a 1000Mb LAN.

When I boot up the set-top box it gets an IP from the DHCP server. But when I disable the ethernet interface using

ifconfig eth0 down

leave it for about 10 minutes and re-enable it with

ifconfig eth0 up

it doesn't get an IP. The OS of the set-top box is a Linux-MIPSEL with kernel and the udhcpc application is used for getting IP from DHCP.

udhcpc application is starting correctly as I can see. I also used tcpdump in order to see the package transactions. The command I used is the following:

tcpdump -lenx -i eth0 -l -vvv port bootps or port bootpc

The log from the tcpdump showed that it is sent a Discover package but I don't receive any response from the DHCP server. The log files from the server shows that the server sending an Offer but I don't receive this package.

As I am not a network expert, can you suggest what it might be the problem? Could it be that I have a 10/100Mb adapter to a 1000Mb LAN? Or might be something else?

PS: I also used a 10/100Mb switch to connect to the LAN but I get the same problem.

Update 1: After using as dhcp client the udhcpc, I thought of trying something else. So I installed ConnMan which is a network manager and has it's own dhcp client. Unfortunately I had a similar result, instead of not getting IP at all, I was getting the APIPA address which is similar of not getting an IP. I am start thinking that maybe the endianness has something to do...

Update 2: Sorry for the delay, I have tested the set-top box to some home routers like a Cisco-Linksys E1500 and works with no problem. I also have more information regarding the LAN. There is a switch between the DHCP server and the set-box, a Netgear GS724TS with Hardware ver 00.00.01, Boot ver and Software ver V3.1.0.1. As I can see in the Monitor section of the web interface of the switch there is not so much information even if I select the debug in the log filter.

share|improve this question
What kind of switches do you have, like the exact brands/model/firmware? –  Chris S Mar 6 '12 at 18:13
Hi Chris, I don't have that information, all the sys admins have gone. I will ask them tomorrow... –  Stavros Vagionitis Mar 6 '12 at 18:38
I have worked as a sysadmin in the past, but currently I am embedded engineer. I thought that would be more appropriate for the question I asked. So, is more appropriate for this kind of question? –  Stavros Vagionitis Mar 6 '12 at 19:03
It's only really important in general because you probably wont have access to the systems that need "fixin". I'm fairly sure the switch is blocking DHCP at some point, probably as a misguided security protocol. But it's pretty hard to diagnose when you're playing telephone. Otherwise, yes, this is the correct site for such questions. Normally we request that "end users" (which essentially covers you in this case) contact their sysadmins with such issues; and those sysadmins are welcome to post here if they have questions. –  Chris S Mar 6 '12 at 19:06
Hi again Chris, there is a Netgear GS724TS switch with firmware V3.1.0.1. I have access to the web interface of the switch and the logs in the monitoring section don't give much information even if I choose the debug in the log filter. –  Stavros Vagionitis Apr 18 '12 at 18:07

3 Answers 3

My initial thought is that your 'up' script on the interface isn't calling the dhcp client, but the dhcp client is called somewhere in one of the runlevels in the boot process.

After doing ifconfig eth0 up have you tried running dhclient? I'm not familiar with Linux-MIPSEL but this would be my line of investigation. If that works, find your eth0-up scipt or similar and check that out.

I very much doubt it's anything to do with a 100Mb NIC on a 1Gb switch. The switch and NIC will negotiate for 100Mb and that will be that, your problem is in a different layer.

share|improve this answer
Just check the network switch has auto-negotiate turned on, rather than being hard coded at 1Gb. –  Decado Mar 6 '12 at 13:20
yeah granted, that would be fail! –  SimonJGreen Mar 6 '12 at 13:28
Thanks @SimonJGreen for the answer, when I enable the ethernet the dhcp client is enabled, if not already enabled. A script is running in the background that monitors if the cable is plugged or unplugged (or the interface enabled or disabled). When enabled it runs the dhcp client. I should check maybe more on what is happening with the dhcp client... –  Stavros Vagionitis Mar 6 '12 at 13:47

ifconfig eth0 up doesn't do anything but bring the ethernet device up i.e. make it active. You need to either assign a static ip address (with ifconfig eth0, for example) or run a dhcp client to get an IP address (in your case, udhcpc).

share|improve this answer
Thanks @webtoe for the answer. There is a script that it runs in the background that monitors if cable is plugged/unplugged or the interface enabled/disabled. So when enabled it activates the dhcp client. Maybe I should check more the dhcp client because it calls some other scripts... –  Stavros Vagionitis Mar 6 '12 at 13:50
I believe this could be ifplugd then? I've noticed that running on my DreamPlug (I switched it off as the config was messing with other things and I didn't need it). –  webtoe Mar 6 '12 at 13:55
No, actually I use a custom one, here is the link of how it looks like Which calls another script :) –  Stavros Vagionitis Mar 6 '12 at 14:17

Have you checked the cable? I once used a crossover cable instead of a straight one and got similar problems.

share|improve this answer
Thanks @Nils for the answer. I checked it and it is straight. I also changed it with another one, just in case, but I get the same results... –  Stavros Vagionitis Mar 6 '12 at 15:46

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.