Something changing IP default gateway

Discussion in 'Hardware' started by kickshaws, Jun 19, 2011.

  1. kickshaws

    kickshaws Private E-2

    I have a D-Link router. Recently it has taken to disconnecting for no apparent reason which made me wonder if I needed a new one. Before binning it I looked at the settings and noticed the 'default gateway' had been changed - and not by me! I changed it back to where it had originally been set and all seemed well. But every time I boot it reverts to the altered - and seemingly incorrect - IP address. Any ideas what is doing this? and how to stop it? Could it be malware or something? [I have AVG running all the time.]

    Thanks for any help/advice.
     
  2. Tueur

    Tueur Sergeant Major

    Where are you getting your IP information from and is it the IP of your computer or your Default Gateway that is changing?

    If you are getting it from the TCP/IP settings under network settings then the router it self is probably fine but the IP that your PC is trying to address is wrong so the traffic is not making it as far as the router.

    Are you using DHCP or fixed IP and are you accessing using wireless or wired connection?
     
  3. kickshaws

    kickshaws Private E-2

    Thanks for the reply Tueur.

    IP info from the D-Link interface accessed via browser. The IP that is changing is the Default Gateway. The Computer IP address remains unchanged.

    I've looked at those settings and the Default Gateway showing there is almost the same as the computer's IP address; last digits in the entries differ by 1.

    I believe it is a fixed IP although from the network settings it says "address type: Assigned by DHCP."

    I'm afraid I'm floundering here a bit as I am confused by all the different info, IP addresses, life and more!
     
  4. Tueur

    Tueur Sergeant Major

    Ok, First of I should point out that I am not a networking expert but I do know a bit. If there are any mods listening in it may be prudent to move this to the networking area as I think this is a config issue as opposed to hardware.

    Firstly, it would be helpful if you could provide some info about yout config. You may be a little concerned about posting IP settings etc but please be assured it is perfectly safe as I will explain below.

    1. Most of the IP that you will refer to are local IPs and will be 192.168.1.X where x is the "id" of the device on your loacl area network. Most LANs use this and the router is usually either 192.168.1.1 or 192.168.1.254. These addresses are useless for an outsider as they are asigned by your router under DHCP or by yourself under fixed IP. therefore there are probably thousands of devices with the IP 192.168.1.5 in the world.

    2. Your external IP that your router uses to access the outside world is read by every single web server that you access... So if I could use your IP to gain access I could set up a website that would have a high hit rate in search engines and then log all the IPs that access it. Click on the link below for proof.
    http://www.whatsmyip.org/

    Can you firstly please post the IP settings as stated by the DLink Control panel.

    It would also be helpful if we could get the IP settings from you PC. You can get these by opening a command prompt window (start, run, cmd [enter]) and type the following:

    ipconfig /all > %userprofile%\desktop\ipconfig.txt

    This will create a txt file on your desktop with your IP settings. Copy and paste its contents into your reply.

    Next ill try and explain my thoughts on where your problems lie.

    Your default gateway is basically your router. It is your gateway to the outside world. It has an external IP which your Router uses to talk to the outside world. The external IP is set by your ISP and can be either Static or dynamic depending on the contract you have with your ISP. Dynamic is usually cheaper and aimed at the home user market who dont need a fixed IP and your external IP will change everytime you reset the router. It will has an internal IP (192.168.1.X) which other local devices use to address the router. The only way that can change is if you change it in the control panel (assuming your control panel will let you do that).

    Your router will have its own in built DHCP server which it uses to asign IP addresses (Usually from the lowest available number up). You can manually assign an IP to a device but that is configured on the actual device (ie on your PC) but it is not a good idea to use both DHCP and fixed (or if you do make sure that your fixed IPs are reasonable far away from DHCP asigned ones) as you can end up with conflicting IPs.

    Good news is that if the IP has changed on the router then it is not likely to by spyware.

    If in the TCP/IP cettings your default gateway does not match the gateway on your router you should be able to get local access for file/print sharing but you wont have any external internet access as all your internet traffic is being routed to a device that does not exist.

    Unless you have a specific requirement for fixed IPs I would recomend that you turn on DHCP and automatically obtain an IP address.

    I did have a problem on my network where by I had incorectly set up my router to work with a fixed external IP instead of dynamic and my connection kept doing some really wierd things.

    Did your ISP provide your router preconfigured?

    Sorry there is soooo much text there.
     
  5. plodr

    plodr Major Geek Super Extraordinaire

    Default Gateway for D-link is 192.168.0.1 (these are old notes so a newer model might use another IP).

    That should not be changing.

    The IP that the "outside" world sees is different; it changes and is assigned by your ISP.

    The LAN addresses that the router assigns to computers in your home may change. I have my internal IPs starting at 100. So if I were using a D-link router, the first computer would get an IP of 192.168.0.100
    the next one would be assigned 192.168.0.101
    I've also limited the addresses to 6 (5 computers and a printer) so the last usable address for my setup is 192.168.0.105
    The computers and printers change IPs. If the power goes out, the router has to re-assign addresses and it starts assigning by what is powered up.
     
  6. kickshaws

    kickshaws Private E-2

    Thanks for the reply Polodr.

    That is the Default IP, not the Default Gateway.

    Yes - but the Default gateway IS! Under the 'Management IP' tab on the D-Link interface is this info;

    IP Address 198.168.1.1
    NetMask 255.255.255.0
    Default Gateway 212.87.69.130
    Hostname mygateway
    Domainname ar7

    None of which means anything at all to me! except that the Default Gateway as above is what it currently defaults to on boot-up whereas according to my notes it used to be set to 212.87.77.54 Full of hope I thought re-setting it to the old Default Gateway might discourage disconnection from the internet but it seems not to have. I may be kidding myself, but it seems to happen less often.

    All I really want to try and find out is if the problem is down to a duff router or something else. Routers are innocent till proven guilty!

    Thanks for any advice.
     
  7. kickshaws

    kickshaws Private E-2

    Thanks for your reply Tueur and for your comments designed to reassure me that I am not about to remove my virtual trousers in from of the whole internet! But what the heck, so here goes.

    Well, a bit is a whole lot more than I know!

    Coming up...

    Well it did something but it was all over in the twinkling of an eye. Searched for ipconfig.txt but zilch. Could AVG or some other 'service' be interfering with a perfectly reasonably request? In the absence of the info you asked for is any of this any good?

    IP Address 198.168.1.1
    NetMask 255.255.255.0
    Default Gateway 212.87.69.130
    Hostname mygateway
    Domainname ar7​

    The Default Gateway above is what it currently uses whereas what it used to be was 212.87.77.54 I reset it to this hoping to put an end to the irritating disconnections but alas...

    As far as I know the IP is fixed. I asked for fixed in the first place as I had notions of installing cctv and upping it to a website. At the time fixed IP was the only way I could see of doing that. Needless to say never got around to the cctv! One day...

    So in view of my lack of cctv etc this sounds like we could be cookin'. But, having just looked, the DHCP settings are;

    Enable DHCP Server [enabled]
    Start IP: 192.168.1.2
    End IP: 192.168.1.254
    Primary DNS: 192.168.1.1
    Lease Time: 3600 Seconds
    Disable DHCP Server [blank]​

    Which looks like DHCP is turned on but may not be obtaining an IP address but using a default fixed?

    No, think I lashed out on the router which came with a disc. I will have followed instructions to the letter - probably

    No need to apologize for a fulsome reply! For which many thanks.
     
  8. Tueur

    Tueur Sergeant Major

    To get your PCs IP settings go to command prompt and type

    ipconfig /all

    this will list the details on the screen. the > %userprofile%\desktop should have written the output to a txt file on your desktop.

    Next.
    Think of your network/internet connection in a hierarchial structure. Your PC is at the bottom then your router is at the next level up then your ISP is t the next level. The default gateway is basically the IP of thee next device up the hierarchy that the device connects to for access. so the default gateway for your PC is the IP of your router; the default Gateway for your router will be the IP of you ISP.

    On this basis your IP settings for your PC should be something like

    IP 192.168.1.2
    Subnet mask 255.255.255.0
    Default Gateway 192.168.1.1

    Your IP settings on your router are obviously posted below but what you will notice i that the default gateway is an external IP because it is your ISP.

    If this has changed, then I would suggest that your ISP has changed the IP off its access point. This shouldn't be an issue. I would email your ISP and ask them for the config information neede for your router.

    There are also two levels of dynamic/fixed IP. ie the first level is on your local network and the second is between your router and ISP.

    On my network I have a dynamic IP between my router and ISP which means that when I reset my router it picks up a new external IP from the DHCP server on my ISP. The local IP will always be 192.168.1.254 for my router (in your case 192.168.1.1)
    Within my local area network I choose to use fixed IPs which I asign through the TCP/IP settings. I could use dynamic IPs which would mean that the DHCP serer on my router would asign IPs automatically, which is what I am recomending to you.
     
  9. Tueur

    Tueur Sergeant Major

    Incidently, If you want to test whether your ISP IS giving you a fixed IP then try clicking on the link to show my IP that I gave you below. Write down your IP then restart your router. Click on the link below again and see whether it has changed.
     
  10. plodr

    plodr Major Geek Super Extraordinaire

    That is not correct either.
    The primary DNS is an outside server
    Examples: Open DNS uses 208.67.222.222 and 208.67.220.220
    My Comcast (there are lots depending on the location) 68.82.0.6 and 68.82.0.5

    Find out what your ISP uses.
     
  11. mcsmc

    mcsmc MajorGeek

    Hi

    I may be out of my league with this, but the Lease Time you posted is the time it goes before attempting to get a new IP address from your ISP. Does setting it (from 3600) to 0 help? I'm assuming that would effectively make the lease indefinite, since your IP is static.
     
  12. Tueur

    Tueur Sergeant Major

    The settings where this is quoted from are taken from his PC. The primary DNS on the PC should be the router. This then is redirected by the router to the DNS server listed in the router which is the external one that you refference.

    ie the Primary DNS on the router should be external but the Primary DNS on the PC should be the router.

    Are you using wired or wireless connection?

    EDIT: Ignore my ignorance... They were taken from the router and therefore are, as you correctly state, wrong. Apologies
     
  13. kickshaws

    kickshaws Private E-2

    Well this should give you some idea of my level of expertise. I was entering the string in the RUN dialogue box. Result = the info flashed onscreen for a nanosecond before disappearing up its own fundament. And no text file on the desktop - or anywhere else come to that. BUT - and this for the benefit of other fools with the same problem - I tried typing CMD in the RUN box which launched the command prompt. THEN I tried the string. Still no joy so just settled for ipconfig /all and took this snap. Hopefully that contains the same info as would be contained in the text output? The image may look a bit weird as the background is this forum page.

    [​IMG]

    I'll ask them if they have moved a goal post.

    And the router b.t.w. is wireless but my 2 computers here are both attached by network cables.

    Many thanks again for the help.
     
  14. kickshaws

    kickshaws Private E-2

    Sorry to be so dim, but what link?
     
  15. kickshaws

    kickshaws Private E-2

    Thanks mcsmc I'll give that a try later on.
     
  16. lbmest

    lbmest MajorGeek

    http://www.whatsmyip.org/

    Try updating the router's firmware.(Left field suggestion)
     
  17. Tueur

    Tueur Sergeant Major

    Look in post number 4 under point 2

    Edit: As lbmest said.

    Your PC settings reported by IP Config are correct so any problems lie with the router. I dont have time to formulate a decent reply now but Ill be back later
     
  18. Tueur

    Tueur Sergeant Major

    OK I think what I would do is request your router settings from your ISP and make sure they are set up correctly. Your PC is fine so if you get your router set up correctly you should be fine. If you are still having problems then it may be a hardware issue.
     
  19. kickshaws

    kickshaws Private E-2

    Thanks Ibmest, but I've already done that.
     
  20. kickshaws

    kickshaws Private E-2

    Ah, gotcha. Thanks for that. I'm all over the place today but will try your suggested test this evening whether I am indeed getting a fixed IP from my ISP. Armed with that info I will then contact them for correct router settings as you suggest.

    Many thanks for all the help.
     
  21. kickshaws

    kickshaws Private E-2

    Bought a new one!

    Thanks for all the help everyone. I tried tinkering with the Lease Time as suggested by mcsmc changing it from 3600 to 0 but that just made the wretched thing hysterical!

    I also checked with www.whatsmyip.org and sure enough, after disconnecting and reconnecting etc the IP was the same - and, more to the point, tallied with the details of the fixed IP I got from my ISP.

    So it seemed there was nothing for it but to out with the plastic and get tooled up. And lo; calm is now restored and there is peace and harmony throughout the household.

    Thanks again and out!
     
  22. Tueur

    Tueur Sergeant Major

    glad you got it sorted.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds