The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Default gateway IP resets

    Discussion in 'Linux Compatibility and Software' started by Thaenatos, May 21, 2009.

  1. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    As the title says the default gateway that I set in the gui or through terminal resets. In the gui it resets as soon as I click apply, in the terminal it doesnt show the gateway when I type 'sudo ifconfig'. I have gone through the command line steps as well as through the gui to no avail. I also edited my interfaces and my resolv.conf files.

    interfaces:
    Code:
    auto eth0
    iface eth0 inet static
            address 192.168.1.100
            netmask 255.255.255.0
            network 192.168.1.0
            broadcast 192.168.1.255
            gateway 192.168.1.1
    resolv.conf:
    Code:
    name server xxx.xxx.xxx.xxx
    name server xxx.xxx.xxx.xxx
    x's replaced with my actual DNS addresses in the actual file.

    Im at a loss here as Im not that good with linux, but no matter what I do it always resets the default gateway IP to 0.0.0.0. Oh and Im using Ubuntu 9.04 desktop.
     
  2. D-EJ915

    D-EJ915 Notebook Consultant

    Reputations:
    123
    Messages:
    161
    Likes Received:
    0
    Trophy Points:
    30
    not sure exactly what the problem is (I use static DHCP and no GUIs) but I can fix it temporarily for you at least

    sudo route add default gw 192.168.1.1 (interface)


    resolv.conf has to do with name resolution (along with /etc/hosts) and nothing to do with routing fyi.
     
  3. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Maybe it's network-manager or nm-applet messing with your manual configuration. If you've got it running check its settings or maybe close it and see if your manual settings work.
     
  4. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Thanks for the heads up on resolv.conf, I went through some steps and that was one of them. As for the terminal command I did that as well, I will try it again but it will be the 5th or so time Ive tried it. :p

    I will look into this as well.
     
  5. helikaon

    helikaon Notebook Consultant

    Reputations:
    269
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    Hi,
    what desktop you use?
    I had similar troubles in fedora 9 with the kde 4.0.
    Anyway you can set up the gateway ip manually by opening the config file in e.g. vi editor.

    Are you sure, that your settings are saved properly after manual editing the conf file- did you try for e.g. to 'cat' the file after saving?
    As someone mentioned, it could be the NetworkManager messing things up, try to disable it in your runlevel and let the 'network' service to run. Other thing to try is to boot to runlevel without X desktop - only with prompt and then to write changes to your netw. conf file, so no X app try to write into it.

    And e.g. there can be other conf file where gateway is specified ... in RedHat it is in:
    /etc/sysconfig/network where you can specify the gateway and other network info (but is overriden by setting for particular netw. interface).


    But i'm not familiar with ubuntu, so probably someone other could point you more.
    gl&hf :)