0% found this document useful (0 votes)
12 views8 pages

Network Administration

The document discusses network administration in RHEL 7 and RHEL 8, highlighting the transition from the limited network.service in RHEL 6 to the more advanced Network Manager Tool, which allows for the creation of multiple network profiles. It explains the methods for configuring network settings, including temporary and permanent changes, and details the new naming conventions for network interfaces. Additionally, it covers the use of various commands and tools like nmcli and nmtui for managing network connections and configurations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

Network Administration

The document discusses network administration in RHEL 7 and RHEL 8, highlighting the transition from the limited network.service in RHEL 6 to the more advanced Network Manager Tool, which allows for the creation of multiple network profiles. It explains the methods for configuring network settings, including temporary and permanent changes, and details the new naming conventions for network interfaces. Additionally, it covers the use of various commands and tools like nmcli and nmtui for managing network connections and configurations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Network administration:

Old Networking package used in RHEL 6 Network it was very limited called
network.service.

In RHEL 7 and RHEL 8 we used Network Manager Tool It provides, more


features like Creating profiles (Home, Work and Public) for each network Interface
and the type of this profiles can be dedicated to bonding, teaming, wi-fi and
Ethernet.

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.

Network manager service save the network configuration in


/etc/sysconfig/network-scripts/ifname.cfg (IP Config), DNS Config in
/etc/resolv.conf, /etc/hosts, Machine name in /etc/hostname and /etc/services for
Network Services.

NetworkManager is a daemon that monitors and manages network settings, In


addition to the daemon, there is a GNOME notification are applet that provides
network status info.

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

To show specific device:

To show statistics about specific device:


==>will show statistics TX, RX, Error, dropped.

To show the current address configuration of specific NIC:

If we want to add address to a NIC:


Note: we have to address with its subnet mask otherwise It will be /32.

If we want to delete the address from the interface

To show the device R.T.:


==>will display the Network , Interface ip , GW

To add a route to the routing tabel:

a. NMCLI:
To show the connections:

To show only the active connections:


Here we have Two Profiles the first is ens33 for the physical Ethernet network
802-3-ethernet connect with Network interface or device ens33. the other
profile is Bridge profile (virbr0) which used to connect multiple VMs to this
virtual bridge and connected to the device or vNIC virbr0.

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.

To show more details about the connections:


[root@server sysconfig]# nmcli con show "ens33" | less
To see the devices status:

To see details about specific device:

To create network connection with nmcli:


When creating a new connection with nmcli, the order of the argument is
important, the common arguments appear first and must include the type and
interface, next, specify any type-specific argument and finally specify the
ipaddress, prefix and gateway info. Multiple addresses may be specified for a
single device, additional setting such as DNS is set as modification once the
connection exists.
Show connections:

To add new connection:

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.

To add connection with IP and Gateway:

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"

We need to make the connection up:


[root@server ~]# nmcli connection up "static"

If we need to delete a connection it must be down first:

To connect or disconnect device:

Note: the type of the device can be either ethernet, wlan or other like VLAns

Modify network interfaces with nmcli:


To modify any argument we need key and value, to show the values
1- turn off auto connect
nmcli con mod “static” connection.autoconnect no

2- specify DNS server


nmcli con mod “static” ipv4.dns 172.25.0.254

3- some configuration arguments may have added or removed. Add a +/-


symbol in front of the argument. Add a secondary DNS server
nmcli con mod “static” +ipv4.dns 8.8.8.8

4- replace the static IP address and gateway


nmcli con mod “static” ipv4.addresses “172.25.0.10/24 172.25.0.254”

5- add secondary IP address without a gateway


nmcli con mod “static” +ipv4.addresses 10.10.10.10/16

To make this changes activated:

To change the connection from dhcp to static configuration we have to change


the ipv4.method
[root@server ~]# nmcli connection modify tarek ipv4.method manual

Note: Editing the network configuration using nmtui (graphical tool), needs
from you to reload the configuration settings of the network using the
following:

Editing network configuration files:


It is possible to configure the network by editing interface configuration files.
These files are usually named /etc/sysconfig/network-scripts/ifcfg-name,
where name refer to the name of the device or connection that the
configuration file control. The following are standard variables found in the
file used for static or dynamic configuration.
Static configuration:

Dynamic configuration:

Changing the Hostname:


To change the hostname which is on /etc/hostname we use tool called
hostnamectl:
To change the Hosts file which is in /etc/hosts we edit it directly using vim
tool, but if we need to change the configuration of dns in /etc/resolv.conf we
must use either nmtui or nmcli tool with the restriction of reload the network
configuration or Network Manager settings.

NOTE: the static hostname is stored in /etc/hostname, previous versions of


RHEL stored the hostname as a variable in the /etc/sysconfig/network file

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

You might also like