← Back to list

Ubuntu local networking — part 1

Quick reference notes to setup a static interface with Network Manager CLI (nmcli) on Ubuntu 22.04. Additionally, a brief review of how to…

Dustin Hammond · 2024-11-20 19:47 · 0 claps · 2.3 min read
#ethtools #nmcli #ubuntu #networking #linux
Open on Medium ↗
Wiki topics: 🔓 · Open Source

Ubuntu local networking — part 1

Quick reference notes to setup a static interface with Network Manager CLI (nmcli) on Ubuntu 22.04. Additionally, a brief review of how to inspect your network interface a bit deeper using tools “nmcli” and “ethtool”.

nmcli c m "Profile 1" ipv4.addresses 192.168.200.15/25
nmcli c m "Profile 1" ipv4.gateway 192.168.200.1
nmcli c m "Profile 1" ipv4.dns "1.1.1.1,9.9.9.9"
nmcli c m "Profile 1" ipv4.method manual
nmcli c down "Profile 1"
nmcli c up "Profile 1"

Pretty straight forward when you look at it together. Consider this page just a quick reference for this information.

The ipv4.method has an option of either “manual” or “auto”. Auto of course will be setting things to pick up a DHCP lease from a local DHCP server.

The Network Manager CLI allows you to use representative letters in place of having to type out the full command.

  • c = “connection”
  • m = “modify”
  • d = “device”

So if you want to see the device types you have available to you on your system:

$ nmcli d s
DEVICE           TYPE      STATE                   CONNECTION
eno1             ethernet  connected               Profile 1
br-9e60bdbdb69b  bridge    connected (externally)  br-9e60bdbdb69b
docker0          bridge    connected (externally)  docker0
veth03ccf7b      ethernet  unmanaged               --
veth8aa7bfc      ethernet  unmanaged               --
lo               loopback  unmanaged               --

In this example, I have an “onboard” network interface /ethernet port. The naming convention of “eno” represents such an interface that is integrated with the motherboard. This is a result of something called “Predictable Network Interface Names” and is a standard configured on newer Linux distributions.

The number represents the “index” value (array position) and in this case, 1 is the assigned value. This is the “first” detected” network interface (and the only interface on this system). Different from the programming world however, our interface in this case is not starting with the index position of “0”. It is possible that some firmware may name such interfaces beginning with 0 however.

Another cool tool you can use to look at more details surrounding the interface, including the firmware versions, the bus information, and other features it might support, you can install ethtool.

General information:

$ ethtool eno1
Settings for eno1:
 Supported ports: [ TP ]
 Supported link modes:   10baseT/Half 10baseT/Full
                         100baseT/Half 100baseT/Full
                         1000baseT/Full
 Supported pause frame use: Symmetric Receive-only
 Supports auto-negotiation: Yes
 Supported FEC modes: Not reported
 Advertised link modes:  10baseT/Half 10baseT/Full
                         100baseT/Half 100baseT/Full
                         1000baseT/Full
 Advertised pause frame use: Symmetric Receive-only
 Advertised auto-negotiation: Yes
 Advertised FEC modes: Not reported
 Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                      100baseT/Half 100baseT/Full
                                      1000baseT/Full
 Link partner advertised pause frame use: No
 Link partner advertised auto-negotiation: Yes
 Link partner advertised FEC modes: Not reported
 Speed: 1000Mb/s
 Duplex: Full
 Auto-negotiation: on
 Port: Twisted Pair
 PHYAD: 1
 Transceiver: internal
 MDI-X: off (auto)
netlink error: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
 Link detected: yes

Driver information:

$ ethtool -i eno1
driver: e1000e
version: 6.8.0-45-generic
firmware-version: 0.5-4
expansion-rom-version:
bus-info: 0000:00:1f.6
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes

Traffic and general statistics:

ethtool -S eno1
NIC statistics:
     rx_packets: 1138567353
     tx_packets: 9571929
     rx_bytes: 282910186428
     tx_bytes: 2291760182
     rx_broadcast: 2522910
     tx_broadcast: 1015281
     rx_multicast: 1333825
     tx_multicast: 36288
... (truncated) ...
     dropped_smbus: 33
     rx_dma_failed: 0
     tx_dma_failed: 0
     rx_hwtstamp_cleared: 0
     uncorr_ecc_errors: 0
     corr_ecc_errors: 0
     tx_hwtstamp_timeouts: 0
     tx_hwtstamp_skipped: 0

Just some quick ways to inspect your network interface and also configure it on Linux.

Additionally, you can configure the network interface further such as

  • Changing then interface name to your liking
  • Modifying Wake-On LAN
  • Modifying duplex/speed settings

… and more.


메타데이터
post_id
531e6cfde5f5
slug
ubuntu-local-networking-part-1-531e6cfde5f5
url
https://medium.com/@dhammond_53708/ubuntu-local-networking-part-1-531e6cfde5f5
canonical_url
https://medium.com/@dhammond_53708/ubuntu-local-networking-part-1-531e6cfde5f5
author_url
https://medium.com/@dhammond_53708
status
ok
fetched_at
2026-06-26 21:52:29