Skip to contentSkip to conversation

DHCP: u-boot vs. busybox

U-Boot-Users Steven Scholz 3 participants 3 messages Aug 25, 2004 – Aug 28, 2004

lore
Share & tools
lore
#0 lore raw

Hi there,

I just noticed that my board get's different IPs from the DHCP server depending on wether U-Boot or busybox udhcpc did the request.

The dhcp server log shows that they're using the same MAC:

From U-Boot:
DHCPDISCOVER from 00:a0:33:01:f9:97 via eth0
DHCPOFFER on 10.0.10.220 to 00:a0:33:01:f9:97 via eth0 DHCPREQUEST for 10.0.10.220 (10.0.2.9) from 00:a0:33:01:f9:97 via eth0 DHCPACK on 10.0.10.220 to 00:a0:33:01:f9:97 via eth0

From linux-2.4.27/busybox:
DHCPDISCOVER from 00:a0:33:01:f9:97 via eth0
DHCPOFFER on 10.0.10.174 to 00:a0:33:01:f9:97 via eth0 DHCPREQUEST for 10.0.10.174 (10.0.2.9) from 00:a0:33:01:f9:97 via eth0 DHCPACK on 10.0.10.174 to 00:a0:33:01:f9:97 via eth0

Doing several rebooting I still see the same.

Any idea how this could happen? I thought I would get the same IP fir the same MAC as long as the lease is valid...

Signature · 1 line
Steven Scholz
#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

I just noticed that my board get's different IPs from the DHCP server depending on wether U-Boot or busybox udhcpc did the request.

Please don't send duplicate messages to several mailing lists (u-boot-users and busybox).

Continue on the BB list as there was some good advice.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Bradley's Bromide: If computers get too  powerful,  we  can  organize
them into a committee - that will do them in.
#2 lore raw
In reply to Steven Scholz

Hi,

I ran into something similar lately. I don't remember the exact RFC terminology, but here it is:

When you send a DHCP request, there are 2 ways to specify your ID:
1. The MAC address field in the DHCP request.
2. A "client ID" tag in the DHCP option field.

After wasting a few hours with a cisco router to give me a specific IP address for each MAC address I had, I found out that:

1. Windows machines usually report their MAC address by prepending the ARP interface type (0x01 for Ethernet) to the MAC address and report this as the "Client ID".

2. U-boot simply uses the MAC address field.

Cisco routers have separate commands for specifying each type:

ip dhcp pool XXXX

    import all
    host 10.10.10.xxx 255.255.255.0
    client-identifier 0100.0c41.d584.3d
    client-name xxxxx

or:

ip dhcp pool XXXX

    import all
    host 10.10.10.xxx 255.255.255.0
    hardware-address 000c.41d5.843d
    client-name xxxxx

Hope this helps,
Udi

Quoted 25 lines · Steven Scholz

Hi there,

I just noticed that my board get's different IPs from the DHCP server depending on wether U-Boot or busybox udhcpc did the request.

The dhcp server log shows that they're using the same MAC:

From U-Boot:
DHCPDISCOVER from 00:a0:33:01:f9:97 via eth0
DHCPOFFER on 10.0.10.220 to 00:a0:33:01:f9:97 via eth0 DHCPREQUEST for 10.0.10.220 (10.0.2.9) from 00:a0:33:01:f9:97 via eth0 DHCPACK on 10.0.10.220 to 00:a0:33:01:f9:97 via eth0

From linux-2.4.27/busybox:
DHCPDISCOVER from 00:a0:33:01:f9:97 via eth0
DHCPOFFER on 10.0.10.174 to 00:a0:33:01:f9:97 via eth0 DHCPREQUEST for 10.0.10.174 (10.0.2.9) from 00:a0:33:01:f9:97 via eth0 DHCPACK on 10.0.10.174 to 00:a0:33:01:f9:97 via eth0

Doing several rebooting I still see the same.

Any idea how this could happen? I thought I would get the same IP fir the same MAC as long as the lease is valid...