Configure IP Address and Routes on Linux

Loading

In this blog, we will configure a static IP address on Linux-based systems.

Configure Static IP on Ubuntu

The netplan config files are located at /etc/netplan and the default configuration file is /etc/netplan/01-netcfg.yaml

Open the network config file with an editor such as nano:

vi /etc/netplan/01-netcfg.yaml

Once all your changes have been made, you can apply them by running:

sudo netplan apply

Configuring a DHCP address with Netplan

If you’d like to configure your Ubuntu server to run on DHCP this is how we will do it.

Once all your changes have been made, you can apply them by running:

sudo netplan apply

Configure Static IP on Redhat/ Ubuntu

For RedHat-based systems, all net config info is under /etc/sysconfig/network-scripts/

Configure Secondary IP on Redhat/ Ubuntu

Disable Network Interfaces on Redhat using NMCLI

Check Network Usage Statistics

ethtool is an excellent utility for checking the network card status

Check Port Usage Statistics

(Visited 131 times, 1 visits today)

By Ash Thomas

Ash Thomas is a seasoned IT professional with extensive experience as a technical expert, complemented by a keen interest in blockchain technology.

Leave a Reply