D-Link Forums

D-Link Wireless Routers for Home and Small Business => Information => Archive => Topic started by: Moogs on December 19, 2011, 07:11:59 PM

Title: Can't change default IP - Error
Post by: Moogs on December 19, 2011, 07:11:59 PM
I don't really understand the error message. I have a bunch of static IPs on cameras and electronics on the 192.168.1.x network so I would simply like to change the router's default IP to 192.168.1.1. I get this error though.

(http://s8.postimage.org/btsohnmg5/Screen_Shot_2011_12_19_at_7_09_24_PM.png)
Title: Re: Can't change default IP - Error
Post by: FurryNutz on December 20, 2011, 11:13:46 AM
Can you enlarge the picture? Can't see anything for this picture.
Title: Re: Can't change default IP - Error
Post by: Moogs on December 21, 2011, 02:34:40 PM
The picture is 800x600 to me.
Title: Re: Can't change default IP - Error
Post by: FurryNutz on December 21, 2011, 06:09:52 PM
Did you change the DHCP server Pool IP address as well?
Title: Re: Can't change default IP - Error
Post by: davi1td on December 23, 2011, 04:33:48 PM
There is no such thing as DHCP server Pool IP address, moogs is right this is a problem!
The DHCP server Pool IP address range has nothing to do with the base LAN IP per se.
Moogs I'll let you know if I can find a workaround ...
Title: Re: Can't change default IP - Error
Post by: FurryNutz on December 23, 2011, 05:54:08 PM
Under Setup/Networking is where you set the routers IP address and can change the routers IP address and DHCP Server Settings pool of addresses as well. The Router Settings and DHCP Server Settings need to be under the same IP address string format, so if you change the routers ip address from 192.168.0.1 to say 192.168.1.1, the DHCP Server Settings pool of addresses from and too need to be under the same string of 192.168.1.# to 192.168.1.###. Also the Subnet Mask addresses will dictate how many IP addresses on the pool you can use.
I use 255.255.255.192 which gives me 50 IP addresses in the pool to use and reserve since I have less then 50 devices on my network. No need to have any thing more then that however default SNM is good too.
Title: Re: Can't change default IP - Error
Post by: davi1td on December 23, 2011, 06:06:46 PM
Not so, if you're actually using this modem the option your referring to is DHCP IP Address Range, which in the case of the dir-645 only let's you set the last octet, i.e 100-199 by default.

So the way to fix this issue is to have the latest firmware 1.0.1 AND then got ot tools/system ->Restore To Factory Default Settings.
Title: Re: Can't change default IP - Error
Post by: FurryNutz on December 23, 2011, 06:11:43 PM
You do understand that this is a router and not a modem correct?

well I have the same amplify class router, DIR-657 and have changed both Router and DHCP server address pool to something other than 192.169.0.1. Mine starts with a 6 actually for the router and DCHP Server pool.

I would presume that there is an issue with how the numbers are being entered in or how they are being saved.
When you change the routers IP address, you have to also change the DHCP Server Pool address right after changing the routers IP address before you select SAVE.
Title: Re: Can't change default IP - Error
Post by: reddragon on December 29, 2011, 01:44:14 PM
Hi,

Was this issue resolved as I have the same exact problem and get the exact same error message.
I want to use the DIR-645 as an access point and need to change the default IP address to 192.168.1.xxx

I already disabled DHCP and in that section one can only change the range (the y's in xxx.xxx.xxx.yyy)

This is silly and should be easy... I'll return it if I can't get this to work and will get a Lynksys or Netgear with default address of 192.168.1.1
Title: Re: Can't change default IP - Error
Post by: FurryNutz on December 30, 2011, 11:43:01 AM
Care to have someone can review your router settings with you using teamviewer. (http://www.teamviewer.com)
Title: Re: Can't change default IP - Error
Post by: Doctor Doom on January 06, 2012, 11:24:42 AM
Anyone wanting to change the LAN subnet from 192.168.0.x to 192.168.1.x, please update the firmware 1.02 and it should correct the issue.

Title: Re: Can't change default IP - Error
Post by: FurryNutz on January 06, 2012, 12:37:58 PM
Follow the FW update sticky process when you do.
Title: Re: Can't change default IP - Error
Post by: lyurk on January 06, 2012, 05:40:00 PM
I am having the same issue. It is good to see that firmware 1.02 will fix the issue. However I only see firmware 1.01 available. Where is 1.02 located?
Title: Re: Can't change default IP - Error
Post by: FurryNutz on January 06, 2012, 06:49:16 PM
ftp://ftp.dlink.com/Gateway/dir645/Beta/Firmware/DIR645A1_FW102B08_BETA.zip

Follow the FW update sticky.
Title: Re: Can't change default IP - Error
Post by: lyurk on January 17, 2012, 07:54:37 PM
I followed the FW firmware sticky and used the beta 1.02 firmware. It still gives me the error when I try to change the default IP to 192.168.1.1 . I can change it to .2.1 or .3.1, etc. but not .1.1 . I also get the same error when I try to change the netmask to 255.255.254.0 . It says the network id of Lan-1 is the same with Lan-2.

I have many items hard coded with IPs in the .1.1 subnet and it would not be easy to change all of them.
Title: Re: Can't change default IP - Error
Post by: FurryNutz on January 17, 2012, 07:58:34 PM
Do you have an ISP modem that uses 1.1 already? Just curious.
I would call up D-Link and talk to Level 2 tech if possible and ask them if there is a problem with using 1.1. It's possible there could be a redesign on this particular IP since other devices like ISP Modems use this and maybe D-Link wanted to avoid having anyone use it. Anything is possible. Doesn't hurt to ask. Let us know what they say.
Title: Solved at last - 192.168.1.1
Post by: firas on January 19, 2012, 06:41:40 PM
In order to modify router's ip, follow below steps in sequence:

1) Disconnect WAN cable coming from the modem to router
2) Reset router (Using a paperclip or pin, push the reset button and hold for 10 seconds then release)
3) Wait 10 seconds then unplug the power from the router for 5 seconds then reconnect power
4) When router gets ready, navigate using your browser to http://192.168.0.1
5) Username is "admin" and by default, there is no password
6) Modify the network ip to 192.168.1.1 and save the setting
7) When the router operates again, go ahead and modify other settings as needed.

