In this lesson, you'll learn how to monitor network interfaces.
So it starts by getting a list of available interfaces.
IP link show is the command that you should use.
If you want more in-depth information about the interface properties, you can use lshw
minus class network.
Don't use ifconfig anymore.
That's a legacy command and is really not supported anymore.
To add non-persistent runtime interface configuration, you can use ip address add and next use ip
address show to see it.
The legacy eth tool utility was used in the past to change device settings such as auto
negotiation, port speed, and more.
That's a utility that nobody uses anymore.
Let's check out the relevant utilities.
So to start with, there is ip link show, and ip link show is showing information about
your network links.
Lo is your loopback interface.
That's not really an important one.
It's the internal networking set that is used by applications that use TCP sockets to communicate
with one another, which is an old-fashioned way for inter-process communication anyway.
In my case, ens160 is what it is all about.
This is the interface that has a so-called BIOS dev name and that holds the current configuration.
So ens160 is revealing information about the physical location of the interface.
It's also known by its alternative name, enp2s0, where p2s0 stands for PCI 2 slot 0.
That's actually the physical location.
You can also find the MAC address of the interface and other properties such as the maximum transfer
unit, which on Ethernet is set to 1,500 bytes in total.
If that is not enough, well, you can use lshw.
Lshw by itself is a utility that shows information about all the hardware found.
And it's giving you a lot of results, so many that you probably don't care about all of
them, and you better use lshw-class to filter down on a different category of results.
So minus-class network will show you network-related information only with all the different capabilities
and more information like the capacity and the clock speed and much more.
So that was detected information that is coming from your driver.
Now, if you want to change your network interface non-persistently, let's start by using IPA.
IPA is showing that I'm using 192.168.29.11 on this interface.
And I can temporarily add an interface by using IPAA, which is short for IP address add.
IPAA always needs a device, which in my case is ENS160, followed by the IP address that I want to add.
And then I press enter, and IPA is showing the secondary IP address.
And ping 10010 is showing that it's even answering.
Now, in case you think that is cool, don't forget that after a restart of your network interface, it will be gone.
So if you want to make the change persistently, you need to continue and watch the next video,
in which we'll talk about persistent network configuration.