Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to reserve an IP address for my desktop PC in a DIR-825 and when I type in all the details and press the Save button it tells me that the MAC address is invalid.

My MAC address looks something like 1C:BD:B9:xx:xx:xx.

invalid mac address

I can add and save other MAC addresses from my other networked devices, but not this one. So I tried changing the format to include dashes instead of semi colons but it still said invalid. Then I noticed that most of my other stuff have a MAC address that starts with 00, so I tried changing the 01 into 00 and it was accepted.

Yes, the MAC address was accepted and it was very cute, but of course this is the wrong MAC address. Why will it accept the address if it begins with 00 but not if it begins with 01?

(Interestingly: The first 3 bytes, including the offending part, belongs to D-link)

I flashed the FW twice, from 2.01EU to 2.01EU and then upgrade to 2.06EU, but it didn't solve the problem and the router still remembers the old settings even though they are not presented in the interface.

After flashing the router with arbitrary FW the web interface appears empty, but the router acts like it still had the same configuration, even though the instructions said that a flashing procedure will erase my settings and data.

Even when I reset to factory defaults, it still remembered the settings.

factory defaults

So I ended up doing the "30/30/30 procedure" where you hold the RESET button for 30 seconds while cycling the power off and on again. This brings up the "Firmware Update System". I pick my FW file and send it to the router for flashing.

The flashing completed and the settings were finally all gone, and I was able to start creating new settings one step at a time. Then I came to the IP reservation list and I am stuck again.

  1. Why is this happening, why is it not accepting the MAC address? Is there an explanation to it?

  2. How do I force it to accept the darn address?

Update:

There is supposed to be a hack for this problem where you overwrite a function called check_mac with one of the following codes on the client side.

Code 1:
javascript:alert(check_mac=function (){return true;});

Code 2:
javascript:(function(){ window['check_mac'] = function() { return true; } })();

I tried both of these but it didn't work. How do you execute this code anyway? Is it enough just to type it in and hit Enter from the browser?

Source:

I asked D-Link about this and they sent me some Beta FW version 2.08EU, beta 4 I think. And they haven't even released an official final version of 2.06EU, not to my knowledge. This one is offered through the router itself, but is not available for download from any of the many localized D-Link websites, or from their global corporate website. And yet they are working on 2.08?? Doesn't make sense...

Here is an excerpt of the source code for the MAC reservation function.

