Comments on: How to Configure Static IP Address on Ubuntu 22.04 https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/ How to guide for System Administrator's and Developers Fri, 23 Sep 2022 10:14:16 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Luuk https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64909 Fri, 23 Sep 2022 10:14:16 +0000 https://tecadmin.net/?p=29160#comment-64909 **networkctl list**
IDX LINK TYPE OPERATIONAL SETUP
1 Io loopback carrier unmanaged
2 eth0 ether routable configured

**route**
Destination Gateway Genmask ….. iface
default 192.168.178.1 0.0.0.0 …… eth0
192.168.178.0 0.0.0.0 255.255.255.0 …… eth0

**/etc/netplan/000-installer-config.yaml**
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
– 192.168.178.43/24
nameservers:
addresses: [8.8.8.8]
routes:
– to: default
via: 192.168.178.1

After this `ip-a` confirms i have ip address 192.168.178.43, but `ping -4 192.168.178.1` says: Destination Host Unreachable

Any ideas on how to change? I only have CLI, no GUI running

]]>
By: Brad https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64843 Mon, 05 Sep 2022 09:03:45 +0000 https://tecadmin.net/?p=29160#comment-64843 Oh man bring back /etc/network/interfaces

]]>
By: Robert https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64767 Tue, 23 Aug 2022 23:48:29 +0000 https://tecadmin.net/?p=29160#comment-64767 If you use the GUI, you need to disable and then enable the connection. Just clicking on ‘Apply’ doesn’t change anything.

]]>
By: ZarxAarox https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64405 Wed, 29 Jun 2022 17:13:30 +0000 https://tecadmin.net/?p=29160#comment-64405 I am getting an error:
Error in network definition expected mapping (check indentation) network:

Any help would be great!

]]>
By: Rahul https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64317 Thu, 16 Jun 2022 06:05:39 +0000 https://tecadmin.net/?p=29160#comment-64317 Hi ELM,

I have again verified the configuration file and it works fine for me. Make sure that JSON is properly formatted and any extra or less space may cause syntax issues.

]]>
By: ELM https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64311 Wed, 15 Jun 2022 13:38:22 +0000 https://tecadmin.net/?p=29160#comment-64311 When I set
– to: default
via: 192.168.1.1
I get an error : could not find expected ‘-‘ before via
and when I add this ‘-‘ before via, then I get : error in network definition: global unicst route must include both ‘to’ and ‘via’ IP.

That’s a nightmarre to configure a simple eth0 using CLI.

]]>
By: Rahul https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64005 Wed, 04 May 2022 05:20:29 +0000 https://tecadmin.net/?p=29160#comment-64005 Thanks, Ken, article is updated accordingly.

]]>
By: Rahul https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-64004 Wed, 04 May 2022 05:20:06 +0000 https://tecadmin.net/?p=29160#comment-64004 Thanks, Passerby, gateway4 works but as its deprecated, I have updated the article to routes.

]]>
By: Ken https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-63999 Mon, 02 May 2022 19:11:26 +0000 https://tecadmin.net/?p=29160#comment-63999 It is warning that gateway4 is depracated and default routes should be used instead.

]]>
By: Passerby https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comment-63998 Mon, 02 May 2022 16:20:44 +0000 https://tecadmin.net/?p=29160#comment-63998 gateway4: is no longer allowed as an option in Ubuntu 22.04

Now requires

routes:
– to: default
via: 192.168.1.1

]]>