... That's it   ::)
Title: Re: Can't change default IP - Error
Post by: FurryNutz on February 09, 2012, 07:04:37 AM
Curious, any resolution on this thread for anyone?  ???
Title: Re: Can't change default IP - Error
Post by: jperkins79 on February 26, 2012, 03:49:09 PM
I am also having this problem, and the link to the beta firmware 1.02 is not working for me.  Can anyone post a link that works?
Title: Re: Can't change default IP - Error
Post by: FurryNutz on February 26, 2012, 05:19:50 PM
Try the link again, you'll need to copy and paste.
Title: Re: Can't change default IP - Error
Post by: jperkins79 on February 26, 2012, 07:48:59 PM
Try the link again, you'll need to copy and paste.

That worked, I wonder if it was because I wasn't registered before.  Well, either that or I guess "user error", hehe.

In any case, the firmware is installed and it fixed my issue.  I was able to change the subnet from 192.168.0.1 to 192.168.1.1 without getting that error message.  Thanks for the help, FurryNutz, and thanks for that write-up on the procedure to install the firmware, very helpful.    :D
Title: Re: Can't change default IP - Error (RESOLVED)
Post by: FurryNutz on February 26, 2012, 07:51:19 PM
Enjoy.  ;D

That worked, I wonder if it was because I wasn't registered before.  Well, either that or I guess "user error", hehe.

