LINUXOR.SK ... open source notes ...

Email - ifcfg-eth0, relay servers

category: solutionz · date: 2019-12-31 · updated: 2026-10-02 · author: LALA

Email Solution · Config document · referenced from Relay servers

The first network interface of a relay server: its address in the internal VLAN 1168, where the internal email servers reach it. It has a gateway and is explicitly not the default route.

ItemValue
Path on the server/etc/sysconfig/network-scripts/ifcfg-eth0
Shown hereDC2-A-VCMSR001 (dc2-a-vcmsr001.adm.example.net)
Also onDC2-B-VCMSR001, a differently written file with the same meaning, see below
Placeholder<ETH0_HWADDR> stands for the hardware address; the UUID line is empty in the archive
Activated withthe network service; NM_CONTROLLED="no" keeps NetworkManager away

The file

bash
# Interface
DEVICE="eth0"
NAME="eth0"
TYPE="Ethernet"
BOOTPROTO="none"
ONBOOT="yes"
UUID=""
HWADDR="<ETH0_HWADDR>"
NM_CONTROLLED="no"

# IPv4
IPADDR="10.12.19.34"
NETMASK="255.255.255.240"
GATEWAY="10.12.19.46"
DEFROUTE="no"
IPV4_FAILURE_FATAL="no"

# IPv6
IPV6ADDR="2001:db8:a2:b6f::f:2/64"
IPV6_DEFAULTGW="2001:db8:a2:b6f::1"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6_DEFROUTE="no"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
IPV6_PRIVACY="no"

Differences on the second relay

The file of DC2-B-VCMSR001 is not a copy with other addresses. It has no comments, the values are mostly unquoted and the lines are in another order; it looks like the file the installer wrote, edited by hand. Compared by meaning, diff leaves these differences.

HostLineValue
DC2-A-VCMSR001IPADDR10.12.19.34
DC2-B-VCMSR001IPADDR10.12.19.35
DC2-A-VCMSR001IPV6ADDR2001:db8:a2:b6f::f:2/64
DC2-B-VCMSR001IPV6ADDR2001:db8:a2:b6f::f:3/64
DC2-A-VCMSR001HWADDRpresent
DC2-B-VCMSR001HWADDRnot present; the UUID line holds a value
DC2-B-VCMSR001DOMAIN"oob.example.net pc.example.net adm.example.net cimc.example.net mgmt.example.net", only on this host
DC2-B-VCMSR001ZONEpublic, only on this host
DC2-B-VCMSR001PROXY_METHOD, BROWSER_ONLYnone and no, only on this host
DC2-B-VCMSR001IPV4_FAILURE_FATAL, NM_CONTROLLEDeach written twice, with the same value

NETMASK, GATEWAY, DEFROUTE=no, BOOTPROTO=none, ONBOOT=yes and the other IPv6 lines are the same on both.

Checked against RHEL 10.2

As builtToday
ifcfg-* files read by the network service, NM_CONTROLLED="no"The legacy network scripts were deprecated in RHEL 8; RHEL 9 does not contain the network-scripts package; in RHEL 10 support for the ifcfg format was removed
One file per interface under /etc/sysconfig/network-scriptsNetworkManager keyfiles under /etc/NetworkManager/system-connections/; on RHEL 9 nmcli connection migrate converts ifcfg profiles to keyfiles
route-eth0 with <prefix> via <gateway> linesStatic routes are properties of the connection, set for IPv4 with nmcli connection modify <connection> +ipv4.routes "<prefix> <gateway>"

Red Hat's advice today is not to write these profiles by hand at all, but to use nmcli, the network system role or the nmstate API. RHEL 7 itself left maintenance on 2024-06-30.

← solutionz