WEBVTT

00:00.170 --> 00:00.830
Hey, guys.

00:00.830 --> 00:06.200
This video is an update to the latest version of the Ubuntu server released in 2023.

00:06.620 --> 00:11.660
In the above video we saw how to set up a static IP address in the Ubuntu server.

00:12.170 --> 00:14.900
But the same method doesn't work in 2023.

00:14.930 --> 00:18.440
We need to follow other steps to set up a static IP address.

00:18.920 --> 00:23.510
The first step that you need to perform is you need to find the default gateway address.

00:23.900 --> 00:30.980
So to find the default gateway address, you just need to type the command as IP route list.

00:31.490 --> 00:35.150
This will give you the default gateway and network interface name.

00:35.510 --> 00:36.920
Note it down.

00:37.510 --> 00:42.340
After that you need to go to the directory netplan with the following root slash.

00:42.810 --> 00:43.960
Slash netplan.

00:44.350 --> 00:49.690
In this directory you will find a file zero zero installer Config.yaml.

00:50.140 --> 00:53.890
In this file you need to configure the static IP address.

00:54.250 --> 01:01.690
So first, open the file with VI editor with the command VI zero zero installer config.yaml.

01:03.990 --> 01:08.130
Now you need to add the following information in the file one by one.

01:08.490 --> 01:10.950
First type network Colon.

01:11.340 --> 01:13.770
Then type version colon two.

01:14.190 --> 01:16.800
Then renderer colon networked.

01:17.220 --> 01:20.820
After that type Ethernets and network interface name.

01:21.180 --> 01:24.840
Then set dhcp four and dhcp six to false.

01:25.230 --> 01:29.220
Then set the IP address and format as shown below.

01:29.610 --> 01:31.620
Then set the name servers.

01:32.040 --> 01:35.310
You can set the same IP as the name server here.

01:35.340 --> 01:43.740
And finally set the route with routes colon and hyphen to colon default via colon and IP address.

01:59.320 --> 02:05.590
After adding the information press escape key, then press Ctrl shift colon and type WQ and logical

02:05.590 --> 02:08.320
not for writing the information to the file.

02:08.680 --> 02:11.530
This will update the file with new information.

02:11.860 --> 02:17.050
After writing the information to the file, Now it's time to apply the changes to the network.

02:17.410 --> 02:21.070
So just type the following command Netplan apply.

02:21.460 --> 02:24.670
This will apply the new network settings to your server.

02:26.210 --> 02:29.870
You can view the new static IP address with ifconfig command.

02:31.510 --> 02:34.420
And can also test the network with the ping command.

02:36.910 --> 02:42.790
So this is how you can set up a static IP address in the latest version released in 2023.