In any case, the firmware is installed and it fixed my issue.  I was able to change the subnet from 192.168.0.1 to 192.168.1.1 without getting that error message.  Thanks for the help, FurryNutz, and thanks for that write-up on the procedure to install the firmware, very helpful.    :D
Title: Re: Can't change default IP - Error
Post by: somnar on July 19, 2012, 01:41:52 AM
Hi,
New to the forum, just wondering if this has been resolved or if anyones found a reason whey this is happening as i have the same issue.
My network is 192.168.7.x.
Have even called DLink tech and recieved a RMA to return the router.
Recieved a new router, tried chaning the ip in XP PE, Backtrack but still get the same error.
Reset the router, upgraded the firmware and even tried to change the ip at work as i thought maybe it grabs an ip from my current router but still cant change to 192.168.7.1..
Weird thing is that 192.168.1..6 and 8, 9 work fine, just cant get on 192.168.7.x.thanks
Title: Re: Can't change default IP - Error
Post by: FurryNutz on July 19, 2012, 06:57:06 AM
Have you changed the subnet tried changing the subnet mask to 255.255.255.192 by chance?


What FW version is currently loaded?
What browser are you using? Does IE, Opera or FF do the same thing?

Most users are not changing the main IP address of the router so this issue isn't seen much.
I would presume that if .1.# works and .7.# doesn't, I would use the .1.# format for now.
Title: Re: Can't change default IP - Error
Post by: somnar on July 19, 2012, 03:50:11 PM
Hi FurryNutz,

Thanks for the reply. 

No havent changed the subnet, i'll give it a go tho but dont thing it'll do anything as 192.168.6.x and 192.168.8.x work fine.

The 645 i returned i updated the firmware to 1.02 (i think you posted link earlier in this topic).
Haven't updated the firmware on the current 645.  I've reset it a number of times but jsut doesnt like the .7 range.

I've used IE and FF in xp and FF in backtrack4 and Opera in MiniXP PE.

Yes, i'm thinking i'll have to change my ip's.  guess it's only 3 devices, ipcop, ubuntu-server and printer.

thanks again.


Title: Re: Can't change default IP - Error
Post by: FurryNutz on July 19, 2012, 05:32:39 PM
Ok. Ya I'm using v1.02 and seems to be the best version. I'll check out the IP address string your using soon and check to see if it happens on mine. I presume it might. Try this for a test, take your house address and turn it into an IP address, does it do the same thing?
Title: Re: Can't change default IP - Error
Post by: FurryNutz on October 19, 2012, 07:30:06 AM
I know this has been a while. I wanted to see if there was any status on this. I think this got lost in the maelstrom of postings and it's been brought to my attention that this issue probably has not been resolved.

Has anyone tried to change the default Sub Net Mask to 255.255.255.192 before changing the routers IP address to 192.168.7.0?

