From mboxrd@z Thu Jan 1 00:00:00 1970 From: Udi Finkelstein Date: Sun, 29 Aug 2004 01:01:45 +0200 Subject: [U-Boot-Users] DHCP: u-boot vs. busybox In-Reply-To: <412CB9E3.7090002@imc-berlin.de> References: <412CB9E3.7090002@imc-berlin.de> Message-ID: <41310ED9.3020001@udif.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Steven Scholz wrote: > 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... > >