Another problem when trying to reproduce bug 662254. My DHCP server is dhcp-4.2.4-9.P1.fc17.x86_64 and is configured as follows: # cat /etc/dhcp/dhcpd.conf option domain-name "example.org"; option domain-name-servers 8.8.8.8; default-lease-time infinite; min-lease-time infinite; max-lease-time infinite; option dhcp-rebinding-time 0xffffffff; option dhcp-renewal-time 0xffffffff; subnet 192.168.25.0 netmask 255.255.255.0 { range 192.168.25.10 192.168.25.20; option routers 192.168.25.1; } My DHCP client is dhclient-4.2.4-2.fc17.x86_64 and has no explicit configuration. I am careful to remove the lease files on both sides and to avoid other processes getting in (checking the logs). 13:10:07.273822 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 52:54:00:eb:e9:fb, length 300, xid 0xaa8a8a3e, Flags [none] (0x0000) Client-Ethernet-Address 52:54:00:eb:e9:fb Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 13: Subnet-Mask, BR, Time-Zone, Classless-Static-Route Domain-Name, Domain-Name-Server, Hostname, YD YS, NTP, MTU, Option 119 Default-Gateway 13:10:08.277445 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328) 192.168.25.1.bootps > 192.168.25.10.bootpc: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xaa8a8a3e, Flags [none] (0x0000) Your-IP 192.168.25.10 Client-Ethernet-Address 52:54:00:eb:e9:fb Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 192.168.25.1 Lease-Time Option 51, length 4: 4294967295 Subnet-Mask Option 1, length 4: 255.255.255.0 Domain-Name Option 15, length 11: "example.org" Domain-Name-Server Option 6, length 4: 8.8.8.8 Default-Gateway Option 3, length 4: 192.168.25.1 13:10:08.277816 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 52:54:00:eb:e9:fb, length 300, xid 0xaa8a8a3e, Flags [none] (0x0000) Client-Ethernet-Address 52:54:00:eb:e9:fb Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Request Server-ID Option 54, length 4: 192.168.25.1 Requested-IP Option 50, length 4: 192.168.25.10 Parameter-Request Option 55, length 13: Subnet-Mask, BR, Time-Zone, Classless-Static-Route Domain-Name, Domain-Name-Server, Hostname, YD YS, NTP, MTU, Option 119 Default-Gateway 13:10:08.407962 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328) 192.168.25.1.bootps > 192.168.25.10.bootpc: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xaa8a8a3e, Flags [none] (0x0000) Your-IP 192.168.25.10 Client-Ethernet-Address 52:54:00:eb:e9:fb Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: ACK Server-ID Option 54, length 4: 192.168.25.1 Lease-Time Option 51, length 4: 4294967295 Subnet-Mask Option 1, length 4: 255.255.255.0 Domain-Name Option 15, length 11: "example.org" Domain-Name-Server Option 6, length 4: 8.8.8.8 Default-Gateway Option 3, length 4: 192.168.25.1 As you can see, tcpdump-4.2.1-3.fc17.x86_64 doesn't show dhcp-rebinding-time nor dhcp-renewal-time. The resulting dhclient lease file looks like this: lease { interface "eth1"; fixed-address 192.168.25.10; option subnet-mask 255.255.255.0; option routers 192.168.25.1; option dhcp-lease-time 4294967295; option dhcp-message-type 5; option domain-name-servers 8.8.8.8; option dhcp-server-identifier 192.168.25.1; option domain-name "example.org"; renew 3 2080/08/14 14:24:16; rebind 3 2131/08/29 22:49:45; expire 1 2148/09/02 17:38:23; } The dhcp-renewal-time is different from the one reported in bug 662254. What's wrong?
See the patch in bug #662254, comment #24. The configured renewal-time and rebinding-time need to be *less* then the offered lease time otherwise it's not sent at all (because it doesn't make sense). So option dhcp-renewal-time 0xfffffffe; option dhcp-rebinding-time 0xfffffffe; should solve it. But I wanted them to be exactly 0xffffffff (infinite) to reproduce the same values as in packet dump in bug #662254, comment #22 so I also used the above mentioned patch.
Thanks a lot! Then please treat this bugreport as a report about *silently* ignoring stuff in dhcp. It would be nice if it at least logged some information about ignored values and the reason.
From dhcp-options(5): option dhcp-rebinding-time uint32; This option is user configurable, but it will be ignored if the value is greater than the lease time. option dhcp-renewal-time uint32; This option is user configurable, but it will be ignored if the value is greater than the rebinding time, or lease time. -- But it should probably say "greater or equal" instead of just "greater", right ?
Yes, it should say 'greater or equal', or even better 'not smaller' which allows for mor rewording. Like "it must be smaller than lease time, otherwise it is ignored". But I believe that *no* incorrect values should be ignored without dropping a single line to the log. Something like... "warning: ignoring dhcp-rebinding-time; it must be smaller than lease time" Maybe I'm way too picky, so please just do want you think is best.
> option dhcp-renewal-time uint32; > This option is user configurable, but it will be ignored if the value is > greater than the rebinding time, or lease time. This also should be 'not less than'. Finally partially reproduced the server side: min-lease-time infinite; max-lease-time infinite; option dhcp-rebinding-time 0xfffffffe; option dhcp-renewal-time 0xfffffffd; So that: renewal time < rebinding time < lease time
Whith this configuration, I'm getting: lease { interface "eth1"; fixed-address 192.168.25.10; option subnet-mask 255.255.255.0; option routers 192.168.25.1; option dhcp-lease-time 4294967295; option dhcp-message-type 5; option domain-name-servers 8.8.8.8; option dhcp-server-identifier 192.168.25.1; option dhcp-renewal-time 4294967293; option dhcp-rebinding-time 4294967294; option domain-name "example.org"; renew 4 2148/09/05 22:45:47; rebind 4 2148/09/05 22:45:48; expire 4 2148/09/05 22:45:49; } Which looks much better (see renew) but dhclient configures the ip address, surprisingly. But it exits with return value 1. Reproduced. Thanks for all your help. Now I'm happy and the only thing this bugreport is about is the logging and the documentation.
Created attachment 601702 [details] I've just sent this patch upstream [ISC-Bugs #30471]
Response from upstream: I've updated the text to add "or equal to" Adding a log entry is a possibility for the future. committed to HEAD 4.2 => 4.2.5 first