1
00:00:00,000 --> 00:00:10,720
In this lesson, you'll learn how to monitor network interfaces.

2
00:00:10,720 --> 00:00:14,200
So it starts by getting a list of available interfaces.

3
00:00:14,200 --> 00:00:18,400
IP link show is the command that you should use.

4
00:00:18,400 --> 00:00:23,879
If you want more in-depth information about the interface properties, you can use lshw

5
00:00:23,879 --> 00:00:25,799
minus class network.

6
00:00:25,799 --> 00:00:27,480
Don't use ifconfig anymore.

7
00:00:27,480 --> 00:00:32,680
That's a legacy command and is really not supported anymore.

8
00:00:32,680 --> 00:00:38,520
To add non-persistent runtime interface configuration, you can use ip address add and next use ip

9
00:00:38,520 --> 00:00:40,799
address show to see it.

10
00:00:40,799 --> 00:00:46,080
The legacy eth tool utility was used in the past to change device settings such as auto

11
00:00:46,080 --> 00:00:48,599
negotiation, port speed, and more.

12
00:00:48,599 --> 00:00:51,680
That's a utility that nobody uses anymore.

13
00:00:51,680 --> 00:00:55,040
Let's check out the relevant utilities.

14
00:00:55,040 --> 00:01:00,360
So to start with, there is ip link show, and ip link show is showing information about

15
00:01:00,360 --> 00:01:01,360
your network links.

16
00:01:01,360 --> 00:01:04,080
Lo is your loopback interface.

17
00:01:04,080 --> 00:01:05,879
That's not really an important one.

18
00:01:05,879 --> 00:01:11,320
It's the internal networking set that is used by applications that use TCP sockets to communicate

19
00:01:11,320 --> 00:01:17,519
with one another, which is an old-fashioned way for inter-process communication anyway.

20
00:01:17,519 --> 00:01:21,040
In my case, ens160 is what it is all about.

21
00:01:21,040 --> 00:01:27,400
This is the interface that has a so-called BIOS dev name and that holds the current configuration.

22
00:01:27,400 --> 00:01:33,080
So ens160 is revealing information about the physical location of the interface.

23
00:01:33,080 --> 00:01:41,639
It's also known by its alternative name, enp2s0, where p2s0 stands for PCI 2 slot 0.

24
00:01:41,639 --> 00:01:44,360
That's actually the physical location.

25
00:01:44,360 --> 00:01:51,519
You can also find the MAC address of the interface and other properties such as the maximum transfer

26
00:01:51,519 --> 00:01:57,279
unit, which on Ethernet is set to 1,500 bytes in total.

27
00:01:57,279 --> 00:02:01,400
If that is not enough, well, you can use lshw.

28
00:02:01,400 --> 00:02:08,479
Lshw by itself is a utility that shows information about all the hardware found.

29
00:02:08,479 --> 00:02:14,039
And it's giving you a lot of results, so many that you probably don't care about all of

30
00:02:14,039 --> 00:02:21,800
them, and you better use lshw-class to filter down on a different category of results.

31
00:02:21,800 --> 00:02:29,960
So minus-class network will show you network-related information only with all the different capabilities

32
00:02:29,960 --> 00:02:36,639
and more information like the capacity and the clock speed and much more.

33
00:02:36,639 --> 00:02:41,880
So that was detected information that is coming from your driver.

34
00:02:41,880 --> 00:02:47,839
Now, if you want to change your network interface non-persistently, let's start by using IPA.

35
00:02:47,839 --> 00:02:54,559
IPA is showing that I'm using 192.168.29.11 on this interface.

36
00:02:54,559 --> 00:03:01,360
And I can temporarily add an interface by using IPAA, which is short for IP address add.

37
00:03:01,360 --> 00:03:09,000
IPAA always needs a device, which in my case is ENS160, followed by the IP address that I want to add.

38
00:03:09,000 --> 00:03:14,320
And then I press enter, and IPA is showing the secondary IP address.

39
00:03:14,320 --> 00:03:19,399
And ping 10010 is showing that it's even answering.

40
00:03:19,399 --> 00:03:25,880
Now, in case you think that is cool, don't forget that after a restart of your network interface, it will be gone.

41
00:03:25,880 --> 00:03:31,320
So if you want to make the change persistently, you need to continue and watch the next video,

42
00:03:31,320 --> 00:03:34,199
in which we'll talk about persistent network configuration.

