How do I set up a static route?

Long ago and far away, one just edited /etc/resolv.conf. No more.

Now I have a more complex home network and I either have to set up
a fake internal domain with a DNS, or I can just set the IP addresses
in the 3 resolv.conf files on the computers used as computers.
Except that the file has all these caveats about it being generated.
And I am having trouble locating the predecessor files that are used
to create that one. I am sure the right file(s) exist in /etc/sysconfig/network
but it isn’t obvious which one. Help, please? Thank you!!

OpenSuSE Reference Chapter 25 DHCP

Section 26.3.1. Clients with Fixed IP Addresses

host <hostname> {
hardware ethernet 00:30:6E:08:EC:80;
fixed-address 192.168.2.100;
}

I did an experiment for you:

I use the Google resolvers 8.8.8.8 and 8.8.4.4 and can see them in cat /etc/resolv.conf

I read this in resolv.conf:

Before you change this file manually, consider to define the

static DNS configuration using the following variables in the

/etc/sysconfig/network/config file …

So I looked in the file /etc/sysconfig/network/config and saw this paragraph:

Type: string

Default: “”

List of DNS nameserver IP addresses to use for host-name lookup.

When the NETCONFIG_DNS_FORWARDER variable is set to “resolver”,

the name servers are written directly to /etc/resolv.conf.

Otherwise, the nameserver are written into a forwarder specific

configuration file and the /etc/resolv.conf does not contain any

nameservers causing the glibc to use the name server on the local

machine (the forwarder). See also netconfig(8) manual page.

NETCONFIG_DNS_STATIC_SERVERS=“8.8.8.8 8.8.4.4”

So I suppose that is where the resolvers are set

So I changed that line to this line: NETCONFIG_DNS_STATIC_SERVERS=“61.9.211.33 61.9.211.1” [these resolvers are the ones supplied by my ISP, they work as well for me as Goole’s resolvers]

And then I test if it worked by restarting the network with this command: su -c “rcnetwork restart” and then run cat /etc/resolv.conf and I see the new nameservers correctly in there. So I conclude that the file that is the “predecessor” to resolv.conf is indeed “config” located at /etc/sysconfig/network/config

PS if I also then look in Yast → network devices → network settings → Hostname/DNS → Name Server 1 and Name Server 2, I see the new resolvers have appeared there too.

Hm, I wanted to help you on setting a static route. But it seems that you want to configure DNS servers.

To me that is not the same :question:

create the file “routes” at /etc/sysconfig/network
add a line
default gw-ip - -