# 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>