default route not working

hi all:

i would like to use static ip addressing for my opensuse 13.1. it seems to be fine with ip address assignment, but not the default route…

for some reason, i have to assign default route manually after each reboot. here is my /etc/sysconfig/network/routes:

bears:/home/dave # cat /etc/sysconfig/network/routes
default 0.0.0.0 - ens2

thanks for help.

_dave

A couple of things;

Are you using NetworkManager or Traditional IfUp?

If you want to use static, I think IfUp is the better solution, you can changed it from YAST / Network Devices / Network Settings / Global Options, then set your IP by editing the network adapter there and the default GW via the Routing tab.

How did yyou configure that? Did you use YaST > Network Devices > Network Settings? And then the Routing tab?
You only have to fill in the IP address of the router to be used for the defaulot route in the first field there. That is all.

And then you should see something like:

henk@boven:~> cat /etc/sysconfig/network/routes
default 10.0.0.138 - - 
henk@boven:~>

Which is definitely different from yours where you have 0.0.0.0 as the IP address of your router. And That can not be correct.

And before I forget, please post computer text in the same way as I do, Complete with prompt and command and output and next prompt. And copy/paste that between CODE tags. You get the CODE tags by clicking on the # button in the tool bar of the post editor.

thanks for reply:

yes, i had done all of above.; using ifUp and modified routing tab. but those don’t seem to help. from my understanding, ultimately, the configured routing tab should be reflected in the file /etc/sysconfig/network/routes.

thanks, that helped. it was my mistake on that part. i should have put next-hop gateway address instead of default route.

yeah, next time i should click the “#” for my code…:slight_smile:

again, greatly appreciate the help.