User Tools

Site Tools


wiki:nmcli_network_tool

Table of Contents

nmcli Network Tool

May 2021

Overview


A customer had made lots of changes to the network interfaces on a unit and was having a lot of issues, performing an ip a displayed the interface names and IP addresses, and this looked normal.

However, using the nmcli tool told a slightly different story.


nmcli

While nmcli may have many uses, I want to focus on just one. This is not a how to fix your network, this is just highlighting a good use for nmcli. Running nmcli displayed the following output:

nmcli  con


NAME  UUID                                  TYPE      DEVICE
eth0  d9ced338-a402-60eb-c131-0fd3ab4b5ab7  ethernet  eth5
eth1  84d43311-57c8-8986-f205-9c78cd6ef5d2  ethernet  eth4
eth2  ee7189fe-a32a-4873-bf26-145d4e19a51d  ethernet  eth0
eth4  3a73717e-65ab-93e8-b518-24f5af32dc0d  ethernet  eth1
eth5  841334f5-7d18-33f9-86f1-84cee61678a0  ethernet  eth3
eth3  c5ca8081-6db2-4602-4b46-d771f4330a6d  ethernet  --

If you look at the above output, you can see that the NAME and DEVICE are not aligned. eth0 is listed as device eth5, in fact none of interface names and devices are aligned.

The problem was in the ifcfg-ethx files, and once this was fixed (the eth name and mac address in each file was incorrect).

After fixing this issue, running nmcli again gave the following output:

nmcli  con


NAME  UUID                                  TYPE      DEVICE
eth0  d9ced338-a402-60eb-c131-0fd3ab4b5ab7  ethernet  eth5
eth1  84d43311-57c8-8986-f205-9c78cd6ef5d2  ethernet  eth4
eth2  ee7189fe-a32a-4873-bf26-145d4e19a51d  ethernet  eth0
eth4  3a73717e-65ab-93e8-b518-24f5af32dc0d  ethernet  eth1
eth5  841334f5-7d18-33f9-86f1-84cee61678a0  ethernet  eth3
eth3  c5ca8081-6db2-4602-4b46-d771f4330a6d  ethernet  --

Now that the NAME and DEVICE are aligned, everything started working.

wiki/nmcli_network_tool.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1