Chapter 15. Configuring an IP address ping target to ensure active network connections


Configure the connection.ip-ping-addresses and connection.ip-ping-timeout settings to verify connectivity to a specific target.

The NetworkManager service starts after the system boots. Certain services, such as network file system (NFS), are dependent on the network connectivity. If the gateway IP or the target IP address does not return a response, NFS fails to mount because it cannot connect to its destination as network is not completely up and running. Therefore, you can configure the connection.ip-ping-addresses and connection.ip-ping-timeout settings to verify connectivity to a specific target to avoid such problems. The connection.ip-ping-addresses setting supports configuration of IPv4 and IPv6 addresses.

Procedure

  1. Create a connection profile, if it does not already exist. For example, to create a profile for the enp1s0 interface with dynamic IP address assignment, enter:

    # nmcli connection add con-name enp1s0 ifname enp1s0 type ethernet
    Copy to Clipboard Toggle word wrap
    Note

    Configuration of connection.ip-ping-addresses can result in the delay of response from the network-online target service of systemd, because of waiting for either the ping operation completion or timeout period.

  2. Configure the connection to ping the specified IP addresses with a defined timeout period:

    # nmcli connection modify enp1s0 connection.ip-ping-addresses "192.0.2.56, 192.0.2.60" connection.ip-ping-timeout 10 ipv4.may-fail no
    Copy to Clipboard Toggle word wrap

    Setting the ipv4.may-fail attribute to no, ensures that IPv4 configuration must complete successfully.

  3. Re-activate the connection:

    # nmcli connection up enp1s0
    Copy to Clipboard Toggle word wrap
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat