Hello, and welcome to today's video presentation on the network configuration files on Oracle
Linux 8.
This video aims to provide information on the various network configuration files for
Oracle Linux 8 and review these files on Oracle Cloud Infrastructure.
So let us get started.
In this exercise, the host system is a fully patched Oracle Linux 8 instance on Oracle
Cloud Infrastructure.
This instance also has a secondary VNIC added for use in this demonstration.
Additional information on Virtual Cloud Networks and attaching VNICs to an instance is outside
this video's scope, but available in our Oracle Cloud content located at oracle.com/goto/linuxcloudlearning.
Start by opening a terminal and connect to your host system.
Oracle Linux 8 uses network interface cards (NICs) and multiple configuration files to
connect a system to the network.
You can identify each network interface by a name that combines a prefix and a suffix.
The prefix describes the type of network interface used, such as en for Ethernet, wl for Wireless
local area network or LAN, and ww for Wireless wide area network or WAN.
The suffix used designates other information about the network interface.
Examples include using an index number such as en0 or pbus_number and slot_number as in
enp0s8.
Use the command "ls -lR /sys | grep ens" to display a list of the network interface devices
attached to this system.
The output shows the system has two devices named ens3 and ens5.
Those two devices align with the number of VNICs shown on the Oracle Cloud Infrastructure
Instance Details page under Resources and Attached VNICs.
Beyond knowing the network interfaces attached to the system, Oracle Linux 8 system administrators
should understand the network configuration files.
The first of these files is the /etc/hosts file, which associates a hostname with an
IP address for local hostname resolution.
View this file by typing "cat /etc/hosts."
The file consists of several columns with the first being the IP address, then the fully
qualified name, and then optional aliases.
Expected entries for proper operation include the localhost entry and the system's primary
IP address and hostname.
Although the /etc/hosts file can handle hostname resolution to IP address lookup, system administrators
use a Domain Name Service (DNS) server for this task on more extensive networks.
To configure DNS lookup, look at the /etc/resolv.conf and /etc/nsswitch.conf files.
First view the resolv.conf file by typing "cat /etc/resolv.conf."
The resolv.conf file defines how the system uses DNS to resolve hostnames and IP addresses.
This file contains a line specifying a list of search domains separated by spaces, and
potentially three lines that define the DNS server's IP addresses.
Now view the nsswitch.conf file by typing "cat /etc/nsswitch.conf."
The nsswitch.conf file configures how the system uses various databases and name resolution
mechanisms.
One significant parameter in the file is the "hosts" line.
This parameter refers to the sources for resolving names and addresses.
Per the configuration shown, the name resolution will lookup first in the hosts file, then
using DNS per the user resolv.conf, and finally using the glibc gethostname() function via
the nss-myhostname plugin.
The next file to view is the /etc/sysconfig/network file.
This file specifies additional information valid to all network interfaces.
To view the file, type "cat /etc/sysconfig/network."
For this system, the file has a single entry "NETWORKING=yes," which indicates networking
is enabled globally for all interfaces unless expressly stated otherwise in the interface-specific
configuration.
Additional information on this file's parameters is available as part of the Linux documentation
set at /usr/share/doc/initscripts/sysconfig.txt.
The last file covered in this video is part of the network interface configuration files
in the /etc/sysconfig/network-scripts directory.
To get a listing of these files, type "ls -l /etc/sysconfig/network-scripts."
The directory listing displays a file "ifcfg-ens3," which is the configuration file for this system's
primary network interface card or NIC.
Each physical and virtual network device has an associated configuration file named ifcfg-.
View the configuration by typing "cat /etc/sysconfig/network-scripts/ifcfg-ens3."
In this configuration, here are some of the parameters and their meaning.
"NAME" is the name of the interface listed in the NetworkManager GUI.
"DEVICE" is the name of the physical device.
"ONBOOT" determines if the system activates the interface at boot time.
"UUID" is the Universally unique identifier for the network interface device.
"BOOTPROTO" determines how the interface obtains its IP address.
Its values can be "dhcp" for dynamically-assigned addresses or "none" for static addresses.
For more information and details on these files, see the Oracle Linux 8 documentation
at the URL displayed on the screen.
[ silence ... https://docs.oracle.com/en/operating-systems/oracle-linux/8/network/ol-netconf.html#ol-netconf-config-files ]
That completes this explanation of network interfaces and the configuration files that
create a network.
Thank you for watching this video and enjoy using Oracle Linux 8.
Please check our additional information on Oracle Linux 8 in the Oracle Linux 8 Documentation
or Oracle Linux Learning Library.