function save_reserved(){
    var index = 0;
    var ip = get_by_id("lan_ipaddr").value;
    var mask = get_by_id("lan_netmask").value;
    var reserved_name = get_by_id("reserved_name").value;
    var reserved_ip = get_by_id("reserved_ip").value;
    var reserved_mac = get_by_id("reserved_mac").value;
    var start_ip = get_by_id("dhcpd_start").value;
    var end_ip = get_by_id("dhcpd_end").value;

    var ip_addr_msg = replace_msg(all_ip_addr_msg,_ipaddr);
    var Res_ip_addr_msg = replace_msg(all_ip_addr_msg,"Reservation IP");
    var start_ip_addr_msg = replace_msg(all_ip_addr_msg,"Start IP address");
    var end_ip_addr_msg = replace_msg(all_ip_addr_msg,"End IP address");

    var temp_ip_obj = new addr_obj(ip.split("."), ip_addr_msg, false, false);
    var temp_mask_obj = new addr_obj(mask.split("."), subnet_mask_msg, false, false);
    var temp_res_ip_obj = new addr_obj(reserved_ip.split("."), Res_ip_addr_msg, false, false);
    var start_obj = new addr_obj(start_ip.split("."), start_ip_addr_msg, false, false);
    var end_obj = new addr_obj(end_ip.split("."), end_ip_addr_msg, false, false);

    if(reserved_name == ""){
        alert(GW_INET_ACL_NAME_INVALID);
        return false;
    }else if(!check_LAN_ip(temp_ip_obj.addr, temp_res_ip_obj.addr, TEXT033)){
        return false;
    }else if(!check_address(temp_res_ip_obj, temp_mask_obj, temp_ip_obj)){
        return false;
    }else if (!check_domain(temp_res_ip_obj, temp_mask_obj, temp_ip_obj)){
        alert(TEXT033+" " + reserved_ip + " "+GW_DHCP_SERVER_RESERVED_IP_IN_POOL_INVALID_a);

        return false;
    }else if (!check_mac(reserved_mac)){
        alert(KR3);
        return false;
    }

    if (check_resip_order(temp_res_ip_obj,start_obj, end_obj)){
            alert(TEXT033+" " + reserved_ip + " "+GW_DHCP_SERVER_RESERVED_IP_IN_POOL_INVALID_a);
            return false;
        }
    //check same ip/mac start   
        var index = parseInt(get_by_id("edit").value);
        var edit_tmp = get_by_id("edit").value;
        for(m = 1; m < DataArray.length; m++){
                        if (m==index){
                 continue;
                }else{
                if(get_by_id("reserved_name").value.length > 0){
                    if((get_by_id("reserved_name").value == DataArray[m].Name)){
                        alert(sp_name+" ("+ get_by_id("reserved_name").value +") "+sp_alreadyused); 
                        return false;
                    }
                }
                if(reserved_ip.length > 0){
                    if((reserved_ip == DataArray[m].IP)){
                    alert(TEXT033+" ("+ reserved_ip +") "+sp_alreadyused);  
                        return false;
                    }
                }
                if(reserved_mac.length > 0){
                    if((reserved_mac == DataArray[m].MAC)){
                        alert(GW_DHCP_SERVER_RESERVED_MAC_UNIQUENESS_INVALID_a+" "+ reserved_mac +" "+GW_DHCP_SERVER_RESERVED_MAC_UNIQUENESS_INVALID_b);
                        return false;
                    }
                }

    }
        }
    //check same ip/mac end

    update_DataArray();

    var is_enable = "";
    if(get_by_id("edit").value == "-1"){     //add
        var i = get_by_id("max_row").value;
        var tb1 = get_by_id("table1"); 
        var oTr = tb1.insertRow(-1);
        var oTd1 = oTr.insertCell(-1);
        var oTd2 = oTr.insertCell(-1);
        var oTd3 = oTr.insertCell(-1);
        var oTd4 = oTr.insertCell(-1);
        var oTd5 = oTr.insertCell(-1);
        var oTd6 = oTr.insertCell(-1);

        if(parseInt(DataArray[i].Enable)){
            is_enable = "checked";
        }else{
            is_enable = "";
        }
        oTd1.innerHTML = "<center><input type=checkbox id=r_enable" + i + " name=r_enable" + i + " onClick='set_reserved_enable(" + i + ")' " + is_enable + "></center>"
        oTd2.innerHTML = "<center>" + DataArray[i].Name +"</center>"
        oTd3.innerHTML = "<center>" + DataArray[i].MAC +"</center>"
        oTd4.innerHTML = "<center>" + DataArray[i].IP +"</center>"
        oTd5.innerHTML = '<center><a href=javascript:edit_row('+ i +')\><img src=edit.jpg border=0 alt='+_edit+'></a></center>';
        oTd6.innerHTML = '<center><a href=javascript:del_row('+ i +')\><img src=delete.jpg  border=0 alt='+_delete+'></a></center>';
    }else{                                      //update        
        var i = parseInt(get_by_id("edit").value);
        if(parseInt(DataArray[i].Enable)){
            is_enable = "checked";
        }else{
            is_enable = "";
        }
        get_by_id("table1").rows[i].cells[0].innerHTML = "<center><input type=checkbox id=r_enable" + i + " name=r_enable" + i + " onClick='set_reserved_enable(" + i + ")' " + is_enable + "></center>"
        get_by_id("table1").rows[i].cells[1].innerHTML = "<center>" + DataArray[i].Name +"</center>"
        get_by_id("table1").rows[i].cells[2].innerHTML = "<center>" + DataArray[i].MAC +"</center>"
        get_by_id("table1").rows[i].cells[3].innerHTML = "<center>" + DataArray[i].IP +"</center>"
        get_by_id("table1").rows[i].cells[4].innerHTML = '<center><a href=javascript:edit_row('+ i +')\><img src=edit.jpg border=0 alt='+_edit+'></a></center>';
        get_by_id("table1").rows[i].cells[5].innerHTML = '<center><a href=javascript:del_row('+ i +')\><img src=delete.jpg  border=0 alt='+_delete+'></a></center>';
    }
    clear_reserved();
}
share|improve this question
    
Question: You say it started with 01 and you changed it to 00, but the MAC address you posted starts with 1C. Which is it? –  cpast Jan 7 '13 at 3:25
    
Check the output of ipconfig /all (for Windows) or ifconfig -a (for Linux) for the machine you are trying to set up. Does the Hardware MAC address match what you are trying to input into your router? –  Tog Jan 7 '13 at 8:02
    
