annoying issues (default gateway)

i followed steps from urban penguin’s youtube channel to set my linux server to an static IP.

https://www.youtube.com/watch?v=sqUGV0thUJs&list=PL3E447E094F7E3EBB

it has been working fine for a couple months but recently, all my static configurations stopped working and now everything is DHCP, which would be fine but for some reason my default gateway is wrong.

i checked my /etc/sysconfig/routes and its set to 192.168.254 --.
i even tried changing it to included the interface. found that from some site. but unable to resolve issue.

im at my wits end. i did notice when i use yast vs editing config files->yast will overwrite everything even if do not change anything.

any suggestions.

From your description, you’re using ‘traditional ifup’ rather than NetworkManager controlled NIC. You should have been able to configure the appropriate interface with YaST, (including assigning the default gateway). Even without explicitly assigning it, you should be able to ping it, assuming you’ve assigned a static IP applicable to the local subnet.

Anyway, the configuration is stored in ‘/etc/sysconfig/network/ifcg-<name of your network interface>’ (eg I have /etc/sysconfig/network/ifcfg-ens1), so you should be able to confirm settings there too.

Second thought I had was check/confirm the default gateway while DHCP assigned…

netstat -r

Then when you assign a suitable static IP address, you’ll be sure to assign the correct gateway as well.

i will check once i get home
but i prefer editing sysconfig via test editor. doing some job training and not ever system has access to the yast

If you don’t have YAST then it’s not a SUSE system and location for network configuration may not be the same, nor the syntax.

Here’s an openSUSE guide explaining network configuration, including how to configure manually (refer section 13.6)

i have yast, just dont want to use it.

I was able to get everything working. re-configured for static ip hopefully it sticks for awhile. i will read the article that was posted. thanks everyone for your help…not to mad about Opensuse.

Not hard to do from command line. Use whatever works for you. :slight_smile: