Ragnar Wisloff skrev:
I'm observing a puzzling problem. It seems that the DHCP request sent out by the thin client is subtly different the first and second time (two DHCP requests are sent during a single boot). The second DHCP request contains more information, and the DHCPD server sees this as a different request. Even if the MAC address is the same, they have different uids and so a different IP is handed out. These two stanzas from a leases file shows this behaviour:

lease 192.168.199.153 {
  starts 3 2005/05/25 09:56:32;
  ends 4 2005/05/26 09:56:32;
  tstp 4 2005/05/26 09:56:32;
  binding state active;
  next binding state free;
  hardware ethernet 00:50:8b:50:c1:85;
}
lease 192.168.199.245 {
  starts 3 2005/05/25 09:56:43;
  ends 4 2005/05/26 09:56:43;
  tstp 4 2005/05/26 09:56:43;
  binding state active;
  next binding state free;
  hardware ethernet 00:50:8b:50:c1:85;
  uid "\001\000P\213P\301\205";


I sniffed a bit of traffic during bootup (see attached packet contents). The DHCP requests are indeed different (quite a bit different actually). However, it seems that the last line with the uid is derived from the second request which contains an explicit

    Option 61: Client identifier
        Hardware type: Ethernet
        Client MAC address: 90:12:02:51:58:34 (10.0.3.103)

It must be this information that makes the DHCP server think there are two different clients talking to it.

I did try out the "deny duplicates;" line in dhcpd.conf, but that did not help (Jim never thought it would ;).

So it might be that the two solutions are to either assign fixed IPs or change the behaviour of the client request during boot. The linuxrc script seems to call dhcpcd with almost no options, perhaps some more options could be added. I know too little about dhcpcd.



Ragnar
No.     Time        Source                Destination           Protocol Info
     35 12.336726   0.0.0.0               255.255.255.255       DHCP     DHCP 
Discover - Transaction ID 0x3515834

Frame 35 (590 bytes on wire, 590 bytes captured)
    Arrival Time: May 26, 2005 09:05:32.991491000
    Time delta from previous packet: 1.176060000 seconds
    Time since reference or first frame: 12.336726000 seconds
    Frame Number: 35
    Packet Length: 590 bytes
    Capture Length: 590 bytes
    Protocols in frame: eth:ip:udp:bootp
Ethernet II, Src: 90:12:02:51:58:34, Dst: ff:ff:ff:ff:ff:ff
    Destination: ff:ff:ff:ff:ff:ff (Broadcast)
    Source: 90:12:02:51:58:34 (10.0.3.103)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 0.0.0.0 (0.0.0.0), Dst Addr: 255.255.255.255 
(255.255.255.255)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 576
    Identification: 0x0000 (0)
    Flags: 0x00
        0... = Reserved bit: Not set
        .0.. = Don't fragment: Not set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 20
    Protocol: UDP (0x11)
    Header checksum: 0xa4ae (correct)
    Source: 0.0.0.0 (0.0.0.0)
    Destination: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
    Source port: bootpc (68)
    Destination port: bootps (67)
    Length: 556
    Checksum: 0xab88 (correct)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x03515834
    Seconds elapsed: 4
    Bootp flags: 0x8000 (Broadcast)
        1... .... .... .... = Broadcast flag: Broadcast
        .000 0000 0000 0000 = Reserved flags: 0x0000
    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: 90:12:02:51:58:34 (10.0.3.103)
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option 53: DHCP Message Type = DHCP Discover
    Option 55: Parameter Request List
        1 = Subnet Mask
        2 = Time Offset
        3 = Router
        5 = Name Server
        6 = Domain Name Server
        11 = Resource Location Server
        12 = Host Name
        13 = Boot File Size
        15 = Domain Name
        16 = Swap Server
        17 = Root Path
        18 = Extensions Path
        43 = Vendor-Specific Information
        54 = Server Identifier
        60 = Vendor class identifier
        67 = Bootfile name
        128 = Private
        129 = Private
        130 = Private
        131 = Private
        132 = Private
        133 = Private
        134 = Private
        135 = Private
    Option 57: Maximum DHCP Message Size = 1260
    Option 93: Client System Architecture (2 bytes)
    Option 94: Client Network Device Interface (3 bytes)
    Option 60: Vendor class identifier = "PXEClient:Arch:00000:UNDI:002001"
    End Option
    Padding
No.     Time        Source                Destination           Protocol Info
   2821 20.583186   0.0.0.0               255.255.255.255       DHCP     DHCP 
Discover - Transaction ID 0x45809633

Frame 2821 (590 bytes on wire, 590 bytes captured)
    Arrival Time: May 26, 2005 09:05:41.237951000
    Time delta from previous packet: 0.265270000 seconds
    Time since reference or first frame: 20.583186000 seconds
    Frame Number: 2821
    Packet Length: 590 bytes
    Capture Length: 590 bytes
    Protocols in frame: eth:ip:udp:bootp
Ethernet II, Src: 90:12:02:51:58:34, Dst: ff:ff:ff:ff:ff:ff
    Destination: ff:ff:ff:ff:ff:ff (Broadcast)
    Source: 90:12:02:51:58:34 (10.0.3.103)
    Type: IP (0x0800)
Internet Protocol, Src Addr: 0.0.0.0 (0.0.0.0), Dst Addr: 255.255.255.255 
(255.255.255.255)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 576
    Identification: 0xe2b6 (58038)
    Flags: 0x00
        0... = Reserved bit: Not set
        .0.. = Don't fragment: Not set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (0x11)
    Header checksum: 0x95f7 (correct)
    Source: 0.0.0.0 (0.0.0.0)
    Destination: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
    Source port: bootpc (68)
    Destination port: bootps (67)
    Length: 556
    Checksum: 0x25d3 (correct)
Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x45809633
    Seconds elapsed: 10
    Bootp flags: 0x0000 (Unicast)
        0... .... .... .... = Broadcast flag: Unicast
        .000 0000 0000 0000 = Reserved flags: 0x0000
    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: 90:12:02:51:58:34 (10.0.3.103)
    Server host name not given
    Boot file name not given
    Magic cookie: (OK)
    Option 53: DHCP Message Type = DHCP Discover
    Option 57: Maximum DHCP Message Size = 548
    Option 51: IP Address Lease Time = infinity
    Option 55: Parameter Request List
        1 = Subnet Mask
        3 = Router
        6 = Domain Name Server
        12 = Host Name
        15 = Domain Name
        17 = Root Path
        23 = Default IP Time-to-Live
        28 = Broadcast Address
        29 = Perform Mask Discovery
        31 = Perform Router Discover
        33 = Static Route
        40 = Network Information Service Domain
        41 = Network Information Service Servers
        42 = Network Time Protocol Servers
    Option 60: Vendor class identifier = "Linux 2.4.26-ltsp-3 i686"
    Option 61: Client identifier
        Hardware type: Ethernet
        Client MAC address: 90:12:02:51:58:34 (10.0.3.103)
    End Option
    Padding

Reply via email to