- So for the lab solution,
I'm going to use Santo S.
For the simple reason
that we have already seen
how to to use Net plan
with System D, Network D
to set static IP addresses on Ubuntu.
Here is the the network manager approach
and for a change I wanna use NMCLI
just to show you
that it doesn't have to be this scary.
As I told you before on the exam
I don't recommend using NMCLI on the exam.
You should use NMTUI,
which is much more intuitive.
But for now NMCLI connection,
I'm going to to create a connection.
So connection allows me to do what, we have
add and clone and delete and down
and edit and modify.
Can we get there through modify?
So I'm modifying ENS 33
and oh boy, display all 296 possibilities.
Yeah, I wanna see all of them.
Yes. So give you some insight
in the parameters that are available.
Well, obviously what we need is an IPV 4 dot something.
So I'm going to quit out these options
and I'm going to use IPV 4 DEP DEP
so that we can see a reasonable amount of options.
So what do we need?
IPV 4 four method
and this method is going to be manual.
That's an important one.
If you don't set it to manual, it'll still be automatic
and it might fill.
The next thing we need is the, the address.
So IPV 4 addresses and I'm setting it
to 192, 168, 29, 50/24.
Then what else do we need?
Well, we need gateway.
So IPV 4.gateway 192, 168, 29. two.
And, is there anything else that we need?
Well, probably an IPV 4.DNS.
And let's also set that to 192, 168, 29.2.
pressing enter, and there we can see the result.
Now can we, I'm using IPA
and in IPA we still see the old configuration.
And in the old configuration there is the DHCP
assigned IP address and we have this dynamic option as well.
Now if I'm using NMCLI connection,
there is this connection down on ENS 33
and then I'm using connection up on ENS 33
to bring it up again.
And now we've used IPA.
There, we can see that the new configuration
was correctly used, including the error.
Did you see that? 192, 168, 29 50/25.
That's not the right subnet mask, but that was a typo.
So we need to get back and we need to modify it again.
And the easiest way
is probably just to rerun the entire command.
So now let's bring it down again
and let's bring it up again and IPA
and now you can see that the connection is alright.
Oh, an IP route show is also showing the routing
the default route going through 29.2.
And that's exactly what we wanted.