Article

Table of Contents
Theme:
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $300 by adding new articles!

Configure AlmaLinux with Multiple IP Addresses

Last Updated: Mon, Jul 12, 2021
FAQ Networking

Introduction

A basic network configuration at Vultr consists of a single IPv4 address, configured by DHCP. If you have advanced networking requirements, Vultr supports multiple public IPs and up to five private networks. You need to manually configure these advanced scenarios. Refer to the networking configuration page in the customer portal for your exact configuration. This example demonstrates three public IPv4 addresses, two private IPv4 networks, and two public IPv6 addresses.

IPv4 Info

MultipleIP

IPv6 Info

MultipleIP

Example

Public Network

  1. Define three public IPv4 addresses and two public IPv6 addresses on adapter ens3.
    Populate /etc/sysconfig/network-scripts/ifcfg-ens3 with:

    TYPE="Ethernet"
    DEVICE="ens3"
    ONBOOT="yes"
    BOOTPROTO="none"
    IPADDR=192.0.2.101
    PREFIX=23
    GATEWAY=192.0.2.1
    DNS1=192.0.2.200
    IPADDR1=192.0.2.102
    PREFIX1=32
    IPADDR2=192.0.2.103
    PREFIX2=32
    IPV6INIT="yes"
    IPV6_AUTOCONF="yes"
    IPV6ADDR_SECONDARIES="2001:db8:1000::100 2001:db8:1000::200" 
    
  2. Restart the connection or reboot.

    # nmcli con load /etc/sysconfig/network-scripts/ifcfg-ens3
    # nmcli con up 'System ens3'
    

Private Network

  1. Define the first private network on adapter ens7.
    Populate /etc/sysconfig/network-scripts/ifcfg-ens7 with:

    TYPE="Ethernet"
    DEVICE="ens7"
    ONBOOT="yes"
    BOOTPROTO="none"
    IPADDR=10.1.1.100
    PREFIX=20
    MTU=1450
    
  2. Restart the connection or reboot.

    # nmcli con load /etc/sysconfig/network-scripts/ifcfg-ens7
    # nmcli con up 'System ens7'
    
  3. Define the second private network on adapter ens8.
    Populate /etc/sysconfig/network-scripts/ifcfg-ens8 with:

    TYPE="Ethernet"
    DEVICE="ens8"
    ONBOOT="yes"
    BOOTPROTO="none"
    IPADDR=10.1.1.200
    PREFIX=20
    MTU=1450
    
  4. Restart the connection or reboot.

    # nmcli con load /etc/sysconfig/network-scripts/ifcfg-ens8
    # nmcli con up 'System ens8'
    

Nameservers

Verify that /etc/resolv.conf has your preferred nameservers for IPv4, and optionally IPv6.

domain       example.com
nameserver   2001:db8:1000::1
nameserver   192.0.2.200

More Resources

Want to contribute?

You could earn up to $300 by adding new articles