I will be checking this on my 645 this weekend.
Title: Re: Can't change default IP - Error
Post by: FurryNutz on October 19, 2012, 04:40:55 PM
Ok so I connected to my DIR-645 using FW v1.02 and found the following error when trying to set a router IP address of 192.168.7.1:
(http://i1195.photobucket.com/albums/aa396/furrynutz740il/DIR-645IP71Error.png)
This error was displayed after I had successfully applied a 192.168.6.1 IP address for the routers LAN IP address.

Network Settings:
(http://i1195.photobucket.com/albums/aa396/furrynutz740il/NetworkSettings.png)

I tried 192.168.1.1, 192.168.2.1, 192.168.6.1, 192.168.8.1, and 192.168.255.1 and they work and do not produce an error:
(http://i1195.photobucket.com/albums/aa396/furrynutz740il/DIR-645using2551IPaddress.png)

Why is only 192.168.7.# seem to product this error.

I connected my DIR-857 using FW v1.02 and changed the routers IP address to 192.168.7.1 and this model router did not produce an error message and after a reboot, this IP address remained and the router was functional.

This test was LAN wired connected to these 2 routers using a Mac Book Pro with OSX v10.8.2 and Safari v6.0.1.
Title: Re: Can't change default IP - Error
Post by: FurryNutz on October 24, 2012, 02:27:51 PM
I'm relaying an excerpt from off forum site contact regarding this problem:

"I received an email from D-link today saying that 192.168.7.X can't be used, because the Dir-645 uses it for it's guest zone function.
Here's my reply to them:
"You sent me an email today stating that the 192.168.7.0 range can not be used because it is already used for the DIR-645 guest zone function. In the same mail I'm asked if I can't change my subnet!

The answer is already in my initial email. There's a dental practice software package installed on 3 PC's which are connected to the database via the fixed ip-address (192.168.7.14). This connection can only be changed when knowing the software manufacturer's password. It would cost me money to have them change the connections to the database!

This is perhaps not a bug, but certainly a DESIGN FLAW or wrong reasoning by the firmware developer. The firmware should be made in such a way that it chooses a free available subnet other then the subnet chosen by the network administrator and not the other way around!

I'm hoping this will be fixed soon in a new firmware version!

Hoping to hear from D-link soon!"

Regards,
Koen

Hi Furry,

I tried activating the guest zone on the DIR-645 and connected to it wirelessly. And indeed, I got an ip-adress in the 192.168.7.X range.

I don't really care if getting the software manufacturer to change the connections would cost a lot or not. It has become a matter of principle to me now! (My network is up and running, remember?) As a customer I may expect to buy a router, change it's ip-address to what I need and be able to use it.

How difficult can it be to program the firmware in such a way that if a customer needs to use the 192.168.7.1 subnet, the firmware will pick an other ip-range?

The help-desk operator I phoned today, was completely on my side. He did not understand that there was nothing in his books/manuals about this and was annoyed that this reply had to come all the way from Taiwan! No body of his colleagues In Europe knew about this. And apparently the USA help-desk doesn't now yet either!

The help-desk guy agreed with me that the error message we got was not clear enough and he agreed that my proposed firmware change sounds very logical indeed.

I'll see what happens next. If the firmware developers are as quick as the forums activation email support team, I'm afraid I'll have to wait for a little while longer! ;-)

Perhaps it would be interesting if you could connect to the guest zone of one of your other routers, see what ip-adress you get and then try to change the router to that ip-address-range. I'm curious to know if that would work.

Your help has been great, the helpdesk guy here in Belgium has been very helpful as well. Now I'm curious to see what will come out of this?

Brgds,
Koen"


Title: Re: Can't change default IP - Error
Post by: FurryNutz on October 24, 2012, 05:10:33 PM
For the record I have tested this on a DIR-857, 657 and a 655 and each one of these routers does not exhibit this problem as the DIR-645 does. I'm able to set a 192.168.7.1 router address and enabling guest zone and connecting a device to the guest zone results in getting a 192.168.7.# address.
Title: I need 192.168.7.* for my network!
Post by: CaptainK on October 26, 2012, 08:36:27 AM
Hehe, I'm happy I was finally able to get registered for this site!
First of all I would like to thank FurryNutz for his help over the last few days.  :) :) :) I was able to contact him via Facebook!

Today I got a call from D-Link support here in Belgium. They proposed to change my dir-645 for a dir-657. After checking out the internet for the 657, I kindly refused their offer. I read some reviews about the 657 that stated that the wireless performance was not very good. It only has two antennas iso 6, it does not have the smartbeam technology and it costs less here in Belgium.

I checked for reviews of the Dir-857. That is praised for it's excellent wlan performance. So I asked if they could have a dir-857 ( I proposed to pay some euro's extra) I also said I was able and willing to wait a few weeks in case they would consider making a new firmware so that I would be able to use the192.168.7.* subnet I need!

Waiting for their reply now!

@lyurk: Have you been able to use 192.168.1.1 yet with FW1.02? It should work! If not, try contacting D-Link support. I'm already using FW1.03 Beta given to me by support. I can set all ip-ranges, except 192.168.7.*

