# Nmcli "unknown connection"

**URL:** <https://forums.rockylinux.org/t/nmcli-unknown-connection/17152>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [January 12, 2025, 8:00pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152 "2025-01-12T20:00:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrankCox](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/frankcox/32/1572_2.png) [@FrankCox](https://forums.rockylinux.org/u/FrankCox)\
**Post date:** [January 12, 2025, 8:00pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/1 "2025-01-12T20:00:59Z")

</div>

Can anyone tell me why this doesn’t work?

nmcli connection modify eno1 ipv4.gateway “192.168.0.1”  
Error: unknown connection ‘eno1’.

nmcli connection show  
NAME UUID TYPE DEVICE  
Wired connection 1 81222133-5786-357e-bda7-eea86655800c ethernet eno1  
lo 9df72730-213d-4e0c-972b-94e21fcda5fa loopback lo

This worked fine in el8 but doesn’t in el9 and I have no idea why since the connection exists as shown.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [January 12, 2025, 8:14pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/2 "2025-01-12T20:14:21Z")

</div>

Are you sure ‘eno1’ is a connection, or is it a device?

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [January 12, 2025, 8:39pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/3 "2025-01-12T20:39:35Z")

</div>

You will need to do it by the device name:

```auto
nmcli conn modify "Wired connection 1" ipv4.gateway "192.168.0.1"

```

alternatively, also change the name of the connection from “Wired connection 1” to let’s say “eno1”.

Working example:

```auto
nmcli conn show
NAME UUID TYPE DEVICE    
Auto WLAN df6a3ebb-23de-49c3-b352-f677df2eb59f wifi wlp0s20f3 

nmcli conn show wlp0s20f3
Error: wlp0s20f3 - no such connection profile.

nmcli conn show "Auto WLAN"
connection.id: Auto WLAN
connection.uuid: df6a3ebb-23de-49c3-b352-f677df2eb59f

```

---

<div class="post-metadata">

**Author:** ![FrankCox](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/frankcox/32/1572_2.png) [@FrankCox](https://forums.rockylinux.org/u/FrankCox)\
**Post date:** [January 12, 2025, 9:25pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/4 "2025-01-12T21:25:17Z")

</div>

And there’s the answer!

Thank you ever so much, guys!

Sometimes I apparently can’t see what I’m looking at any more. 🙂

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [January 13, 2025, 10:11am UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/5 "2025-01-13T10:11:40Z")

</div>

> [@iwalker](#):
>
> ```auto
> nmcli conn show wlp0s20f3
> Error: wlp0s20f3 - no such connection profile.
> 
> nmcli conn show "Auto WLAN"
> connection.id: Auto WLAN
> connection.uuid: df6a3ebb-23de-49c3-b352-f677df2eb59f
> 
> ```

I do predict:

```auto
nmcli conn show df6a3ebb-23de-49c3-b352-f677df2eb59f
connection.id: Auto WLAN
connection.uuid: df6a3ebb-23de-49c3-b352-f677df2eb59f

```

* * *

> [@FrankCox](#):
>
> This worked fine in el8 but doesn’t in el9 and I have no idea why since the connection exists as shown.

What was the _name of connection_ in the el8 machine?

* * *

NetworkManager does have some default behaviour. If on boot (or hot-plug) it sees a _device_ that has no _connection_, then it will create on the fly a connection that uses DHCP, has name like “Wired connection _N_”, and is not stored to files.

The Rocky installer, if it explicitly creates a connection that is stored to file, does use name of device as name of connection. It does also set `802-3-ethernet.mac-address` and does not set `connection.interface-name` – the connection is used for device that has said MAC address.

If you create connection manually (with `nmcli`), then you have to set `connection.interface-name`. (That can be changed later.) Binding by ifname is ok as long as ifname is persistent.

---

<div class="post-metadata">

**Author:** ![FrankCox](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/frankcox/32/1572_2.png) [@FrankCox](https://forums.rockylinux.org/u/FrankCox)\
**Post date:** [January 13, 2025, 4:19pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/6 "2025-01-13T16:19:45Z")

</div>

The name of the connection on el8 was apparently eno1 since the command line I posted was part of a bash script that worked on el8 and stopped working on el9.

When I set up this machine (and, I guess, the el8 machine) the installer grabbed an ip address from my dhcp server during the installation, and after I did the initial installation I used nmtui to change the connection from dchp to a manually entered ip address.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [March 14, 2025, 4:20pm UTC](https://forums.rockylinux.org/t/nmcli-unknown-connection/17152/7 "2025-03-14T16:20:43Z")

</div>

Closed on March 14, 2025, 4:20pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
