Tuesday, October 30, 2007

DHCP infinite lease

Found something interesting , This happened with Many major DOCSIS 2.0 cable modem brands. The problems is if you set the DHCP lease time to infinite – that is the 32-bits in the DHCP header (option-51) that defines the DHCP lease time is set to

FF FF FF FF

if it is set to the maximum value , the cable modem will fail to register with the CMTS , the maximum value you can use is 7F FF FF FF , yha the most significant bit is made zero ,

0111

1111

1111

1111

1111

1111

1111

1111

7

F

F

F

F

F

F

F

I used the DHCP-turbo server where there is an option to set an infinite lease .

DHCP infinite lease ,

I wrote a small MATLAB code to calculate how many Days , hours , minutes and seconds is 7F FF FF FF

--------------------------------------------

format long

x=hex2dec('7fffffff');

days = fix(x/(3600*24))

y = x - days*3600*24;

hours = fix(y/3600)

z = y - hours*3600;

minutes = fix(z/60)

seconds = z - minutes*60

---------------------------------------------

answer :

>> dhcplease

days = 24855

hours = 3

minutes = 14

seconds = 7

Post a Comment