@cpast That was an error. Yes, the address starts with 1C and it was accepted when I changed these first two digits to 00. So it's not 01 to 00 but 1C to 00. It doesn't matter now that the post has been edited though. –  sammyg Jan 8 '13 at 13:14
    
@Tog Yes, I know the MAC address is correctly typed in. I type in what it says on the label of the WLAN adapter. And this is the same address as shown when I do the ipconfig /all command. –  sammyg Jan 8 '13 at 13:19
    
Seems unlikely as you've managed to enter other MAC's successfully, but have you tried entering it without any separators? So 1cbdb9... and no : or -s. –  Graham Wager Jan 8 '13 at 14:00

3 Answers 3

I have another solution: If you don't want to install a beta firmware on your DIR-825, I have a solution for you. I have done this on my DIR-825 rev. B EU model running firmware version: 2.01EU , Fri, 22, May, 2009.

  1. Open Google Chrome
  2. Log in to the DIR-825 as admin.
  3. Go to Network Settings.
  4. Hit Reserve and change the Computer Name if needed.
  5. Hit F12 and a prompt in Chrome will open.
  6. In the Console tab (properly the one opened as default) paste the following and hit the ENTER key on your keyboard:

    check_mac = function check_mac(mac){ var error = true; return error; };

  7. Now hit F12 again.

  8. On the Network Settings site hit the Save button and woila you have reserved your device.

A little background information: Because the validation is done in JavaScript that runs locally in your browser, we have the ability to change the code. In this case we modified a JavaScript function.

share|improve this answer

Problem solved! I flashed it with 2.08EU beta 4. This solved the issue I had with a certain MAC addresses being "invalid". It did not solve the initial problem though, and it also introduced other problems as well. I am not surprised by this fact at this point, having used this device for over 2 years now, along with other D-Link devices.

It's always like that, I set out to solve a minor problem and end up spending my evenings and weekends flashing and generally hacking the device to make things work. Things have been running smoothly for a long time but this router in particular has been acting up very much lately. As if it got a mind of its own. It's a never ending maze.

So here's solution to MAC "invalid" issue.

  1. Download 2.08EU beta 4 from D-Link (remark 1, remark 2).

  2. Unpack the binary file (remark 2).

  3. Connect the computer (remark 2).

  4. Set the computer to a static IP (remark 3).

  5. Open up a web browser.

  6. Go to the router and do the 30/30/30 procedure (remark 4).

  7. Go to the computer and go to 192.168.0.1 in the browser. You will see a "d-link firmware upgrade system" page. Pick your new binary file (remark 5).

  8. Click the Send button ONCE and wait for at least 5 minutes (remark 6).

  9. Now open a new tab in the browser or open a new browser window and go to 192.168.0.1 and you should see the regular web interface.

I have made some remarks about these steps. You don't have to read them if you know what you're doing.

REMARK START

Remark 1: The file name is DIR825B1_FW208EUb04_beta.zip. This file is not publicly available yet. So call them or e-mail them and ask for it. Note that this file is for European versions of DIR-825 only with HW revision B1.

Remark 2: If necessary, transfer the file to a computer that you plan to use for the flashing operation. If you have a working Internet connection at that computer then you can download the file to that computer directly, at step one. If not, then you will have to download the file with a computer that has Internet access, and then transfer the file somehow to a second computer that you will be using for the flashing operation. Note that the computer you use for flashing will need to have a wired connection! No wireless! This is why I am telling you this. You could share a folder with the second computer and transfer the file that way, or you could just use a USB drive or another media.

Remark 3: Use 192.168.0.100 for IP (or whatever is allowed by the IP range in your settings), set subnet mask to 255.255.255.0 and default gateway to 192.168.0.1 (or whatever your router IP address is).

Remark 4: You will know you are in the correct mode by the orange flashing power indicator. This is just to make sure that ALL of the old junk like settings etc. are COMPLETELY erased from the memory. Because, as I have already explained once, this device remembers the settings it had before, even after presumably performing a "factory reset". So clicking on Restore Factory Default in the web interface will not be of any help, and neither will it help to just press the RESET button once on the device. It's faulty by design, those are just gimmicks, it doesn't do anything actually, like if there is no real communication between the front end (interface) and the back end (machine). All it does is remove the password (in case you forgot yours) and removes your settings from view (but they are in fact still programmed in the device). So you better do the 30/30/30 procedure really.

Remark 5: The file name should be DIR825B1_FW208EUb04_beta.bin.

