Can't set static IP in opensuse leap on OpenSuse Leap 42.3

Hi All…
Thanks for your help in advance as I am a new user here, I hope to learn a lot and provide future support to beginners.

I installed opensuse leap 42.3 and it assigned my machine a IP address of 10.0.0.x/24. After installing, I was able to browse the internet and ping external sites like I wanted to assign a internal static IP address this machine, so I went into YAST > Network Settings and set a static IP address of and subnet to and provided a host name and then clicked on ‘NEXT.’ I assume it set the static IP address to what I wanted because when I did a ‘ip addr show’ within the terminal it displayed the static IP i wanted. Following this, I did a ping cmd, but whenever I would ping anything like, it would say unknown host. I’m not sure why. Did I not set the IP correctly? I noticed when I set the static IP address within the network Settings dialog there was a section under there called ‘Additional Addresses.’ I left this blank. Can someone please shed some light on this for me? I’m trying to do this correctly because eventually I want to install 2 or 3 vms and will want to give each vm their static IP so I can access it externally.

Any help would be greatly appreciated.

I was trying to post some images here to show what i did, but wasn’t sure how. It was asking me for image url and the screenshots I have are on my local machine.


Well internal addresses are setup in the router. The router either assigns address’s dynamically (DHCP) or statically in which case you have to tell the router what addresses to assign. Generally you don’t need tot tell the computer the address just that it is assigned DHCP or not ie static.

Further to what gogalthorp mentioned, I would recommend reconfiguring to use DHCP address from the router, and then configure the router to reserve that address for your machine (using its unique MAC address). Then you effectively end up with a static local IP address.

AFAIK (or rather, learned so far), a DHCP server provides a client all necessary IP configuration to be able to connect, and this includes IP address, subnet mask, gateway address, and at least one DNS address.

I haven’t tried Yast for this kind of things, but at first sight it would look for me like you only provided the first two elements above mentioned, and somehow Yast didn’t ask for the rest (unless they were under the “Additional addresses” section?). If either gateway or DNS are missing pinging any website would certainly give errors similar to those you got.

As a side note, I recently learned DHCP protocol itself is seemingly not able (or designed) to distinguish static IP addresses configured in clients as already in use, only those provided directly by DHCP itself. Correct me if wrong please.
This would mean if one manually sets a static IP address from the PC itself, router will not recognize this address as “in use” since it was not given by router itself, and it could give that same address to a newly joined client device in the LAN, causing IP conflict. So in this regard it would probably be good idea to set static IP for your PC from router, just like advised.

A bit of a weakeness using YaST to configure static addresses is that all the things you need to configure aren’t on one page.
More than likely you didn’t set your Default Gateway in the Routers tab.
You also generally need to set your DNS in the DNS tab.

Main alternative is to enable Network Manager, then configure your static address, DG and DNS.

Technically speaking, configuring a DHCP Reserved Lease isn’t configuring a static address, but accomplishes the common goal of an assigned and configured address that won’t change.


Thank you everyone for your feedback.

So the way I understand it is that, I should leave my pc settings as-is on DHCP and not mess with them, but rather in my router assign a static ip address to the MAC Address of my machine? Am I following this correctly?

Additionally, so you know what I was doing, I have provided links to the 4 screenshots on how I was setting a static IP address for my machine. I was under the impression I could do it from here without messing with my router. If we can’t set the static ip from here in network settings then when and what is this used for. bit confused on that.

Thanks again for your help guys…

  • AJ

It’s one way of ensuring that your machine gets the same IP address (based on it’s MAC address), and it saves you having to get the network configuration right.

Additionally, so you know what I was doing, I have provided links to the 4 screenshots on how I was setting a static IP address for my machine. I was under the impression I could do it from here without messing with my router. If we can’t set the static ip from here in network settings then when and what is this used for. bit confused on that.

It is possible to configure a static IP address, but then you need to make sure you also set a default gateway and valid DNS server as well.

Here’s the openSUSE reference guide on the subject…