Frankly, I have to admit I was pleasantly surprised by the support I received until now, not only by FurryNutz but also from the Belgian helpdesk!
Title: Re: I need 192.168.7.* for my network!
Post by: FurryNutz on October 26, 2012, 08:59:15 AM
I have had 2 of the 657s and had no wireless problems using it. I have given one of them away as a birthday present this year and the person loves his. I won't discount that maybe other have had some issues with theres however I do believe there are configuration and external environments that could be the root cause. However I will let you know that the 657 has already been phased out, not sure why, so any support and continued development from a FW perspective has been met with an end.

It sounds like they may not fix it right now or even if they do, it would be a while before we saw a new FW version, I don't know what the intentions are for this problem. At least they are wanting to provide you with an alternative which is good. If you can work out a deal with them to the 857, I would go that way since I have confirmed that this 645 problem is not present, at least not on a U.S. based unit. I would ask them before they ship you one, if they would do a final confirmation of that IP address working on a EU unit though. Just be aware that the smart wireless that they have in the 645 is not available on the 857 so placement of the router can be crucial for good WiFi signal. You also will have the 5Ghz radio as well which is good in 2.4Ghz congested wifi areas.


Keep us posted. Glad to be of help.

Hehe, I'm happy I was finally able to get registered for this site!
First of all I would like to thank FurryNutz for his help over the last few days.  :) :) :) I was able to contact him via Facebook!

Today I got a call from D-Link support here in Belgium. They proposed to change my dir-645 for a dir-657. After checking out the internet for the 657, I kindly refused their offer. I read some reviews about the 657 that stated that the wireless performance was not very good. It only has two antennas iso 6, it does not have the smartbeam technology and it costs less here in Belgium.

I checked for reviews of the Dir-857. That is praised for it's excellent wlan performce. So I asked if they could have a dir-857 ( I proposed to pay some euro's extra) I also said I was able and willing to wait a few weeks in case they would consider making a new firmware so that I would be able to use the192.168.7.* subnet I need!

Waiting for their reply now!

@lyurk: Have you been able to use 192.168.1.1 yet with FW1.02? It should work! If not, try contacting D-Link support. I'm already using FW1.03 Beta given to me by support. I can set all ip-ranges, except 192.168.7.*

Frankly, I have to admit by the support I received until now, not only by FurryNutz but also from the Belgian helpdesk!
Title: Re: Can't change default IP - Error
Post by: FurryNutz on October 30, 2012, 07:17:25 PM
So I called about SharePort v4 not working on 645 with USB drive on OSX 10.6 and 10.8. Works connected to a  DIR-857/657 using same devices and SP version. I called and after 53 minutes of going thru 3 people, Kim said he would open a report and should see possible fix in next FW release. I also injected the problem with setting the router to 192.168.7.1 and he said it might be the same for 192.168.7.1 issue. He seemed a bit rushed to end the phone call after trying to figure out that SP was not working at all with current FW on the 645. He said FW might be released this year. Not sure if EU will be included. We can only hope.
Title: Re: I need 192.168.7.* for my network!
Post by: FurryNutz on November 08, 2012, 08:25:35 AM
Hey Captain, what FW version is currently loaded on your 645?

Hehe, I'm happy I was finally able to get registered for this site!
First of all I would like to thank FurryNutz for his help over the last few days.  :) :) :) I was able to contact him via Facebook!

Today I got a call from D-Link support here in Belgium. They proposed to change my dir-645 for a dir-657. After checking out the internet for the 657, I kindly refused their offer. I read some reviews about the 657 that stated that the wireless performance was not very good. It only has two antennas iso 6, it does not have the smartbeam technology and it costs less here in Belgium.

I checked for reviews of the Dir-857. That is praised for it's excellent wlan performance. So I asked if they could have a dir-857 ( I proposed to pay some euro's extra) I also said I was able and willing to wait a few weeks in case they would consider making a new firmware so that I would be able to use the192.168.7.* subnet I need!

Waiting for their reply now!

@lyurk: Have you been able to use 192.168.1.1 yet with FW1.02? It should work! If not, try contacting D-Link support. I'm already using FW1.03 Beta given to me by support. I can set all ip-ranges, except 192.168.7.*

