Results 1 to 9 of 9

Thread: static IP address settings become reset after restart

  1. #1

    Default static IP address settings become reset after restart

    Hi,
    I have SuSE 11.1 linux desktop PC. If I try to see IP address using "ifconfig" at root console, it is not giving any IP address So I manually given Static IP settings.
    If I restart my system then IP settings got disappeared, I need to set again using "ifconfig".

    Can anyone tell what options should be enabled and where it will be to get the same IP configurations ?

    Also my network services(xinetd) behaving the same way.
    Pls help on this also.



    TIA.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: static IP address settings become reset after restart

    Why do you not configure your IP address using YaST > Network > Network devices?

    It should be set to "traditionaly with ifup" and "do not use DHCP" (or similar wording). And of course fill in your IP address, netmask and default router at the appropriate places.
    Henk van Velden

  3. #3

    Default Re: static IP address settings become reset after restart

    I have done this way at first by setting static IP , netmask, DNS servers and default gateway then when restarted I noticed there is no IP address set if I check with "ifconfig". So then onwards whenever I start the system first I will set IP and deafualt gateway using console then I will work.

    Pls let me know if I missed anything in doing configuration.

  4. #4
    Join Date
    Jul 2008
    Location
    United Kingdom
    Posts
    1,146

    Default Re: static IP address settings become reset after restart

    Not the solution you have asked for but perhaps still a solution is to check if your router (if you're using one) supports assigning IP Addresses based on the MacAddress.

    I use this to avoid having to reboot to set the ip address upon reinstall. (The Macaddress can be seen with the ifconfig command, but since you already used said command I assume you are aware of that )

    I have successfully mannually assigned it a static value in the passed with YaST Network Settings.

    PS: You are running ifconfig with rootrights? Wont show you anything if not.
    Used the following command if you're not sure. sudo /sbin/ifconfig

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: static IP address settings become reset after restart

    YaST not only sets the parameters on the fllight, but it also saves them for future (boot) use. This done in /etc/sysconfig/network/ifcgf-eth0 (for eth0, similar for other NICs).

    Check there. Mine is e.g.:
    Code:
    boven:/etc/sysconfig/network # cat ifcfg-eth0
    BOOTPROTO='static'
    IPADDR='10.0.0.154/24'
    BROADCAST='10.0.0.255'
    STARTMODE='onboot'
    NAME='Hewlett-Packard Company 82801G (ICH7 Family) LAN Controller'
    boven:/etc/sysconfig/network #
    Your STARTMODE could be wrong. You can edit these manualy to test, but first make a backup of the file!
    Henk van Velden

  6. #6

    Default Re: static IP address settings become reset after restart

    In my system
    linux-487l:/etc/sysconfig/network # cat ifcfg-eth0
    BOOTPROTO='static'
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR='172.16.15.43/16'
    MTU=''
    NAME='PRO/100 VE Network Connection'
    NETMASK=''
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='off'
    USERCONTROL='no'
    PREFIXLEN='16'
    linux-487l:/etc/sysconfig/network #

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: static IP address settings become reset after restart

    Well, your STARTMODE=off! so nothing happens on boot.

    Either change this with an editor, or look into YaST > etc., it is somewhere in the configuration window of YaST (like: on cable connection, on boot, ...).

    I also am amazed aboout the parameter BROADCAST not being filled in.

    Edit: is 172.16.15.43/16 realy the IP address you want to use and 172.16.*.* your network?
    Henk van Velden

  8. #8

    Smile Re: static IP address settings become reset after restart

    Hi hcw,
    Able to retain the static IP even after restart if I change STARTMODE="onboot"

    Thanks for support and help.

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: static IP address settings become reset after restart

    You are welcome.
    Henk van Velden

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •