# Networking

# Network info from google

<div class="Y3BBE" data-hveid="CAEQAA" data-processed="true" data-sfc-cp="" id="bkmrk-n-red-hat-enterprise" jsaction="rcuQ6b:&sHevic_8|npT2md" jscontroller="zcfIf" jsuid="sHevic_8"><div data-processed="true" data-subtree="aimfl,mfl" jscontroller="v48bt" jsuid="sHevic_9" style="display: contents;">n Red Hat Enterprise Linux (RHEL) 10, manage basic networking primarily</div><mark class="HxTRcb" data-processed="true">using <span data-processed="true" data-wiz-uids="sHevic_c">[nmcli](https://www.google.com/search?q=nmcli&client=ubuntu-sn&hs=0fr&sca_esv=9de017f5e987cf0d&channel=fs&ei=j56TafiXJoK3hbIPnvKF8A8&biw=1662&bih=822&ved=2ahUKEwie8-n2i9-SAxXGQEEAHXK2NA0QgK4QegQIARAC&uact=5&oq=Manage+basic+networking+in+red+hat+10&gs_lp=Egxnd3Mtd2l6LXNlcnAiJU1hbmFnZSBiYXNpYyBuZXR3b3JraW5nIGluIHJlZCBoYXQgMTAyBRAhGKABSIY8UOsFWLg0cAF4AZABAJgBZaABtAiqAQQxMi4yuAEDyAEA-AEBmAIPoAKMCsICChAAGLADGNYEGEfCAgYQABgWGB7CAgsQABiABBiGAxiKBcICCBAAGKIEGIkFwgIFEAAY7wXCAgQQIRgVwgIFECEYnwXCAggQABiABBiiBJgDAIgGAZAGCJIHBDExLjSgB_gpsgcEMTAuNLgHgwrCBwcwLjEuNy43yAdwgAgA&sclient=gws-wiz-serp)</span> (command-line) or <span data-processed="true" data-wiz-uids="sHevic_e">[nmtui](https://www.google.com/search?q=nmtui&client=ubuntu-sn&hs=0fr&sca_esv=9de017f5e987cf0d&channel=fs&ei=j56TafiXJoK3hbIPnvKF8A8&biw=1662&bih=822&ved=2ahUKEwie8-n2i9-SAxXGQEEAHXK2NA0QgK4QegQIARAD&uact=5&oq=Manage+basic+networking+in+red+hat+10&gs_lp=Egxnd3Mtd2l6LXNlcnAiJU1hbmFnZSBiYXNpYyBuZXR3b3JraW5nIGluIHJlZCBoYXQgMTAyBRAhGKABSIY8UOsFWLg0cAF4AZABAJgBZaABtAiqAQQxMi4yuAEDyAEA-AEBmAIPoAKMCsICChAAGLADGNYEGEfCAgYQABgWGB7CAgsQABiABBiGAxiKBcICCBAAGKIEGIkFwgIFEAAY7wXCAgQQIRgVwgIFECEYnwXCAggQABiABBiiBJgDAIgGAZAGCJIHBDExLjSgB_gpsgcEMTAuNLgHgwrCBwcwLjEuNy43yAdwgAgA&sclient=gws-wiz-serp)</span> (text interface) to control NetworkManager</mark>. Key changes include the removal of `ifcfg` file support, favoring key files in `/etc/NetworkManager/system-connections/`. The `dhclient` tool is also replaced by an internal DHCP client.<span class="uJ19be notranslate" data-processed="true" data-wiz-uids="sHevic_j,sHevic_k"><span class="vKEkVd" data-animation-atomic="" data-processed="true" data-wiz-attrbind="class=sHevic_i/TKHnVd"><span aria-hidden="true" data-processed="true"> </span></span></span></div><div class="Y3BBE" data-hveid="CAIQAA" data-processed="true" data-sfc-cp="" id="bkmrk-key-networking-comma" jsaction="rcuQ6b:&sHevic_o|npT2md" jscontroller="zcfIf" jsuid="sHevic_o">**Key Networking Commands and Tasks (RHEL 10)**</div>- <span class="T286Pc" data-processed="true" data-sfc-cp="">**View Network Status:**</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`ip a`: View IP addresses and interface status.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli device status`: Check device states.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli connection show`: List active network profiles.</span>
- <span class="T286Pc" data-processed="true" data-sfc-cp="">**Configure Networking (DHCP):**</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmtui`: Open the text-based user interface to edit connections.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli con add type ethernet con-name <name> ifname <interface>`: Create a new DHCP connection.</span>
- <span class="T286Pc" data-processed="true" data-sfc-cp="">**Configure Static IP:**</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli con mod <connection> ipv4.addresses <ip/mask> ipv4.gateway <gateway> ipv4.method manual`: Sets static IP.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli con mod <connection> ipv4.dns "8.8.8.8"`: Sets DNS servers.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli con up <connection>`: Apply changes.</span>
- <span class="T286Pc" data-processed="true" data-sfc-cp="">**Troubleshooting:**</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`ping <host>`: Test connectivity.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`ip route`: View routing table.</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`nmcli dev connect <interface>`: Reconnect an interface.</span>
- <span class="T286Pc" data-processed="true" data-sfc-cp="">**Hostname:**</span>
    - <span class="T286Pc" data-processed="true" data-sfc-cp="">`hostnamectl set-hostname <new_name>`: Change the system hostname.</span><span class="uJ19be notranslate" data-processed="true" data-wiz-uids="sHevic_2f,sHevic_2g"><span class="vKEkVd" data-animation-atomic="" data-processed="true" data-wiz-attrbind="class=sHevic_2e/TKHnVd"><span aria-hidden="true" data-processed="true"> </span></span></span>

<div class="Y3BBE" data-hveid="CAQQAA" data-processed="true" data-sfc-cp="" id="bkmrk-rhel-10-fully-deprec" jsaction="rcuQ6b:&sHevic_2m|npT2md" jscontroller="zcfIf" jsuid="sHevic_2m">RHEL 10 fully deprecates the older `/etc/sysconfig/network-scripts/` format. Always use `nmcli` or `nmtui` to ensure configurations are properly saved in the new key file format.<span class="uJ19be notranslate" data-processed="true" data-wiz-uids="sHevic_2r,sHevic_2s"><span class="vKEkVd" data-animation-atomic="" data-processed="true" data-wiz-attrbind="class=sHevic_2q/TKHnVd"><span aria-hidden="true" data-processed="true"> </span></span></span></div><div class="Fsg96" data-processed="true" data-sfc-cp="" id="bkmrk-" jsaction="rcuQ6b:&sHevic_4d|npT2md" jscontroller="KHhJQ" jsuid="sHevic_4d">  
</div><div class="Jd31eb" data-processed="true" id="bkmrk--1" jscontroller="r3gopb" jsuid="sHevic_4e">  
</div><div class="PxKVs notranslate" data-processed="true" data-wiz-uids="sHevic_4g" id="bkmrk--2" jsaction="rcuQ6b:&sHevic_4f|npT2md" jscontroller="Ap1cGe" jsuid="sHevic_4f"><div class="" jsuid="sHevic_4g"><div class="MimRQe" data-animation-nesting="" data-sfc-cp="" data-sn-container="" data-wiz-uids="sHevic_4i,sHevic_4j,sHevic_4k,sHevic_4l" jsaction="rcuQ6b:&sHevic_4h|npT2md" jscallback="" jscontroller="D3Zopd" jsuid="sHevic_4h" role="list"><div class="N8RrG" data-thcrc-cc="" jsuid="sHevic_4i"><div class="Knsxdf PmZFeb" data-sfc-cp="" jscontroller="FOJdve" jsuid="sHevic_4m" role="listitem"><div class="b8PhZd" data-animation-atomic="" data-crb-el="kXllB" data-hveid="CAYQAQ" data-src-fp="false" data-src-id="11" data-ved="2ahUKEwie8-n2i9-SAxXGQEEAHXK2NA0Ql78OegQIBhAB" data-wiz-uids="sHevic_4o" jscontroller="dhV6d" jsuid="sHevic_4n"><div class="ULBRwc"><div class="DDYKU"><div aria-hidden="true" class="hmTtFe" id="bkmrk--3" style="--title-lines: 2;" tabindex="-1"></div></div></div></div></div></div></div></div></div>

# Reh Hat  docs on networking

https://docs.redhat.com/en/documentation/red\_hat\_enterprise\_linux/10/html/configuring\_and\_managing\_networking/index

# Configuring an Ethernet connection by using nmcli

<section class="section" id="bkmrk-2.1.%C2%A0configuring-an-">## [2.1. Configuring an Ethernet connection by using nmcli](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/configuring_and_managing_networking/configuring-an-ethernet-connection#configuring-an-ethernet-connection-by-using-nmcli)

<div class="center top initialized" id="bkmrk-copy-link" style="--_floating-content-translate: -22.46656036376953px -73px;"><div id="bkmrk-"><div aria-hidden="true" class=" ui " id="bkmrk--1"></div></div><div class=" dark " id="bkmrk-copy-link-1" role="status"><div class="section-link tooltip-content" slot="content"><span class="copy-link-text">Copy link</span></div></div></div>
If you connect a host to the network over Ethernet, you can manage the connection’s settings on the command line by using the `nmcli` utility.

**Prerequisites**

<div class="itemizedlist">- A physical or virtual Ethernet Network Interface Controller (NIC) exists in the server’s configuration.

</div>**Procedure**

<div class="orderedlist">1. List the NetworkManager connection profiles:
    
    <div class="content-code-block-container"><div class="expandable fullHeight" style="column-gap: 50px;"><div><div aria-hidden="true" id="bkmrk--3"></div></div></div></div>```plaintext
    # <strong>nmcli connection show</strong>
    NAME                UUID                                  TYPE      DEVICE
    Wired connection 1  a5eb6490-cc20-3668-81f8-0314a27f3f75  ethernet  enp1s0
    ```
    
    <div class="content-code-block-container"><div class="expandable fullHeight" id="bkmrk--4" style="column-gap: 50px;"><div id="bkmrk--5"></div><div id="bkmrk--6"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--7"><div id="bkmrk--8"></div></div></div></div>By default, NetworkManager creates a profile for each NIC in the host. If you plan to connect this NIC only to a specific network, adapt the automatically-created profile. If you plan to connect this NIC to networks with different settings, create individual profiles for each network.
2. If you want to create an additional connection profile, enter:
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--9"></div></div></div></div>```plaintext
    # <strong>nmcli connection add con-name <em><connection-name></em> ifname <em><device-name></em> type ethernet</strong>
    ```
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="  " id="bkmrk--10" style="column-gap: 50px;"><div id="bkmrk--11" tabindex="0"></div><div id="bkmrk--12"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--13"><div id="bkmrk--14"></div></div><div class=" center " id="bkmrk--15"><div id="bkmrk--16"></div></div></div></div>Skip this step to modify an existing profile.
3. Optional: Rename the connection profile:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--17"></div></div></div></div>```plaintext
    # <strong>nmcli connection modify "Wired connection 1" connection.id "Internal-LAN"</strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--18" style="column-gap: 50px;"><div id="bkmrk--19" tabindex="0"></div><div id="bkmrk--20"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--21"><div id="bkmrk--22"></div></div></div></div>On hosts with multiple profiles, a meaningful name makes it easier to identify the purpose of a profile.
4. Display the current settings of the connection profile:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--23"></div></div></div></div>```plaintext
    # <strong>nmcli connection show Internal-LAN</strong>
    ...
    connection.interface-name:     enp1s0
    connection.autoconnect:        yes
    ipv4.method:                   auto
    ipv6.method:                   auto
    ...
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--24" style="column-gap: 50px;"><div id="bkmrk--25" tabindex="0"></div><div id="bkmrk--26"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--27"><div id="bkmrk--28"></div></div></div></div>
5. Configure the IPv4 settings:
    
    <div class="itemizedlist">
    - To use DHCP, enter:
        
        <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--29"></div></div></div></div>```plaintext
        # <strong>nmcli connection modify Internal-LAN ipv4.method auto</strong>
        ```
        
        <div class="content-code-block-container"><div class="  " id="bkmrk--30" style="column-gap: 50px;"><div id="bkmrk--31" tabindex="0"></div><div id="bkmrk--32"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--33"><div id="bkmrk--34"></div></div></div></div>Skip this step if `ipv4.method` is already set to `auto` (default).
    - To set a static IPv4 address, network mask, default gateway, DNS servers, and search domain, enter:
        
        <div class="content-code-block-container" data-wrap-available="true"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--35"></div></div></div></div>```plaintext
        # <strong>nmcli connection modify Internal-LAN ipv4.method manual ipv4.addresses 192.0.2.1/24 ipv4.gateway 192.0.2.254 ipv4.dns 192.0.2.200 ipv4.dns-search example.com</strong>
        ```
        
        <div class="content-code-block-container" data-wrap-available="true"><div class="  " id="bkmrk--36" style="column-gap: 50px;"><div id="bkmrk--37" tabindex="0"></div><div id="bkmrk--38"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--39"><div id="bkmrk--40"></div></div><div class=" center " id="bkmrk--41"><div id="bkmrk--42"></div></div></div></div>
    
    </div>
6. Configure the IPv6 settings:
    
    <div class="itemizedlist">
    - To use stateless address autoconfiguration (SLAAC), enter:
        
        <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--43"></div></div></div></div>```plaintext
        # <strong>nmcli connection modify Internal-LAN ipv6.method auto</strong>
        ```
        
        <div class="content-code-block-container"><div class="  " id="bkmrk--44" style="column-gap: 50px;"><div id="bkmrk--45" tabindex="0"></div><div id="bkmrk--46"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--47"><div id="bkmrk--48"></div></div></div></div>Skip this step if `ipv6.method` is already set to `auto` (default).
    - To set a static IPv6 address, network mask, default gateway, DNS servers, and search domain, enter:
        
        <div class="content-code-block-container" data-wrap-available="true"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--49"></div></div></div></div>```plaintext
        # <strong>nmcli connection modify Internal-LAN ipv6.method manual ipv6.addresses 2001:db8:1::fffe/64 ipv6.gateway 2001:db8:1::fffe ipv6.dns 2001:db8:1::ffbb ipv6.dns-search example.com</strong>
        ```
        
        <div class="content-code-block-container" data-wrap-available="true"><div class="  " id="bkmrk--50" style="column-gap: 50px;"><div id="bkmrk--51" tabindex="0"></div><div id="bkmrk--52"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--53"><div id="bkmrk--54"></div></div><div class=" center " id="bkmrk--55"><div id="bkmrk--56"></div></div></div></div>
    
    </div>
7. To customize other settings in the profile, use the following command:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--57"></div></div></div></div>```plaintext
    # <strong>nmcli connection modify <em><connection-name></em> <em><setting></em> <em><value></em></strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--58" style="column-gap: 50px;"><div id="bkmrk--59" tabindex="0"></div><div id="bkmrk--60"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--61"><div id="bkmrk--62"></div></div></div></div>Enclose values with spaces or semicolons in quotes.
    
    For details about which settings you can modify, see the `nm-settings(5)` man page on your system.
8. Activate the profile:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--63"></div></div></div></div>```plaintext
    # <strong>nmcli connection up Internal-LAN</strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--64" style="column-gap: 50px;"><div id="bkmrk--65" tabindex="0"></div><div id="bkmrk--66"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--67"><div id="bkmrk--68"></div></div></div></div>

</div>**Verification**

<div class="orderedlist">1. Display the IP settings of the NIC:
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--69"></div></div></div></div>```plaintext
    # <strong>ip address show enp1s0</strong>
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 52:54:00:17:b8:b6 brd ff:ff:ff:ff:ff:ff
        inet 192.0.2.1/24 brd 192.0.2.255 scope global noprefixroute enp1s0
           valid_lft forever preferred_lft forever
        inet6 2001:db8:1::fffe/64 scope global noprefixroute
           valid_lft forever preferred_lft forever
    ```
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" id="bkmrk--70" style="column-gap: 50px;"><div id="bkmrk--71" tabindex="0"></div><div id="bkmrk--72"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--73"><div id="bkmrk--74"></div></div><div class=" center " id="bkmrk--75"><div id="bkmrk--76"></div></div></div></div>
2. Display the IPv4 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--77"></div></div></div></div>```plaintext
    # <strong>ip route show default</strong>
    default via 192.0.2.254 dev enp1s0 proto static metric 102
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--78" style="column-gap: 50px;"><div id="bkmrk--79" tabindex="0"></div><div id="bkmrk--80"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--81"><div id="bkmrk--82"></div></div></div></div>
3. Display the IPv6 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--83"></div></div></div></div>```plaintext
    # <strong>ip -6 route show default</strong>
    default via 2001:db8:1::fffe dev enp1s0 proto static metric 102 pref medium
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--84" style="column-gap: 50px;"><div id="bkmrk--85" tabindex="0"></div><div id="bkmrk--86"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--87"><div id="bkmrk--88"></div></div></div></div>
4. Display the DNS settings:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--89"></div></div></div></div>```plaintext
    # <strong>cat /etc/resolv.conf</strong>
    search example.com
    nameserver 192.0.2.200
    nameserver 2001:db8:1::ffbb
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--90" style="column-gap: 50px;"><div id="bkmrk--91" tabindex="0"></div><div id="bkmrk--92"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--93"><div id="bkmrk--94"></div></div></div></div>If multiple connection profiles are active at the same time, the order of `nameserver` entries depend on the DNS priority values in these profiles and the connection types.
5. Use the `ping` utility to verify that this host can send packets to other hosts:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--95"></div></div></div></div>```plaintext
    # <strong>ping <em><host-name-or-IP-address></em></strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--96" style="column-gap: 50px;"><div id="bkmrk--97" tabindex="0"></div><div id="bkmrk--98"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--99"><div id="bkmrk--100"></div></div></div></div>

</div>**Troubleshooting**

<div class="itemizedlist">- Verify that the network cable is plugged-in to the host and a switch.
- Check whether the link failure exists only on this host or also on other hosts connected to the same switch.
- Verify that the network cable and the network interface are working as expected. Perform hardware diagnosis steps and replace defective cables and network interface cards.
- If the configuration on the disk does not match the configuration on the device, starting or restarting NetworkManager creates an in-memory connection that reflects the configuration of the device. For further details and how to avoid this problem, see the Red Hat Knowledgebase solution [NetworkManager duplicates a connection after restart of NetworkManager service](https://access.redhat.com/solutions/3068421).

</div></section>

# Configuring an Ethernet connection by using nmtui

If you connect a host to an Ethernet network, you can manage the connection’s settings in a text-based user interface. Use the `nmtui` application to create new profiles and to update existing ones on a host without a graphical interface.

<div id="bkmrk-"><div aria-hidden="true" class=" ui " id="bkmrk--1"><svg viewbox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"></svg></div></div><div id="bkmrk-note"><header><div id="bkmrk-note-1"><div class="admonition_header" slot="header">Note</div></div></header><div><div>  
</div></div></div>In `nmtui`:

<div id="bkmrk-navigate-by-using-th"><div id="bkmrk-navigate-by-using-th-1"><div><div class="itemizedlist">- Navigate by using the cursor keys.
- Press a button by selecting it and hitting <kbd class="keycap">Enter</kbd>.
- Select and clear checkboxes by using <kbd class="keycap">Space</kbd>.
- To return to the previous screen, use <kbd class="keycap">ESC</kbd>.

</div></div></div><footer class="  "></footer></div>**Prerequisites**

<div class="itemizedlist" id="bkmrk-a-physical-or-virtua">- A physical or virtual Ethernet Network Interface Controller (NIC) exists in the server’s configuration.

</div>**Procedure**

<div class="orderedlist" id="bkmrk-if-you-do-not-know-t">1. If you do not know the network device name you want to use in the connection, display the available devices:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--2"></div></div></div></div>```plaintext
    # <strong>nmcli device status</strong>
    DEVICE     TYPE      STATE                   CONNECTION
    enp1s0     ethernet  unavailable             --
    ...
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--3" style="column-gap: 50px;"><div id="bkmrk--4" tabindex="0"></div><div id="bkmrk--5"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--6"><div id="bkmrk--7"></div></div></div></div>
2. Start `nmtui`:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--8"></div></div></div></div>```plaintext
    # <strong>nmtui</strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--9" style="column-gap: 50px;"><div id="bkmrk--10" tabindex="0"></div><div id="bkmrk--11"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--12"><div id="bkmrk--13"></div></div></div></div>
3. Select <span class="strong strong">**Edit a connection**</span>, and press <kbd class="keycap">Enter</kbd>.
4. Choose whether to add a new connection profile or to modify an existing one:
    
    <div class="itemizedlist">
    - To create a new profile:
        
        <div class="orderedlist">
        1. Press <span class="strong strong">**Add**</span>.
        2. Select <span class="strong strong">**Ethernet**</span> from the list of network types, and press <kbd class="keycap">Enter</kbd>.
        
        </div>
    - To modify an existing profile, select the profile from the list, and press <kbd class="keycap">Enter</kbd>.
    
    </div>
5. Optional: Update the name of the connection profile.
    
    On hosts with multiple profiles, a meaningful name makes it easier to identify the purpose of a profile.
6. If you create a new connection profile, enter the network device name into the <span class="strong strong">**Device**</span> field.
7. Depending on your environment, configure the IP address settings in the `IPv4 configuration` and `IPv6 configuration` areas accordingly. For this, press the button next to these areas, and select:
    
    <div class="itemizedlist">
    - <span class="strong strong">**Disabled**</span>, if this connection does not require an IP address.
    - <span class="strong strong">**Automatic**</span>, if a DHCP server dynamically assigns an IP address to this NIC.
    - <span class="strong strong">**Manual**</span>, if the network requires static IP address settings. In this case, you must fill further fields:
        
        <div class="orderedlist">
        1. Press <span class="strong strong">**Show**</span> next to the protocol you want to configure to display additional fields.
        2. Press <span class="strong strong">**Add**</span> next to <span class="strong strong">**Addresses**</span>, and enter the IP address and the subnet mask in Classless Inter-Domain Routing (CIDR) format.
            
            If you do not specify a subnet mask, NetworkManager sets a `/32` subnet mask for IPv4 addresses and `/64` for IPv6 addresses.
        3. Enter the address of the default gateway.
        4. Press <span class="strong strong">**Add**</span> next to <span class="strong strong">**DNS servers**</span>, and enter the DNS server address.
        5. Press <span class="strong strong">**Add**</span> next to <span class="strong strong">**Search domains**</span>, and enter the DNS search domain.
        
        </div>
    
    </div>**Figure 2.1. Example of an Ethernet connection with static IP address settings**
    
    <div class="figure" id="bkmrk--14"><div class="figure-contents"><div class="mediaobject"><div class="image-block">[ ![Static IP address settings in `nmtui`](https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-10-Configuring_and_managing_networking-en-US/images/31ecc89b0c0aad7279a15f02132175ae/nmtui-ethernet-static-IP.png) ](https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-10-Configuring_and_managing_networking-en-US/images/31ecc89b0c0aad7279a15f02132175ae/nmtui-ethernet-static-IP.png "Static IP address settings in `nmtui`")</div></div></div></div>
8. Press <span class="strong strong">**OK**</span> to create and automatically activate the new connection.
9. Press <span class="strong strong">**Back**</span> to return to the main menu.
10. Select <span class="strong strong">**Quit**</span>, and press <kbd class="keycap">Enter</kbd> to close the `nmtui` application.

</div>**Verification**

<div class="orderedlist" id="bkmrk-display-the-ip-setti">1. Display the IP settings of the NIC:
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--16"></div></div></div></div>```plaintext
    # <strong>ip address show enp1s0</strong>
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 52:54:00:17:b8:b6 brd ff:ff:ff:ff:ff:ff
        inet 192.0.2.1/24 brd 192.0.2.255 scope global noprefixroute enp1s0
           valid_lft forever preferred_lft forever
        inet6 2001:db8:1::fffe/64 scope global noprefixroute
           valid_lft forever preferred_lft forever
    ```
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" id="bkmrk--17" style="column-gap: 50px;"><div id="bkmrk--18" tabindex="0"></div><div id="bkmrk--19"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--20"><div id="bkmrk--21"></div></div><div class=" center " id="bkmrk--22"><div id="bkmrk--23"></div></div></div></div>
2. Display the IPv4 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--24"></div></div></div></div>```plaintext
    # <strong>ip route show default</strong>
    default via 192.0.2.254 dev enp1s0 proto static metric 102
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--25" style="column-gap: 50px;"><div id="bkmrk--26" tabindex="0"></div><div id="bkmrk--27"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--28"><div id="bkmrk--29"></div></div></div></div>
3. Display the IPv6 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--30"></div></div></div></div>```plaintext
    # <strong>ip -6 route show default</strong>
    default via 2001:db8:1::fffe dev enp1s0 proto static metric 102 pref medium
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--31" style="column-gap: 50px;"><div id="bkmrk--32" tabindex="0"></div><div id="bkmrk--33"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--34"><div id="bkmrk--35"></div></div></div></div>
4. Display the DNS settings:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--36"></div></div></div></div>```plaintext
    # <strong>cat /etc/resolv.conf</strong>
    search example.com
    nameserver 192.0.2.200
    nameserver 2001:db8:1::ffbb
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--37" style="column-gap: 50px;"><div id="bkmrk--38" tabindex="0"></div><div id="bkmrk--39"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--40"><div id="bkmrk--41"></div></div></div></div>If multiple connection profiles are active at the same time, the order of `nameserver` entries depend on the DNS priority values in these profiles and the connection types.
5. Use the `ping` utility to verify that this host can send packets to other hosts:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--42"></div></div></div></div>```plaintext
    # <strong>ping <em><host-name-or-IP-address></em></strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--43" style="column-gap: 50px;"><div id="bkmrk--44" tabindex="0"></div><div id="bkmrk--45"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--46"><div id="bkmrk--47"></div></div></div></div>

</div>**Troubleshooting**

<div class="itemizedlist" id="bkmrk-verify-that-the-netw">- Verify that the network cable is plugged-in to the host and a switch.
- Check whether the link failure exists only on this host or also on other hosts connected to the same switch.
- Verify that the network cable and the network interface are working as expected. Perform hardware diagnosis steps and replace defective cables and network interface cards.
- If the configuration on the disk does not match the configuration on the device, starting or restarting NetworkManager creates an in-memory connection that reflects the configuration of the device. For further details and how to avoid this problem, see the Red Hat Knowledgebase solution [NetworkManager duplicates a connection after restart of NetworkManager service](https://access.redhat.com/solutions/3068421).

</div>

# Configuring an Ethernet connection by using control-center

<div class="center top initialized" id="bkmrk-copy-link" style="--_floating-content-translate: -22.46668243408203px -73px;"><div id="bkmrk-"><div aria-hidden="true" class=" ui " id="bkmrk--1"></div></div><div class=" dark " id="bkmrk-copy-link-1" role="status"><div class="section-link tooltip-content" slot="content"><span class="copy-link-text">Copy link</span></div></div></div>
If you connect a host to the network over Ethernet, you can manage the connection’s settings with a graphical interface by using the GNOME Settings menu.

Note that `control-center` does not support as many configuration options as the `nmcli` utility.

**Prerequisites**

<div class="itemizedlist" id="bkmrk-a-physical-or-virtua">- A physical or virtual Ethernet Network Interface Controller (NIC) exists in the server’s configuration.
- GNOME is installed.

</div>**Procedure**

<div class="orderedlist" id="bkmrk-press-the-super-key%2C">1. Press the <kbd class="keycap">Super</kbd> key, enter `Settings`, and press <kbd class="keycap">Enter</kbd>.
2. Select <span class="strong strong">**Network**</span> in the navigation on the left.
3. Choose whether to add a new connection profile or to modify an existing one:
    
    <div class="itemizedlist">
    - To create a new profile, click the <span class="guibutton">+</span> button next to the <span class="strong strong">**Ethernet**</span> entry.
    - To modify an existing profile, click the gear icon next to the profile entry.
    
    </div>
4. Optional: On the <span class="strong strong">**Identity**</span> tab, update the name of the connection profile.
    
    On hosts with multiple profiles, a meaningful name makes it easier to identify the purpose of a profile.
5. Depending on your environment, configure the IP address settings on the <span class="strong strong">**IPv4**</span> and <span class="strong strong">**IPv6**</span> tabs accordingly:
    
    <div class="itemizedlist">
    - To use DHCP or IPv6 stateless address autoconfiguration (SLAAC), select `Automatic (DHCP)` as method (default).
    - To set a static IP address, network mask, default gateway, DNS servers, and search domain, select `Manual` as method, and fill the fields on the tabs:
        
        <div class="informalfigure"><div class="mediaobject"><div class="image-block">[ ![Static IP address settings in `control-center`](https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-10-Configuring_and_managing_networking-en-US/images/b59bc0170ee2d2d60b426af3bc1b4d07/IP-settings-gnome-settings.png) ](https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-10-Configuring_and_managing_networking-en-US/images/b59bc0170ee2d2d60b426af3bc1b4d07/IP-settings-gnome-settings.png "Static IP address settings in `control-center`")</div></div></div>
    
    </div>
6. Depending on whether you add or modify a connection profile, click the <span class="guibutton">Add</span> or <span class="guibutton">Apply</span> button to save the connection.
    
    The GNOME `control-center` automatically activates the connection.

</div>**Verification**

<div class="orderedlist" id="bkmrk-display-the-ip-setti">1. Display the IP settings of the NIC:
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--4"></div></div></div></div>```plaintext
    # <strong>ip address show enp1s0</strong>
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 52:54:00:17:b8:b6 brd ff:ff:ff:ff:ff:ff
        inet 192.0.2.1/24 brd 192.0.2.255 scope global noprefixroute enp1s0
           valid_lft forever preferred_lft forever
        inet6 2001:db8:1::fffe/64 scope global noprefixroute
           valid_lft forever preferred_lft forever
    ```
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" id="bkmrk--5" style="column-gap: 50px;"><div id="bkmrk--6" tabindex="0"></div><div id="bkmrk--7"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--8"><div id="bkmrk--9"></div></div><div class=" center " id="bkmrk--10"><div id="bkmrk--11"></div></div></div></div>
2. Display the IPv4 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--12"></div></div></div></div>```plaintext
    # <strong>ip route show default</strong>
    default via 192.0.2.254 dev enp1s0 proto static metric 102
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--13" style="column-gap: 50px;"><div id="bkmrk--14" tabindex="0"></div><div id="bkmrk--15"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--16"><div id="bkmrk--17"></div></div></div></div>
3. Display the IPv6 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--18"></div></div></div></div>```plaintext
    # <strong>ip -6 route show default</strong>
    default via 2001:db8:1::fffe dev enp1s0 proto static metric 102 pref medium
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--19" style="column-gap: 50px;"><div id="bkmrk--20" tabindex="0"></div><div id="bkmrk--21"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--22"><div id="bkmrk--23"></div></div></div></div>
4. Display the DNS settings:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--24"></div></div></div></div>```plaintext
    # <strong>cat /etc/resolv.conf</strong>
    search example.com
    nameserver 192.0.2.200
    nameserver 2001:db8:1::ffbb
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--25" style="column-gap: 50px;"><div id="bkmrk--26" tabindex="0"></div><div id="bkmrk--27"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--28"><div id="bkmrk--29"></div></div></div></div>If multiple connection profiles are active at the same time, the order of `nameserver` entries depend on the DNS priority values in these profiles and the connection types.
5. Use the `ping` utility to verify that this host can send packets to other hosts:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--30"></div></div></div></div>```plaintext
    # <strong>ping <em><host-name-or-IP-address></em></strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--31" style="column-gap: 50px;"><div id="bkmrk--32" tabindex="0"></div><div id="bkmrk--33"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--34"><div id="bkmrk--35"></div></div></div></div>

</div>**Troubleshooting steps**

<div class="itemizedlist" id="bkmrk-verify-that-the-netw">- Verify that the network cable is plugged-in to the host and a switch.
- Check whether the link failure exists only on this host or also on other hosts connected to the same switch.
- Verify that the network cable and the network interface are working as expected. Perform hardware diagnosis steps and replace defective cables and network interface cards.
- If the configuration on the disk does not match the configuration on the device, starting or restarting NetworkManager creates an in-memory connection that reflects the configuration of the device. For further details and how to avoid this problem, see the Red Hat Knowledgebase solution [NetworkManager duplicates a connection after restart of NetworkManager service](https://access.redhat.com/solutions/3068421).

</div>

# Configuring an Ethernet connection with a static IP address by using nmstatectl with an interface name

<div class="center top initialized" id="bkmrk-copy-link" style="--_floating-content-translate: -22.46668243408203px -73px;"><div id="bkmrk-"><div aria-hidden="true" class=" ui " id="bkmrk--1"></div></div><div class=" dark " id="bkmrk-copy-link-1" role="status"><div class="section-link tooltip-content" slot="content"></div></div></div>
You can use the declarative Nmstate API to configure an Ethernet connection with static IP addresses, gateways, and DNS settings, and assign them to a specified interface name. Nmstate ensures that the result matches the configuration file or rolls back the changes.

**Prerequisites**

<div class="itemizedlist" id="bkmrk-a-physical-or-virtua">- A physical or virtual Ethernet Network Interface Controller (NIC) exists in the server’s configuration.
- The `nmstate` package is installed.

</div>**Procedure**

<div class="orderedlist" id="bkmrk-create-a-yaml-file%2C-">1. Create a YAML file, for example `~/create-ethernet-profile.yml`, with the following content:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--3"></div></div></div></div>```yaml
    ---
    interfaces:
    - name: enp1s0
      type: ethernet
      state: up
      ipv4:
        enabled: true
        address:
        - ip: 192.0.2.1
          prefix-length: 24
        dhcp: false
      ipv6:
        enabled: true
        address:
        - ip: 2001:db8:1::1
          prefix-length: 64
        autoconf: false
        dhcp: false
    routes:
      config:
      - destination: 0.0.0.0/0
        next-hop-address: 192.0.2.254
        next-hop-interface: enp1s0
      - destination: ::/0
        next-hop-address: 2001:db8:1::fffe
        next-hop-interface: enp1s0
    dns-resolver:
      config:
        search:
        - example.com
        server:
        - 192.0.2.200
        - 2001:db8:1::ffbb
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--4" style="column-gap: 50px;"><div id="bkmrk--5" tabindex="0"></div><div id="bkmrk--6"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--7"><div id="bkmrk--8"></div></div></div></div>These settings define an Ethernet connection profile for the `enp1s0` device with the following settings:
    
    <div class="itemizedlist">
    - A static IPv4 address - `192.0.2.1` with the `/24` subnet mask
    - A static IPv6 address - `2001:db8:1::1` with the `/64` subnet mask
    - An IPv4 default gateway - `192.0.2.254`
    - An IPv6 default gateway - `2001:db8:1::fffe`
    - An IPv4 DNS server - `192.0.2.200`
    - An IPv6 DNS server - `2001:db8:1::ffbb`
    - A DNS search domain - `example.com`
    
    </div>
2. Optional: You can define the `identifier: mac-address` and `mac-address: <span class="emphasis"><em><mac_address></em></span>` properties in the `interfaces` property to identify the network interface card by its MAC address instead of its name, for example:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--9"></div></div></div></div>```yaml
    ---
    interfaces:
    - name: <em><profile_name></em>
      type: ethernet
      <strong>identifier: mac-address</strong>
      <strong>mac-address: <em><mac_address></em></strong>
      ...
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--10" style="column-gap: 50px;"><div id="bkmrk--11" tabindex="0"></div><div id="bkmrk--12"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--13"><div id="bkmrk--14"></div></div></div></div>
3. Apply the settings to the system:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--15"></div></div></div></div>```plaintext
    # <strong>nmstatectl apply ~/create-ethernet-profile.yml</strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--16" style="column-gap: 50px;"><div id="bkmrk--17" tabindex="0"></div><div id="bkmrk--18"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--19"><div id="bkmrk--20"></div></div></div></div>

</div>**Verification**

<div class="orderedlist" id="bkmrk-display-the-current-">1. Display the current state in YAML format:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--21"></div></div></div></div>```plaintext
    # <strong>nmstatectl show enp1s0</strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--22" style="column-gap: 50px;"><div id="bkmrk--23" tabindex="0"></div><div id="bkmrk--24"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--25"><div id="bkmrk--26"></div></div></div></div>
2. Display the IP settings of the NIC:
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--27"></div></div></div></div>```plaintext
    # <strong>ip address show enp1s0</strong>
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 52:54:00:17:b8:b6 brd ff:ff:ff:ff:ff:ff
        inet 192.0.2.1/24 brd 192.0.2.255 scope global noprefixroute enp1s0
           valid_lft forever preferred_lft forever
        inet6 2001:db8:1::fffe/64 scope global noprefixroute
           valid_lft forever preferred_lft forever
    ```
    
    <div class="content-code-block-container" data-wrap-available="true"><div class="expandable truncated" id="bkmrk--28" style="column-gap: 50px;"><div id="bkmrk--29" tabindex="0"></div><div id="bkmrk--30"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--31"><div id="bkmrk--32"></div></div><div class=" center " id="bkmrk--33"><div id="bkmrk--34"></div></div></div></div>
3. Display the IPv4 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--35"></div></div></div></div>```plaintext
    # <strong>ip route show default</strong>
    default via 192.0.2.254 dev enp1s0 proto static metric 102
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--36" style="column-gap: 50px;"><div id="bkmrk--37" tabindex="0"></div><div id="bkmrk--38"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--39"><div id="bkmrk--40"></div></div></div></div>
4. Display the IPv6 default gateway:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--41"></div></div></div></div>```plaintext
    # <strong>ip -6 route show default</strong>
    default via 2001:db8:1::fffe dev enp1s0 proto static metric 102 pref medium
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--42" style="column-gap: 50px;"><div id="bkmrk--43" tabindex="0"></div><div id="bkmrk--44"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--45"><div id="bkmrk--46"></div></div></div></div>
5. Display the DNS settings:
    
    <div class="content-code-block-container"><div class="expandable truncated" style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--47"></div></div></div></div>```plaintext
    # <strong>cat /etc/resolv.conf</strong>
    search example.com
    nameserver 192.0.2.200
    nameserver 2001:db8:1::ffbb
    ```
    
    <div class="content-code-block-container"><div class="expandable truncated" id="bkmrk--48" style="column-gap: 50px;"><div id="bkmrk--49" tabindex="0"></div><div id="bkmrk--50"></div></div><div class="content-code-block-container-actions"><div class=" center " id="bkmrk--51"><div id="bkmrk--52"></div></div></div></div>If multiple connection profiles are active at the same time, the order of `nameserver` entries depend on the DNS priority values in these profiles and the connection types.
6. Use the `ping` utility to verify that this host can send packets to other hosts:
    
    <div class="content-code-block-container"><div class="  " style="column-gap: 50px;"><div tabindex="0"><div aria-hidden="true" id="bkmrk--53"></div></div></div></div>```plaintext
    # <strong>ping <em><host-name-or-IP-address></em></strong>
    ```
    
    <div class="content-code-block-container"><div class="  " id="bkmrk--54" style="column-gap: 50px;"><div id="bkmrk--55" tabindex="0"></div><div id="bkmrk--56"></div></div></div>

</div>