top of page
Server

Network Management

This page is dedicated to getting your network setup using static IP's and review networking settings. Also dive into some basic commands for use with net-tools. 

RHEL & Ubuntu Network Management

Install net-tools

Install the networking tools that allow for specific utility commands for displaying network connections information.

Ubuntu​

  • sudo apt install net-tools​

​

REHL9 (dnf = Dandified YUM)

  • sudo dnf install net-tools

​

Key net-tools commands:

  • ifconfig: The most commonly used command to display and configure network interface details.

  • netstat: Shows active network connections, including their IP addresses, ports, and connection states.

  • arp: Displays the Address Resolution Protocol (ARP) table, which maps IP addresses to MAC addresses.

  • route: Shows the routing table, which determines the path packets take to reach a destination.

Net1.png
Net2.png
Net3.png

Click Images for Full Screen View

Install network-manager

Install the netowrk manager that provides specific utility GUI tool and commands for manging network connections.

Note that the install is network-manager but the service to check is NetworkManager ....

Ubuntu​

  • sudo apt update

  • sudo apt install network-manager

  • nmcli --version

  • sudo systemctl start NetworkManager

  • sudo systemctl enable NetworkManager

​​

REHL9 (dnf = Dandified YUM)

  • sudo dnf install NetworkManager

  • sudo systemctl start NetworkManager

  • nmcli --version

  • sudo systemctl enable NetworkManager

  • sudo systemctl status NetworkManager

​

nmcli command:

Use ifconfig to identify your NIC and change accordingly to your subnet. My sbnet was 192.168.254.0/24 and my gateway was 192.168.254.254 which also provided the DNS server services. 

​

sudo nmcli connection modify ens160 ipv4.addresses 192.168.254.60/24 ipv4.gateway 192.168.254.254 ipv4.dns 192.168.254.254 ipv4.dns-search RHEL9.local ipv4.method manual

​​

nmtui command:

You may prefer the GUI tool nmtui for setting the IP, simply run the command nmtui  for a menu driven setup of your NIC.

Note: In the next section I go over how to manage using a conf file becuase my Ubuntu server would not see my NIC in the GUI

nmtui.png

GUI Tool:

If you are totally new to Linux and want a simpler experience you can install the server or client with the GNOME desktop where tools like the network manager below will be available for managing the network setting. 

NetworkManager-GUI.png

File Level Network Management

So on Ubuntu server I could not get the Network Manager (nmcli) to see my NIC so I have to set the IP setting sin the conf 

​

Run rommand to get name of the interface:

ifconfig â€‹

int1.png

On my system I had the 50-cloud-init.yaml file in my /etc/netplan folder so thats where I updated the config for my network. Your files may be different so run ls /etc/netplan to see what files you have.

​

  • Open the network configuration file:

    • cd /etc/netplan/

    • sudo nano 50-cloud-init.yaml

​

Then add the following with the corret indentations, this is critical so make sure the indents are correct or it will fail. â€‹â€‹

int2.png

The run these commands

  • sudo netplan apply

  • ip addr show ens33

Final Step:

  • echo "network: {config: disabled}" | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

​

Explanation:

This command creates a file named 99-disable-network-config.cfg in the /etc/cloud/cloud.cfg.d/ directory with the content network: {config: disabled}. This directive tells cloud-init to disable its network configuration feature, allowing your manual settings to take precedence. By doing this, you ensure that your static IP configuration remains intact and is not overridden during system boot.

cloudinit.readthedocs.io

Other Tools

The are optional tools that require installation for example the GUI tools below require the OS GUI installation and the cockpit web interface requires install as well.

​

Easily access this GUI tool by running nm-connection-editor at the command line. 

nm-connection-editor.png

Mange the network setting, firewall and more from the cockpit web interface.

Usually after installation you can access it over port 9090.

See this section to install Cockpit web managment.

Cokcpit-network.png
bottom of page