Frankly, I have to admit I was pleasantly surprised by the support I received until now, not only by FurryNutz but also from the Belgian helpdesk!
Title: Re: I need 192.168.7.* for my network!
Post by: CaptainK on November 08, 2012, 01:32:22 PM
Hey Captain, what FW version is currently loaded on your 645?

FW1.03 B08 for worldwide use according to helpdesk operator
Title: Re: Can't change default IP - Error
Post by: FurryNutz on November 08, 2012, 01:46:33 PM
Ok...

I was curious. I hope we do see something come from this. I presume maybe 2-3 months out maybe. Not sure. Thanks for being patient.  ;)
Title: Re: Can't change default IP - Error
Post by: CaptainK on November 16, 2012, 01:59:55 AM
Hi,

D-link support offered me a Dir-657 or 826L in exchange. After reading reviews of these routers I preferred not to accept the offer. I asked if it would be possible to get a dir-857 in exchange. I can understand they were not willing to do that, but they offered to make a refund for my 645. I appreciate the offer, but I will be keeping it after all (I only paid €49,95). I'm sure I'll be able to use it when a friend or family member calls me for help with their network.

Anyway, I'm very happy with the support on this forum and from the belgian helpdesk (thanks Peter) Because of that nothing will be stopping me from buying D-link products again in the future!

I got a linksys E2000 from a colleague who is switching to adsl. This E2000 router also can't be set to the 192.168.33.x-range because it needs it for the guestnetwork. But I can use 192.168.7.1 for my network and it's working nicely. ;)

Case closed for me!

Thanks Furry
Title: Re: Can't change default IP - Error
Post by: FurryNutz on November 16, 2012, 07:00:56 AM
Glad you found a solution.

It does make me wonder if some routers, ones with guest networking built in, if there has to be a specific IP address that is assigned to that zone for a reason and just just dumb luck that you picked the 645 and your specific network client software just happens to use that same address string. I do feel that there should be a bit more flexibility on the SW side to allow you to change some of those network settings to at least avoid something like this. SW should be flexible to allow it's users to work with HW since, more or less, HW doesn't or should have to change much when it's properly configured. Should be left alone after that.

Anyways, glad you got something to work. I think the 645 is a good router. I'm glad I took the time to help you out as much as I can and contacting me also brought to light other issues that I was able to talk with DLink about and hopefully, it will be resolved.

Good luck and come back and visit if you need any help on your Dlink products.

