Find the answer to your Linux question:
Results 1 to 3 of 3
I just installed SuSe for the first time on my home network. We used it at work for a mail server, but other than manage user accounts, I didn't mess ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    25

    Make default gateway permanent different on SuSe than Red Hat?


    I just installed SuSe for the first time on my home network. We used it at work for a mail server, but other than manage user accounts, I didn't mess with it much. I've generally used Red Hat distros up until now.

    In SuSe 10, I can't figure out how to permanantly add a default gateway through the CLI. In Red Hat, it's just a matter of adding a line to /etc/sysconfig/network or /etc/sysconfig/network-scripts/ifcfg-eth0, depending on the setup. Niether of these files exist in my fresh install of SuSe 10.

    I've done quite a bit of Googling, and came up with two sites that said to edit etc/rc.d/rc.local in SuSe. Unfortunately, this file does not exist either. I need to know how to make the gateway permanent using the command line. Can I just create rc.local in /etc/rc.d, or is there somewhere else I should be making the default gateway address permanent?

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    You can do it 3 ways:
    1. You can set it up in yast. i.e. Yast -> Network Devices -> Network Card -> Select netowrk card -> Routing
    Here enter the default gatewya
    2. execute this command
    Code:
    route add -net default gw gateway_ip_address
    3. Add it in /etc/sysconfig/network/routes
    Life is complex, it has a real part and an imaginary part.

  3. #3
    Just Joined!
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    25
    I didn't have the /etc/sysconfig/network/routes file, so I created one. I kept getting an error on network restart until I found the right format for the gateway in the routes file. I was just adding GATEWAY='xxx.xxx.xxx.xxx' like I would in RedHat, but that didn't work. I finally found that for the routes file in SuSe, using:

    default xxx.xxx.xxx.xxx - -


    did the trick.

  4. $spacer_open
    $spacer_close

Posting Permissions

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