Network Administration
Network Administration
Old Networking package used in RHEL 6 Network it was very limited called
network.service.
Note: each profile is active at a time, but we cannot use two profiles in the same
time for the same NIC.
There is two ways to change network configuration one way is temporary means it
is lost after the restart (ip tool) or permanent way be save our network
configuration in files to be initiated by the NetworkManager service (nmtui, nmcli
tools).
In RHEL8 we must be aware of the network naming so the name of the NIC card is
called device. Older versions of Red Hat Enterprise Linux used names like eth0,
eth1, and eth2 for each network interface. Newer versions of Red Hat Enterprise
Linux use a different naming system. Instead of being based on detection order, the
names of network interfaces are assigned based on information from the firmware,
the PCI bus topology, and type of network device. In that device we can have
multiple connection for example connection that connect to my home network and
connection that connects to Work.
When working with IP address configuration it will be either in two ways. The first
is to get the IP configuration Via DHCP server or the other way via static
configuration.
1. Using IP Commands:
To know the help of IP command we use IP help command, here we need to
see the important sections link, addr and route.
Link Means the physical layer of the device
a. NMCLI:
To show the connections:
Note: to make each profile active from nmcli tool we use auto connect or from
the default location of network Profiles /etc/sysclonfig/network-scripts/ifcfg-
ens33 we use the section ONBOOt = yes.
Note: If auto-connect is enabled with the previous profile and there is no any
address specified so it will take the Network Configuration from the DHCP
server if it is available in this network.
Note: the device must match the connection ifname, if it does not match the
connection cannot be up
We first need to down one of the interfaces:
[root@server ~]# nmcli connection down "ens33"
Note: the type of the device can be either ethernet, wlan or other like VLAns
Note: Editing the network configuration using nmtui (graphical tool), needs
from you to reload the configuration settings of the network using the
following:
Dynamic configuration:
Note: we are using host command and dig command to resolve the DNS
Queries
[root@server ~]# netstat -ntulp ==> to show the ports and application that run
this port. The same command ss -ta.
[root@server ~]# tracepath -b google.com ==> to show the route to the other
destination.
[root@server ~]# ping -c5 192.168.10.139 ==> to limit the number of
replies