At this point, you should be familiar
with the basics of computer networking.
In this demonstration, we're going to walk through
how to configure, monitor,
and manage network connections in Linux.
We'll go over the network manager, utility,
and we want to use commands such as, nmtui,
the text-based user interface.
We're going to go over nmcli,
and also we're just going to use a GUI
to configure some of the network configurations.
So let's start with the nmcli command.
So this command, we can use this general fixture.
We got a host name here.
It's going to tell us what the current host is.
All right, we're going to also use
the infamous hostname command.
So gives the exact same information.
There's a few ways to view that.
Now, if we want to change this host name,
we want to use the sudo hostname control.
We want to set the host name.
And we'll change it to server02.
It was 01 earlier.
Put a password in.
All right, let's make sure that went through.
Okay, see that quickly changed for us.
One thing to know with any of these services,
these changes aren't persistent.
So in order for it to stay, we're going to have
to restart the system.
So let's do a system control.
And we're going to restart.
Systemd.
Remember that from last time?
hostnamed, service.
So now all this means is the system will persist
through any restarts.
So now, instead of reverting back
to server01, it'll stay at server02.
Simple enough.
Now, we're just going to go over really quick ifconfig.
This has been a tried and true command
throughout the Linux history,
but it has been recently replaced.
Now it can still be used, it's deprecated,
so it's still usable,
but it's been replaced with the ipcommand.
So again, it just shows us basic information
about our network, the name of our netdevice.
We have our IP address, sub netmask, broadcast ID,
IPv6 information, MAC address,
pretty much everything you would need.
But again, as times change, we change with them.
And if you look at the manual, you will see,
and this is before anything in the future,
that this program is now obsolete.
So we're going to quit out of there
and we want to take his advice,
we want to check out the IP address command.
And you can see pretty much gives us similar information,
slightly different format,
but this is the new way of doing things.
So for this distribution on Linux, the normal format
for the naming convention of our netdevice is going to be enp.
And then it's going to be whatever we determine zero or one,
and then S, and then another number that we determine.
So that's going to be the typical format.
If you see about halfway down enp0s3,
that's going to be our ethernet NIC.
Next thing we want to do is go get
some more detailed information specifically
about that device.
So enp0s3.
Now, again, all it does is allow us
to hone in directly on that NIC,
so we can see all the information about it that we need
without being cluttered with all the other information such
as the bridges, wireless networks, loopbacks.
Okay, again, we see we have the same type
of basic information, the ethernet address
which is the MAC address, IP address, IPv6 address,
broadcast information gateways, et cetera.
Next can go back
to the network manager command line tool again
and that's how I'm going to get
some general status about it.
It gives us the monitoring feature capability just
to see how our networks are up or down, up or down.
Cuz once you have a big complex network
you're not going to always be
in close proximity to these systems.
So you can't look at the back of a router
or not, to see if a link is down or up.
This is going to be good to see
the general statuses of our servers.
Okay, another command we want to use is
the nmcli connection command.
Now that's going to give us more
specific device type of information.
So names, the UUID, the type, and the device name again.
Now we can also disable
and enable the devices by using the same tool.
So we're going to try it out, really quick connection.
We're going to bring it down.
We're going to do the enp0s3.
All right.
We see we have that system message.
Let's us know that was successfully deactivated.
So let's check out this device status just
to make sure it went through just for more information.
All right.
I like how it's highlighted.
So it draws to our attention very quickly
with the red, and let's us know
that that device is now disconnected or in a down state.
Let's bring it back up.
Remember, I always make use of the up arrow
whenever you can.
All right.
See, it's back activated, check the status back to green.
Now, next thing we're going to do,
we're going to configure the system
with that static IP address, meaning
that this is when we select manual version
and we're not going to actually use
the DHCP servers assigned to us.
Okay, so we just want to look
at this IP address right now and see what it is.
Under inet.
So we see it's 10.0.2.15.
We want to change that to 10.0.2.101,
just for demonstration purposes.
So you going to do network manager command line,
connection edit.
We're going to using enp0.
So we'll just type to help really quick just
to see what commands are available.
And we're going to focus on the set command.
Again, just allows us to change the property value of that.
We're going to set the IPv4 addresses.
10.50.1.101.
Okay, going to do a 24 slash slider.
And we're going to click this to yes.
Change this to manual.
Okay, we're going to do save here.
So we have that updated, and we're going to quit out of here
Now again, after we change any configuration,
we have to bring the device up and down.
So I'm just going to do command line.
Going to do connection down.
Enp0s3.
Now let's bring this thing back up.
Okay, now this resets the device.
I'll just make sure that went through.
Now, if you look at the enp0s3, number two,
you'll see that the inet address has
changed to 10.50.1.101/24.
Exactly as we typed it in the last command.
Next thing we want to do, we want to configure
the system to now use a DHCP.
So dynamic host configuration protocol.
And again, it's nothing more
than a network management protocol using IP networks
for automatically assigning IP addresses.
Let's configure that really quick.
And this time we're going to use the text base interface.
So we're going to use network manager,
text space, user interface.
And so we're going to edit the connection really quick.
We're going to go here, edit, and we're just going to tap here.
You see how we change the configuration
to manual when it accessed early on the screen
we're just going to change it back
to automatic again, that enables DHCP.
So that was simple enough.
I'm going to scroll down here.
Click okay.
And go back and quit.
All right, now we should be able
to check this information again,
and you should be able to see
that it's not changed to a new IP address.
So when we go back to the IP address.
We want to show the device, enp0s3.
Now we see the device still has the manual IP address.
Again, everything has to be reset
for it to issue a new IP address.
So we're going to bring the device down
and we're going to bring it back up.
But this time we're going to use the system control.
We're going to restart the network.
Tell the DHCP to reissue out some addresses.
All right.
So now let's go back to this again.
See if this IP address has changed.
And if you see below, it has added a new IP address,
letting us know that it is the 10.0.2.15.
That's what it was earlier.
And if you see towards the end,
you see dynamic, letting us know
that that was generated by our DHCP server.
Now another tool we can use to get more information
about the NIC is going to be the ethtool command.
And so what this is going to do is give us
detailed information about the NIC itself.
So let's see here.
It's going to give us the information about the link modes.
10baseT/Half 10baseT/Full,
meaning that's the ethernet standard, right?
And so that means for the 10baseT/Half,
that means 10 megabits per second, at half duplex,
meaning you going to send information one at a time.
It also supports 10base, meaning 10 megabits per second
at full duplex and a hundred and a thousand.
So we get the picture there.
So it supports multiple modes
and not just stuck at one speed.
Now we also look at, see the duplex,
the current mode is in full.
Right, and the speed is capped out at one gigabyte.
So it gives us more specs about the NIC itself.
So when we're trying to do performance analysis
and increase speeds, we can see what we're working with.
And the next folder that's going to be useful to look at.
It's going to be the networking folder,
and that's going to be under the etc/sys/config.
We'll go to network scripts.
Now this folder is useful because it shows a list
of all of these scripts that will be ran at boot.
These scripts will be ran to do a lot
of the initial configuration settings.
It'll set up things such
as IP address, host names, gateways, et cetera.
Now, to get specific to our particular NIC,
we're going to look at the...
The /etc/ and use this config.
Course, I'm going to do the network scripts.
Enp0s3.
And again, more key device information as well
as IP configuration information.
So we can see that on boot, flag set to yes.
We see the IP address, gateway prefix meaning
whether that's going to be our mask or CIDR,
and a lot of good information on this particular screen.
All right, next we're just go ahead, do it another way.
Just going to use the GUI to actually make
the next configuration change so we can go
to system tools here, we go to settings.
Okay.
Scroll down, go to network.
All right.
So we're going to hit the settings button right here.
Now you see it still shows
that we have the static IP address going on right here.
So what we're going to do is we're going to turn
this thing off and turn it back on.
All right.
Now we see we now have the DHCP selected
IP address for us right here.
Okay, we can also see that the method
for IPv4 is automatically set here.
Again, this configuration changes that went through
from our text base interface.
So we reset the network, so we can have the DHCP issue us
new IP addresses, but we also still had to bring
the link down and back up, so it could use it.
Okay, so here we're going to do a little bit more practice.
We're going to make this a manual IP address.
And now I'm going to stay within the same subnet
of the DNS server.
I'm going to change the IP address.
Just one up to what it was before.
Keep the same gateway.
We know that one works for us.
And keep the same net mask.
Have the DNS server as Google server 8.8.8.8.
Going to just see how this works with the manual.
Going to turn this off.
So now we're going to go check and see
if we can hit CompTIA's website from Firefox.
Okay, let's do https.
I'm going to go to comptia.org.
All right.
Looks like our connection is still working for us.
Okay, we went through multiple ways
of how to monitor, manage, and configure IP configurations.
And again, how to view just general statuses
of the system and how to view a few configuration statuses.
Thank you for sticking with this lesson,
and I'll see you in the next one.