The device will be flashed with the new FW and completely reprogrammed with default settings. Note that you will not achieve this if you decide to go through the regular web interface of the router! You will know that the operation was performed successfully by the fact that your power indicator will be lit up blue, along with the other indicators.

Remark 6: It's common sense not to refresh the page you were viewing earlier when performing this kind of operation.

REMARK END

I think this FW was released in April 2012. That's what the date was set to anyway. And I just discovered that I can't set the year to 2013! The years menu only goes from 2002 to 2012. This is a very amusing "problem". Thanks D-Link! Nice surprise for the new year.

years menu

This is a minor problem really. But it's nice to be able to set the correct date and time, especially if you like to check your logs, or even more if you are sending the logs to syslog server or anything of that nature.

But there is another, more daunting problem with this FW. Changing the password for the WIFI is not possible. I change the password and click the save button, the 15 second wait dialog appears, pretending to be saving, and when I log in again I see by the length of the password that the changes had not been applied!

Here below you will see the password field for the 2.4 GHz band.

change password for wifi on 2.4 GHz

The default password is 64 digits long. I don't like typing in a password that long. So what I like to do is short down the default password from 64 digits to 16 digits. And here is what that should look like.

change password for wifi on 2.4 GHz with 16 digit password

You can see that the length of the password is shorter here. But when I click the save button and then log in and go to the same page again the field shows 64 digits again. Which explains why I can't connect with my newly saved password. Because it wasn't really saved at all.

I tried reusing my old 16 digit password here. But it doesn't matter even if I use the default password of 64 digits, I still can't short it down to 16 digits, or change it to any arbitrary password. I can change it, and click the save button, but it reverts back to what it was before. So I don't really change it.

So here's a solution for that.

  1. Go to Setup, Wireless Settings, and click on the Wireless Network Setup Wizard button.

  2. Choose "Manually assign a network key" and click Next.

  3. Type in your password for 2.4 and 5 GHz band respectively and click Next.

  4. Note down the new password and click Save.

This is what it should look like:

wireless network setup wizard

This is the only page/dialog where you can change your password for the WIFI. But you don't have to set it manually. You can let the router generate the password by choosing "Automatically assign a network key for both 2.4GHz and 5GHz band" at step two above. But then you will have to remember (if you can) or note down all 64 digits of it, and you would have to type that in for every WIFI client.

Except for this malfunction and the lack of the year 2013 in the settings, this FW seems to be stable. I will use it for some time and see how it works. I have set the date to 31 December 2012. I'll see what happens after that. Will it go back to 2002? Like some Y2K bug or something? It's amazing how they forgot to put in the option for year 2013 while they were working with this FW in year 2012, which was the previous year and not some distant year several decades ago.

share|improve this answer
    
I don't know if I am allowed to publish this link, but for the convenience of all D-Link users, here is the download link for the 2.08EU FW for DIR-825: dlinktemp:dlinktemp@194.117.170.198/Router/DIR-825/… Remember, this is a temporary link, so it may be taken down very soon. –  sammyg Jan 8 '13 at 21:39

Why will it accept the address if it begins with 00 but not if it begins with 01?

Because addresses have an odd number in that position are reserved for multicast. As the error message says, 01 is invalid. Your computer shouldn't have a MAC address like that in the first place.

From Wikipedia:

If the least significant bit of the most significant octet of an address is set to 0 (zero), the frame is meant to reach only one receiving NIC.[5] This type of transmission is called unicast. A unicast frame is transmitted to all nodes within the collision domain, which typically ends at the nearest network switch or router. Only the node with the matching hardware MAC address will accept the frame; network frames with non-matching MAC-addresses are ignored, unless the device is in promiscuous mode.

If the least significant bit of the most significant address octet is set to 1, the frame will still be sent only once; however, NICs will choose to accept it based on different criteria than a matching MAC address: for example, based on a configurable list of accepted multicast MAC addresses. This is called multicast addressing.

I know there's some confusing stuff in there about least vs most significant bits, but if you take the following address:

01:23:45:67:89:AB

It's referring to the item in the first position: 01. This item must even, or it the address is reserved for multicast use and not valid.

Normally, the MAC address of a device is built into the hardware. However, some devices, special software, or driver utilities may allow you to change this address. If you set this mac address on your computer yourself, you should change your computer's mac address to something valid. If your computer/network card came this way, contact the seller because this is a defect and if you have any warranty at all they should fix or replace the network card. I would do this even if you find an easy work-around, because a defect here is likely indicative of other problems.

share|improve this answer

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.