Furry
Title: Re: Can't change default IP - Error
Post by: FurryNutz on January 05, 2013, 10:57:20 AM
For reference, I bought a DIR-865L and it does the same thing. I presume that this is by design on some of the newer routers and the use of 192.168.7.1 can not be used by users as it's being already used by the router and believe Guest Zone WiFi is the owner of it.  ::)
Title: Re: Can't change default IP - Error
Post by: ambercap on January 24, 2013, 02:50:13 AM
A comment on this: I have not enabled my guest zone, but in the config file 192.168.7.0 is already assigned to it. I would guess that editing that subnet in the config file (5 entries to change) and loading the new config would enable one to change the 7 to any subnet one wants (unless the 7 is hard coded into some of the router scripts but I'm guessing not). (Editing the config file is really easy.)
Title: Re: Can't change default IP - Error
Post by: FurryNutz on January 24, 2013, 06:39:24 AM
I has seen that before and figured that in the end, it was by design that the IP address is set for GZ. I notice this on the 865L as well.

Would you share with us on how you can edit the config file correctly to see if we can change that?
Title: Re: Can't change default IP - Error
Post by: ambercap on January 24, 2013, 12:25:28 PM
Well I'd try to just change all 5 occurrences of 192.168.7.x with some other subnet and see if it works. Or are you asking how to edit the binary config.bin file? I work on OSX so all the utilities I need are already there, so I just wrote a simple, quick little script (it should work on any Linux system as well as OSX) to make it easier (most of the code is just to provide the command line options :) ):

dlinkconf.sh:

code:
#!/bin/bash

declare PROG=${0##*/}
declare BIN_FILE=""
declare XML_FILE=""
declare HDR_FILE=""
declare ZIP_FILE=""
declare MAGIC_NUM=""
declare -i PACK=0
declare -i UNPACK=0
declare OP=""

function usage()
{
    cat << EOF
NAME:
    ${PROG} -- Pack/unpack a DLink router config.xml file to/from a config.bin file.

SYNOPSIS:
${PROG} -{m|h|x} <BinFilePath>
${PROG} -p <XmlFilePath> -M <Magicnumber> -H <HeaderFilePath> -b <BinFilePath>

DESCRIPTION:
    Extracts either the magic number, header or embedded xml config file to stdout.
    Compresses a xml file and packs it into a bin file using the supplied magic number
    and header.

OPTIONS:

    Extract:

        -m <BinFilePath>

            Extract magic number from bin file.
            Example: '-m config.bin'
                     Will output the 32-bit magic number in hexadecimal.
    
        -h <BinFilePath>

            Extract header from bin file.
            Example: '-h config.bin > header.txt'
                     Will output the header, converting nulls to newlines.

        -x <BinFilePath>

            Extract xml from bin file.
            Example: '-x config.bin > config.xml'
                     Will decompress and output the embedded gzip archive.

    Pack:

        -p <XmlFilePath>

            Gzip and pack the xml file using the supplied magic number and header.

        -M <MagicNumber>

            The magic number to use for the bin file.

        -H <HeaderFilePath>

            Path to the header file to insert into the bin file

        -b <BinFilePath>

            Path to the bin file to create.

            Example: '-p config.xml -M 5ea3a417 -H header.txt -b config.bin'
                     Will create config.gz and pack it into config.bin.

EOF
}

function get_magic()
{
    xxd -l 4 -p ${BIN_FILE}
}

function get_hdr()
{
    local -i hdr_len=$((0x$(xxd -s 4 -l 4 -p ${BIN_FILE})))
    dd ibs=1 skip=28 count=${hdr_len} if=${BIN_FILE} 2>/dev/null | tr '\0' '\n'
}

function get_xml()
{
    local -i hdr_len=$((0x$(xxd -s 4 -l 4 -p ${BIN_FILE})))
    local -i z_off=28+${hdr_len}
    dd ibs=1 skip=${z_off} if=${BIN_FILE} 2>/dev/null | zcat
}

function pack_xml()
{
    ZIP_FILE="${XML_FILE}.gz"

    local -i hdr_len=$(ls -nld "${HDR_FILE}" | awk '{print $5}')
    local hdr_lenx=$(printf "%08x" ${hdr_len})
    echo "Hdr size: $hdr_len (0x$hdr_lenx)"

    echo "Creating $ZIP_FILE..."
    cat ${XML_FILE} | gzip -c > ${ZIP_FILE}
    local -i zip_len=$(ls -nld "${ZIP_FILE}" | awk '{print $5}')
    local zip_lenx=$(printf "%08x" ${zip_len})
    echo "Zip size: $zip_len (0x$zip_lenx)"
    local crc=$(md5 -q ${ZIP_FILE}) # crc=$(openssl dgst ${ZIP_FILE} | awk {'print $2'})
    echo "Zip MD5:  $crc"

    echo "Creating $BIN_FILE..."
    echo "0: $MAGIC_NUM" | xxd -r > ${BIN_FILE}
    echo "4: $hdr_lenx" | xxd -r - ${BIN_FILE}
    echo "8: $zip_lenx" | xxd -r - ${BIN_FILE}
    echo "C: $crc" | xxd -r - ${BIN_FILE}
    cat ${HDR_FILE} | tr '\n' '\0' | dd ibs=4 2>/dev/null >> ${BIN_FILE} #conv=sync
    cat ${ZIP_FILE} >> ${BIN_FILE}
}

# Main

while getopts :m:h:x:p:M:H:b: option; do
    case ${option} in
        m)
            UNPACK=1
            OP=${option}
            BIN_FILE="$OPTARG"
            ;;
        h)
            UNPACK=1
            OP=${option}
            BIN_FILE="$OPTARG"
            ;;
        x)
            UNPACK=1
            OP=${option}
            BIN_FILE="$OPTARG"
            ;;
        p)
            PACK=1
            XML_FILE="$OPTARG"
            ;;
        M) MAGIC_NUM="$OPTARG" ;;
        H) HDR_FILE="$OPTARG" ;;
        b) BIN_FILE="$OPTARG" ;;
    esac
