如何讓網路管理器在新安裝的 Ubuntu 22.04 中使用有線連接

如何讓網路管理器在新安裝的 Ubuntu 22.04 中使用有線連接
nmcli con up Wired\ connection\ 1 
Error: Connection activation failed: No suitable device found for this connection
(device eno1 not available because profile is not compatible with device (permanent MAC address doesn't match)).

$ ping google.com
PING google.com (142.251.33.14) 56(84) bytes of data.
64 bytes from dfw25s44-in-f14.1e100.net (142.251.33.14): icmp_seq=1 ttl=58 time=28.9 ms
64 bytes from dfw25s44-in-f14.1e100.net (142.251.33.14): icmp_seq=2 ttl=58 time=32.9 ms

$ ping -c4 archive.canonical.com
PING archive.canonical.com (185.125.188.12) 56(84) bytes of data.
64 bytes from canonical-archive-0.canonical.com (185.125.188.12): icmp_seq=1 ttl=47 time=121 ms
64 bytes from canonical-archive-0.canonical.com (185.125.188.12): icmp_seq=2 ttl=47 time=122 ms

$ ping6 -c4 archive.canonical.com
$ ping6: connect: Network is unreachable

我嘗試過sudo apt-get updatesudo apt-get upgrade但沒有解決問題。

乙太網路控制器:英特爾公司乙太網路連接 I217-LM(修訂版 04)

答案1

nmcli con up Wired\ connection\ 1 
Error: Connection activation failed: No suitable device found for this connection
(device eno1 not available because profile is not compatible with device (permanent MAC address doesn't match)).

屬性ethernet.mac-address好像不對啊

nmcli connection show "$PROFILE"使用或--檢查設定檔的內容,nmcli -o connection show "$PROFILE"其中「$PROFILE」是'Wired connection 1'

然後調整ethernet.mac-address到合適的值。可能,只需取消設定並設定connection.interface-name即可。

nmcli connection modify "Wired connection 1" ethernet.mac-address '' connection.interface-name eno1

然後使用 重新啟動設定檔nmcli connection up Wired\ connection\ 1

請參閱man nm-settings參考資料 了解連線設定檔屬性的含義。

相關內容