To configure an IP address, either use DHCP (ip=dhcp ) or set an individual
static IP address (ip=<host_ip> ). Then identify the DNS server IP address (nameserver=<dns_ip> ) on each node. This example sets:
-
The node’s IP address to 10.10.10.2
-
The gateway address to 10.10.10.254
-
The netmask to 255.255.255.0
-
The hostname to core0.example.com
-
The DNS server address to 4.4.4.41
|
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:enp1s0:none
nameserver=4.4.4.41
|
Specify multiple network interfaces by specifying multiple ip= entries.
|
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:enp1s0:none
ip=10.10.10.3::10.10.10.254:255.255.255.0:core0.example.com:enp2s0:none
|
Optional: You can configure routes to additional networks by setting an rd.route= value.
If the additional network gateway is different from the primary network gateway, the default gateway must be the primary network gateway.
|
To configure the default gateway:
To configure the route for the additional network:
rd.route=20.20.20.0/24:20.20.20.254:enp2s0
|
Disable DHCP on a single interface, such as when there are two or more network interfaces and only one interface is being used.
|
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:enp1s0:none
ip=::::core0.example.com:enp2s0:none
|
You can combine DHCP
and static IP configurations on systems with
multiple network interfaces.
|
ip=enp1s0:dhcp
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:enp2s0:none
|
Optional: You can configure VLANs on individual interfaces by using the vlan= parameter.
|
To configure a VLAN on a network interface and use a static IP address:
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:enp2s0.100:none
vlan=enp2s0.100:enp2s0
To configure a VLAN on a network interface and to use DHCP:
ip=enp2s0.100:dhcp
vlan=enp2s0.100:enp2s0
|
You can provide multiple DNS servers by adding a nameserver= entry for each server.
|
nameserver=1.1.1.1
nameserver=8.8.8.8
|
Optional: Bonding multiple network interfaces to a single interface is supported
using the bond= option. In these two examples:
-
The syntax for configuring a bonded interface is: bond=name[:network_interfaces][:options]
-
name is the bonding device name (bond0 ), network_interfaces
represents a comma-separated list of physical (ethernet) interfaces (em1,em2 ),
and options is a comma-separated list of bonding options. Enter modinfo bonding to see available options.
-
When you
create a bonded interface using bond= , you must specify how the IP address
is assigned and other
information for the bonded interface.
|
To configure the bonded interface to use DHCP, set the bond’s IP address
to dhcp . For example:
bond=bond0:em1,em2:mode=active-backup
ip=bond0:dhcp
To configure the bonded interface to use a static IP address,
enter the specific IP address you want and related information. For example:
bond=bond0:em1,em2:mode=active-backup
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:bond0:none
|
Optional: You can configure VLANs on bonded interfaces by using the vlan= parameter.
|
To configure the bonded interface with a VLAN and to use DHCP:
ip=bond0.100:dhcp
bond=bond0:em1,em2:mode=active-backup
vlan=bond0.100:bond0
To configure the bonded interface with a VLAN and to use a static IP address:
ip=10.10.10.2::10.10.10.254:255.255.255.0:core0.example.com:bond0.100:none
bond=bond0:em1,em2:mode=active-backup
vlan=bond0.100:bond0
|
Optional: Network teaming can be used as an alternative to bonding by using the team= parameter. In this example:
|
Teaming is planned to be deprecated when RHCOS switches to an upcoming version of RHEL. For more information, see this Red Hat Knowledgebase Article.
|
|
To configure a network team:
team=team0:em1,em2
ip=team0:dhcp
|