done

if [ $UNPACK == 1 ]; then
    if [ -z "$BIN_FILE" ]; then
        echo "Error: You must specify the bin file."
        usage
        exit 1
    fi
    case ${OP} in
        m) get_magic ;;
        h) get_hdr ;;
        x) get_xml ;;
    esac
    exit 0
elif [ $PACK == 1 ]; then
    if [ -z "$XML_FILE" ]; then
        echo "Error: You must specify the xml file."
        usage
        exit 1
    fi
    if [ -z "$MAGIC_NUM" ]; then
        echo "Error: You must specify the magic number."
        usage
        exit 1
    fi
        if [ -z "$HDR_FILE" ]; then
        echo "Error: You must specify the header file."
        usage
        exit 1
    fi
    if [ -z "$BIN_FILE" ]; then
        echo "Error: You must specify the bin file."
        usage
        exit 1
    fi
    pack_xml
    exit 0
fi
usage
exit 1

/end code
Title: Re: Can't change default IP - Error
Post by: FurryNutz on February 04, 2013, 11:34:20 AM
I'd need step by step instructions, hehe. I would like to try it.

The only reason why this came up is that one is that CaptainK happend to need this router to be placed at this address as the database Mfr they use, happen to use this IP address pool for there SW. He said they might change it that the cost of money and that was not a good option for him.

I noticed that the DIR-865L is using 7.1 as well so I presume that D-Link is now probably using this as a standard for some of there newer model routers.  So we'll just have to tell users that this address string is already in use by D-Link and you'll need use something else unless you want to try and modify the FW. Which probably isn't a good idea for the avg user. ::)
Title: Re: Can't change default IP - Error
Post by: ambercap on February 04, 2013, 01:00:09 PM
My script should be updated since the magic number is ALWAYS 5ea3a417.

Anyhow, just copy and paste the above script into a file such as dlinkcfg.sh. Then assuming you are using OSX on an iMac, start Terminal (Applications, Utilities, Terminal). (It will work on Ubuntu/CentOS ... too.)
Flag the file as executable:
 chmod +x dlinkcfg.sh
or:  chmod 755 dlinkcfg.sh

Then enter:
 ./dlinkcfg.sh
to display usage.

Extract the header by typing:
 ./dlinkcfg.sh -h config.bin > header.txt

Extract the config xml file with:
 ./dlinkcfg.sh -x config.bin > config.xml

Then edit the xml file with any editor you like. I think there were 4 occurrences of 192.168.7.something. I'd try changing them all to say 192.168.8.something.

Then repack the file as follows:
 ./dlinkcfg.sh -p config.xml -M 5ea3a417 -H header.txt -b newconfig.bin

Then upload the new config. As simple as that.

Note on my installation of CentOS, for some reason the md5 alias is missing even though it is in the manual. If this is the case just replace in dlinkcfg.sh:
  crc=$(md5 -q ${ZIP_FILE})
with:
  crc=$(openssl dgst ${ZIP_FILE} | awk {'print $2'})

You'll see this already there but commented out.

All the commands used like dd, md5 (openssl), xxd... should already be installed by default.
Title: Re: Can't change default IP - Error
Post by: FurryNutz on February 04, 2013, 01:10:14 PM
Awesome, I might try this, yes I use OSX.

I'll give this a go when i get home and check it out.

Thank you for sharing.