Add secondary IP and disable DHCP for Rocky/Almalinux 10

View profile

AL 10 doesn’t use network-scripts anymore, and my new VPS has what appears to me to be a wonky name. I’m having trouble adding a second IP address to my server. I dont’ see any Vultr docs on it. Network interface name appears to be

id=cloud-init enp1s0

With a space WTH.

Comment
ACSB
2 comments · incl. Vultr Team

Join Vultr Community

Points, levels & badges

Enter challenges & submit builds

Register to events & meetups

Get your work featured

2 Comments

Most Helpful — awarded automatically on community upvotes
4
Commented: 6 months ago

Hello,

On AlmaLinux 10 / Rocky Linux 10, networking is managed by NetworkManager.

You can configure your network manually using the connection files located at:

/etc/NetworkManager/system-connections/

Edit the appropriate connection file based on your interface name and update
IP settings as required.

After making changes, reload or restart NetworkManager to apply them.

If you require further assistance, please raise a support ticket from the
Vultr Console.

4
0
Commented: 47 minutes ago

For anyone landing here later: "cloud-init enp1s0" is the NetworkManager connection name, not the interface name. The interface is just enp1s0. Quote the connection name and nmcli works fine, for example: nmcli con mod "cloud-init enp1s0" +ipv4.addresses <secondary-ip>/<prefix> and then nmcli con up "cloud-init enp1s0". To drop DHCP, set ipv4.method manual and fill in ipv4.addresses (keep the primary IP in there too), ipv4.gateway and ipv4.dns with the values from your server's IPv4 settings page. Also stop cloud-init from rewriting the config on reboot by creating /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg containing network: {config: disabled}

0

Post Comment