If the router doesn’t work properly setting MAC address for IP allocation, then you can always set a small range of ip addresses for DHCP in the router, then set your static ip address on the system.

Is this the wireless or ethernet interface your setting? Your also using wicked rather than NetworkManager?

Connect VM’s over which interface?

These screenshots indicate you are configuring your wired connection using DHCP, not setting a static address network configuration(perhaps your first screenshot setting a static address wasnt locked in?), or at least your first and last screenshots conflict with each other.

If you wanted to configure a statiic address, then your second and third screenshots are incorrect, since they don’t set a default gateway and DNS Servers.


There are many ways to do these things as shown above. I won’t go into all the different solutions mentioned above to get the same IP address all the time, because they all will work when properly done. All have their pros and cons. I will only show what I do.

I configure in YaST:

  1. Not to use Network Manager, but to use wicked.
  2. Not to use DHCP.
  3. Configure IP address, netmask, default router, host name and domain name and DNS servers in the appropriate tabs that are visible in YaST.

That is all.

If I understand your question correctly, you’re correct that you should never (or at least be very careful) about configuring static addresses which can conflict with addresses provided by DHCP.

When you set up a DHCP Server, one of the configurations is an Address Range (aka Address scope). Experienced Network Administrators will anticipate the need to set up Static Addresses for some machines like Member Servers which provide Network Services so their IP addresses should never change (DHCP addresses can be re-assigned to a new machine when their leases expire).

So, for example let’s consider a typical Class C Private network,
This notation means that it uses a subnet mask, so all addresses in this range/scope start with 192.168.0 and the last number can be any from 1-254 (Technically, there is also 0 and 255 in the total range, but these two addresses at the extreme lowest and highest have special meanings, ie always refers to the local machine and the other a broadcast to all hosts in the network range).

In this example, Network Administrators might decide that there will be maybe a maximum of 10 Member Servers in the network that provide Network Services like File Sharing, Mail, Applications and more, so might reserve a block of the 15 highest addresses. And, maybe the Internet Gateway Router might automatically self-configure with the lowest address (

Based on the above, the Network Administrator might then configure a DHCP scope for addresses 2-239.
And, maybe DHCP reserved leases might also be configured, and again likely assigned to highest addresses within the scope, eg

Lastly, regarding the VMs you will want to set up, those VMs can be configured like any other Host in your network which would mean as DHCP clients, Member Servers with static addresses or Member Servers with Reserved Leases. It wont make any difference that they are virtual, but follow the organization I just described.


Yes, I agree. If I understand correctly, based on what has been discussed so far there are 2 ways OP can achieve what hir needs: reserving the IP address in router based on MAC address as first advised, or reduce router’s DHCP address scope so it doesn’t include the desired IP address and thus manually assign it as static from the PC itself.

However your Class C private network example confused me a bit. As far as I understand, in any subnetwork -whatever the mask is, not only Class A, B or C, but also CIDR- the first and last node addresses are always reserved: first one corresponds to the address of the network itself (yes, network has an address of its own, what “local machine”?), while last address corresponds certainly to the broadcast address.

Regarding the VMs, it depends how their network devices are configured. In order for the VMs to work as direct as you mention, VMs would generally need to be configured in plain bridged mode, regardless of virtual machine software used.

Regarding the first and last “reserved” addresses in any address range, when you send to the first address you will find it resolves to the local machine and when you send to the last address you will find it resolves to all hosts in that address range. This is what happens in any address range, which is why the first and last addresses cannot be assigned to a host.

As for VMs, my answer covers all configurations, both common and rare. It’s true that Guests may be configured with bridge devices in bridging mode, but there are other networking configurations as well which would require a physical IP address… eg network device hardware pass-through and real network device configurations which might be rare in most virtualization technologies but is the standard configuration for Docker containers.

And, you may want to deploy real, physical member servers in the future as well.
Good early network architecture takes all these possibilities into account so that Network Admins don’t have to do major surgery to the design later on.