native static ip

hi, i’d like to whip up a tumbleweed vm or 2 (in kvm). is there an easy way to configure static ip via simple files? perhaps by installing the likes of either netplan or systemd-networkd i suppose, tho if there’s a more native tumbleweed way i’d be happy to use it.

is it sensible to remove NetworkManager packages (which ones?), or wiser to just disable and ignore them, or is it truly best to use nmcli?

Hi
I use vagrant (and configure network here), by default Tumbleweed uses NetworkManager, then there is always ignition or combustion where you can pre-configure the likes of IP address including NM.

What is the end game for the images?

A bare bones vm with a strong (tumbleweed) foundation, preferably the most minimal set of packages, on which i can deploy ceph, or nagios, or backuppc, or, with vnc, a crm, or gnucash, or a browser.

Does it work to remove NetworkManager packages or are they too entangled with dependencies to even bother trying?

And what is the native tumbleweed flavor of static ip configuration? Preferably not yast, chef, puppet, vagrant, docker, libvirt, kde systemsettings, or networkmanager, preferably just the bare native skeleton method?

bor@tw:~> sudo zypper rm NetworkManager
Reading installed packages...
Resolving package dependencies...


The following 13 packages are going to be REMOVED:
  NetworkManager NetworkManager-bluetooth NetworkManager-branding-openSUSE
  NetworkManager-openconnect NetworkManager-openconnect-gnome
  NetworkManager-openvpn NetworkManager-openvpn-gnome NetworkManager-pptp
  NetworkManager-pptp-gnome NetworkManager-tui NetworkManager-vpnc
  NetworkManager-vpnc-gnome NetworkManager-wwan


13 packages to remove.
After the operation, 7.8 MiB will be freed.
Continue? [y/n/v/...? shows all options] (y): 

And what is the native tumbleweed flavor of static ip configuration?

Define “native”. Default network management is NetworkManager. YaST supports NetworkManager and wicked. If you are not interested in YaST you can use whatever you like.

preferably just the bare native skeleton method?

If the only requirement is configuration files - NetworkManager stores configuration in simple ini files which can be prepared with any text editor.

1 Like

Hi
Then I would use something like autoyast, but MicroOS may be better suited?

As indicated by user arvidjaar, this is a config I use on ALP with ignition to setup…


cat /etc/NetworkManager/system-connections/static-ip.nmconnection 

[connection]
id=static-ip
type=ethernet
interface-name=eno2
[ipv4]
address1=192.168.100.90/24,192.168.100.1
dns=192.168.100.44;192.168.100.33;8.8.8.8;
dns-search=domain.org;
method=manual
[ipv6]
addr-gen-mode=stable-privacy
method=disabled

aha, yes, exactly what i was looking for, just didn’t know it yet

Well i installed the MicroOS .iso into a kvm guest with static ip and was surprised it came up neither resolving dns nor routing out through our gateway. Also disappointed it defaults to selinux. The tumbleweed packaging seems to be working rather better for me. Tho microos provides good insight what packages i may choose to trim.

Now this is what i was looking for. Surprised it didn’t fix the microos networking problems tho, even after a reboot.

Can you share your NM configuration details?
Which KVM networking mode is configured?

https://kb.novaordis.com/index.php/KVM_Virtual_Networking_Concepts#Virtual_Network_Modes

Please keep your discussion in one place, I note you’ve posted the same here as well
https://forums.opensuse.org/showthread.php/578320-iso-guest-not-resolving-dns-nor-completing-a-login-via-ssh

Bridged. Two internal networks, one of which has a gateway to the internet. i simply installed two guests by feeding the Tumbleweed and MicroOS ISOs to virt-install and gave the installers our network info. Since the Tumbleweed guest seems to work better i tried just plugging the Tumbleweed /etc/NetworkManager/system-connections/enp* into the MicroOS guest and rebooting it but that didn’t help. it feels reminiscent of selinux issues and i confess that turns me right off, happy that Tumbleweed defaults to apparmor.

Hi
If you fire up virt-manager and edit the guest and add a new network interface and select bridge and add your bro or br1, then apply and boot does a second interface come up on the machine with appropriate address etc?

i asked chatgpt if dnsmasq is capable to set a static ip for the host on which it runs, it answered yes and gave details, in summary add “address=/myhostname/192.168.1.2” to the config. i think it’s mistaken but i confess i’m not certain, anyone?

/etc/sysconfig/network/ifcfg-eno1 looks like what i’m looking for, it looks like it preceeds both networkmanager and systemd. As i found it it contained

BOOTPROTO='dhcp'
STARTMODE='auto'

How would i set it up as a bridge with a static ip?
My guess:

BOOTPROTO='static'
STARTMODE='auto'
DEVICE='eno1'
BRIDGE='yes'
BRIDGE_NAME='br128'

and /etc/sysconfig/network/ifcfg-br128:

BOOTPROTO='static'
STARTMODE='auto'
BRIDGE='yes'
BRIDGE_PORTS='eno1'
IPADDR='10.my.ad.dr'
NETMASK='255.255.248.0'
GATEWAY='10.ga.te.wy'

and give command:

systemctl disable NetworkManager.service

but when i reboot, ip a says eno1 is “DOWN” and doesn’t even list br128. Where’s the documentation?

So instead i re-enabled and used NetworkManager as described here.

1 Like