• October 20, 2019, 09:11:09 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  


This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: DHCP Reservations page problems  (Read 3698 times)


  • Level 1 Member
  • *
  • Posts: 6
DHCP Reservations page problems
« on: February 22, 2011, 11:56:50 AM »

I just ran into this problem with my DIR-130. The 'Network Settings' page that contains the DHCP server settings and the reservations list has some very poorly coded and completely untested javascript in it.

Problem 1:
DHCP range incorrectly tested.

When the DHCP server settings has a starting range of xx.xx.xx.2 to xx.xx.xx.100, you will ALWAYS get an error message stating that the DHCP reservation is NOT within the DHCP server's range.

This is because the javascript in "/cgi/ssi/lan.asp" that provides the network settings page does a test on the ALPHANUMERIC values of the 4th octet, not the NUMERIC value of the 4th octet. An alphanumeric test checks the ASCII values of each character in the variable until one is either greater to or less than the other. In this case, it sees "2" as the start, "1" as the end and nothing will ever match.

The only way to get it to work at all is to always make the first character of the starting range be less than the first character of the ending range.

So a range of to will never allow any DHCP reservation, whereas a range of to will allow DHCP reservations as long as the first character of the 4th octet starts with something greater than 1 and less than or equal to 9

This creates some strange situations, example:
With a range of   Start:    End:

Allows:     to
Blocks:    to
Allows:    to
Blocks:  to
Allows:  to

Problem 2:
As already posted, the MAC address, for whatever reason, MUST have a "00" as the first octet. This however appears to be a designed-in constraint as opposed to sloppy coding as the first problem above is.

Javascipt from /cgi/ssi/lan.asp:

if( tmp_mac[0] != "00"{
 alert("The first mac value must be 00.");
 return false;

It FORCES the first octet to always be "00".

DLINK: The latest firmware for this router is now 3 years old. Are you ever going to fix it???

I like DLINK products very much.. I have many pieces of DLINK equipment in my office and home, but this is just unfathomable. I was forced to go buy a competitors product even though I didn't want to.
« Last Edit: February 23, 2011, 09:45:15 AM by Baratong »


  • Level 1 Member
  • *
  • Posts: 5
Re: DHCP Reservations page problems
« Reply #1 on: March 26, 2011, 02:20:28 PM »

I agree I just bought the dir-130 and it still isn't fixed, at least you could provide fix on web site.
Also send your programmers off to school to learn how to code before you let release production code.