Manual Network Configuration on a Compute Instance

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

Every Compute Instance is assigned several IP addresses, including a pubic IPv4 address and a public IPv6 SLAAC address. By default, a utility called Network Helper automatically configures these IP addresses within the network configuration files on the Compute Instance. While this is preferred in most cases, there are some situations which may require you to manually configure networking yourself. These situations include:

  • Installing a custom distribution on a Compute Instance
  • Configuring failover (see Configuring Failover on a Compute Instance)
  • Assigning addresses from an IPv6 routed range
  • Using other DNS resolvers (not Linode’s)
  • Other advanced use cases where custom network configuration is required

The guides in this series walk you through how to manually configure your networking in most common Linux distributions. To learn more about the types of IP addresses available on a Compute Instance, review the Managing IP Addresses guide. Additional public IPv4 addresses, private IPv4 addresses, and IPv6 routed ranges (/64 or /56) can be added manually or by opening a support ticket and detailing your requirements.

Network Configuration Software in Linux

All Linux distributions have pre-installed software whose purpose is to manage the internal networking on the system. In most cases, using this default software is preferred. That said, advanced users may wish to install their own preferred tool.

Default Network Configuration Software by Distribution

The following table contains a list of each Linux distribution offered by Linode. Alongside each distribution is the default network software that it uses and a link to a guide for help with configuring that software.

DistributionNetwork Manager
AlmaLinux 8 and 9NetworkManager
Alpineifupdown-ng
Archsystemd-networkd
CentOS 7 and 8NetworkManager
CentOS Stream 8 and 9NetworkManager
Debian 9-11ifupdown
Fedora 34-36NetworkManager
Gentoonetifrc
Rocky Linux 8 and 9NetworkManager
Slackwarenetconfig
openSUSE Leapwicked
Ubuntu 16.04ifupdown
Ubuntu 18.04 - 22.04systemd-networkd and Netplan

To manually configure networking, follow the associated guide and/or the official manual for the networking software and Linux distribution you are using.

Static vs Dynamic Addressing

IP addresses can be statically configured or dynamically configured through DHCP (for public IPv4 addresses) and SLAAC (for primary IPv6 addresses).

  • Static configuration means explicitly defining the IP address within your system’s network configuration. IPv4 addresses are configured this way through Network Helper and static configuration of IPv4 and IPv6 routed ranges is typically recommended when manually configuring your networking.

  • DHCP (Dynamic Host Configuration Protocol) can be used to automatically configure a single IPv4 address on a Compute Instance. If multiple IPv4 addresses are on the system, the first IP address (sorted alpha-numerically) is used. DHCP does not configure private IPv4 addresses or any IPv6 addresses. If you intend on adding or removing public IPv4 addresses after you initially configure networking, using DHCP is not recommended as it may configure a different public IPv4 address after you make those changes.

    Note
    If you do enable DHCP and are using a firewall (such as Cloud Firewalls), you must configure the firewall to allow communication with our DHCP servers. See the DHCP IP Address Reference guide for a list of IP addresses to allow.
  • SLAAC (Stateless address autoconfiguration) can and should be used to automatically configure the main IPv6 address on a Compute Instance. It does not configure any IPv6 routed ranges (/64 or /56) that may also be assigned to that instance. For SLAAC to function, the Compute Instance needs to accept router advertisements. This is accomplished by enabling router advertisements and disabling IPv6 privacy extensions within your system’s networking configuration files. These settings are properly configured by default in our supported distributions.

Static and dynamic addressing can be used together within a single configuration file. As an example, you can use DHCP to configure the public IPv4 address on your system, use SLAAC to configure your IPv6 address, and statically configure any remaining addresses (such as private IPv4 address or addresses from an IPv6 routed range).

Networking Terms

  • IP address: A unique and structured combination of numbers (and letters, for IPv6 address) used to identify a device over a network. Every Linode Compute Instance is assigned a public IPv4 address and a public IPv6 address. Additional IP addresses, including private IPv4 addresses and IPv6 routed ranges, are available. See Managing IP Addresses for information on viewing your IP addresses.

  • Interface: A real or virtual device that is responsible for facilitating a connection to a network. Each Compute Instance has one public interface for connecting to the internet: eth0. If a VLAN is configured, an additional interface for that VLAN is available. In that case, you may assign the public interface to eth0 or eth1 if desired. See Managing Configuration Profiles for instructions on viewing the interfaces configured on your Compute Instance.

  • Gateway: Provides access to a larger network, such as the internet. When configuring a Compute Instance, you only need to specify a gateway for one interface. See Managing IP Addresses for details on finding the gateway IP address that corresponds with the primary IPv4 address you wish to use.

  • DNS resolver: A server responsible for matching domain names to IP addresses. Linode provides DNS resolvers for each data center, though you are free to use others if you choose. See Managing IP Addresses for instructions on viewing the DNS resolvers.

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.


Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.