Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm working on some embedded devices which should be connected to a large network (hundreds of devices) via ethernet and that should be configured using the DHCP protocol. What I'm experiencing is that apparently the devices get the address in some networks but not in others. I setup a test network with just one client, a switch and a DHCP server (Ubuntu Linux). The address is correctly assigned and the DHCP server logs show the DORA sequence.

I tried to connect the same client to a common home router with a DHCP server (it is my home router, so it should be working properly) and the IP address is not acquired by the client. This is the sequence dump for the device:

No.     Time           Source                Destination           Protocol Length Info
     86 26.515684000   ::                    ff02::16              ICMPv6   90     Multicast Listener Report Message v2

Frame 86: 90 bytes on wire (720 bits), 90 bytes captured (720 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: IPv6mcast_00:00:00:16 (33:33:00:00:00:16)
Internet Protocol Version 6, Src: :: (::), Dst: ff02::16 (ff02::16)
Internet Control Message Protocol v6

No.     Time           Source                Destination           Protocol Length Info
     87 26.515688000   ::                    ff02::1:ff91:de41     ICMPv6   78     Neighbor Solicitation for fe80::260:6eff:fe91:de41

Frame 87: 78 bytes on wire (624 bits), 78 bytes captured (624 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: IPv6mcast_ff:91:de:41 (33:33:ff:91:de:41)
Internet Protocol Version 6, Src: :: (::), Dst: ff02::1:ff91:de41 (ff02::1:ff91:de41)
Internet Control Message Protocol v6

No.     Time           Source                Destination           Protocol Length Info
     88 26.596056000   0.0.0.0               255.255.255.255       DHCP     371    DHCP Discover - Transaction ID 0xb444e919

Frame 88: 371 bytes on wire (2968 bits), 371 bytes captured (2968 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0xb444e919
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: DavicomS_91:de:41 (00:60:6e:91:de:41)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type
    Option: (57) Maximum DHCP Message Size
    Option: (60) Vendor class identifier
    Option: (12) Host Name
    Option: (55) Parameter Request List
    Option: (255) End

No.     Time           Source                Destination           Protocol Length Info
     94 27.515730000   fe80::260:6eff:fe91:de41 ff02::2               ICMPv6   70     Router Solicitation from 00:60:6e:91:de:41

Frame 94: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: IPv6mcast_00:00:00:02 (33:33:00:00:00:02)
Internet Protocol Version 6, Src: fe80::260:6eff:fe91:de41 (fe80::260:6eff:fe91:de41), Dst: ff02::2 (ff02::2)
Internet Control Message Protocol v6

No.     Time           Source                Destination           Protocol Length Info
    119 30.427837000   0.0.0.0               255.255.255.255       DHCP     371    DHCP Discover - Transaction ID 0xb444e919

Frame 119: 371 bytes on wire (2968 bits), 371 bytes captured (2968 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0xb444e919
    Seconds elapsed: 4
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: DavicomS_91:de:41 (00:60:6e:91:de:41)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type
    Option: (57) Maximum DHCP Message Size
    Option: (60) Vendor class identifier
    Option: (12) Host Name
    Option: (55) Parameter Request List
    Option: (255) End

No.     Time           Source                Destination           Protocol Length Info
    122 30.985580000   fe80::260:6eff:fe91:de41 ff02::16              ICMPv6   90     Multicast Listener Report Message v2

Frame 122: 90 bytes on wire (720 bits), 90 bytes captured (720 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: IPv6mcast_00:00:00:16 (33:33:00:00:00:16)
Internet Protocol Version 6, Src: fe80::260:6eff:fe91:de41 (fe80::260:6eff:fe91:de41), Dst: ff02::16 (ff02::16)
Internet Control Message Protocol v6

No.     Time           Source                Destination           Protocol Length Info
    127 31.525478000   fe80::260:6eff:fe91:de41 ff02::2               ICMPv6   70     Router Solicitation from 00:60:6e:91:de:41

Frame 127: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: IPv6mcast_00:00:00:02 (33:33:00:00:00:02)
Internet Protocol Version 6, Src: fe80::260:6eff:fe91:de41 (fe80::260:6eff:fe91:de41), Dst: ff02::2 (ff02::2)
Internet Control Message Protocol v6

No.     Time           Source                Destination           Protocol Length Info
    138 35.535297000   fe80::260:6eff:fe91:de41 ff02::2               ICMPv6   70     Router Solicitation from 00:60:6e:91:de:41

Frame 138: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: IPv6mcast_00:00:00:02 (33:33:00:00:00:02)
Internet Protocol Version 6, Src: fe80::260:6eff:fe91:de41 (fe80::260:6eff:fe91:de41), Dst: ff02::2 (ff02::2)
Internet Control Message Protocol v6

No.     Time           Source                Destination           Protocol Length Info
    142 39.405342000   0.0.0.0               255.255.255.255       DHCP     371    DHCP Discover - Transaction ID 0xb444e919

Frame 142: 371 bytes on wire (2968 bits), 371 bytes captured (2968 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0xb444e919
    Seconds elapsed: 13
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: DavicomS_91:de:41 (00:60:6e:91:de:41)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type
    Option: (57) Maximum DHCP Message Size
    Option: (60) Vendor class identifier
    Option: (12) Host Name
    Option: (55) Parameter Request List
    Option: (255) End

No.     Time           Source                Destination           Protocol Length Info
    392 55.264802000   0.0.0.0               255.255.255.255       DHCP     371    DHCP Discover - Transaction ID 0xb444e919

Frame 392: 371 bytes on wire (2968 bits), 371 bytes captured (2968 bits) on interface 0
Ethernet II, Src: DavicomS_91:de:41 (00:60:6e:91:de:41), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0xb444e919
    Seconds elapsed: 29
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: DavicomS_91:de:41 (00:60:6e:91:de:41)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type
    Option: (57) Maximum DHCP Message Size
    Option: (60) Vendor class identifier
    Option: (12) Host Name
    Option: (55) Parameter Request List
    Option: (255) End

It is my understanding that the DHCP discover is not answered. Is this correct? Do you have any idea why?

EDIT: I tried to check again the packets using wireshark, and I can see the option Option: (53) DHCP Message Type. By expanding that I see DHCP Discovery. That does seem DHCP to me. I also checked a Mac OS X DHCP packet using wireshark, and I still see "Message type: Boot Request (1)" in the packets. The only difference is that no DHCP Discovery is sent, just a DHCP Request for the address. Also, the same adapter is not working under Windows 7.

So, is this really the bootp protocol? Can you confirm that? Or is it DHCP? And why does DHCP Discover messages are sent but no DHCP Offer is sent back?

share|improve this question

1 Answer 1

The problem is that your client is not talking DHCP but bootp. Not all dhcp servers handle bootp as well due to design limitations or configuration settings.

share|improve this answer
    
Your answer is very interesting, but before marking as the correct answer I would like to ask you how you determined bootp is used instead of dhcp and how do you explain another particular I didn't specify: in the tests, an ethernet USB dongle is used, and the same happens when that dongle is plugged into a Windows 7 machine. No IP is acquired from the network. –  Luca Carlon Oct 7 '12 at 17:05
    
You can see in your log: 'Bootstrap Protocol; Message type: Boot Request (1)'. This is not a part of DHCP. It is a part of bootp specification. For the second sub-question I have no answer. –  Serge Oct 7 '12 at 17:17
    
Thanks for your answers. Do you know what module is responsible for using bootp instead of dhcp? I suppose the client is something on the OS level, but do you think it is possible that Windows 7 is also using bootp because the driver of the ethernet adapter requests to use bootp? In that case this is a possible explanation of why Windows 7 is not working as well. –  Luca Carlon Oct 7 '12 at 21:34
    
What your embedded devices are running? You just mentioned that you are using Ubuntu on the server. –  Serge Oct 7 '12 at 21:36
    
The OS is a customised Android. The dhcp client should be included I suppose. But if the driver of the ethernet adapter is somehow responsible for IP address acquisition, then there might be a reason why also on Windows 7 the address cannot be acquired. –  Luca Carlon Oct 7 '12 at 22:02

Your Answer

 
discard

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.