https://drive.google.com/file/d/1STwa9FpnUK2EVgQbixb-0BgNiF_mG3vw/view?usp=sharing

1. Understanding Network Management Tools

Key Tools Overview

Tool Purpose RHEL 8 Status
ifconfig Legacy interface config Deprecated (use ip)
ip Modern network configuration Recommended
nmcli Command-line NetworkManager Primary tool
nmtui Text-based UI for NetworkManager User-friendly alternative

💡 Critical Note:

RHEL 9 uses NetworkManager as the default network service—not traditional network scripts.


2. Basic Network Inspection

View Network Devices

# NetworkManager device status
nmcli dev status

# Detailed device info
nmcli dev show

# IP addresses (modern way)
ip addr
# OR
ip a

# Legacy (deprecated)
ifconfig

View Connections

# List all connections
nmcli connection show
# OR
nmcli con show

# Show active connections
nmcli con show --active


3. Managing Network Connections with nmcli

Create DHCP Connection

# Add new connection (DHCP)
nmcli con add type ethernet con-name ens224 ifname ens224

# Verify
nmcli con show
ip a

Create Static IP Connection

# Add static IP connection
nmcli con add type ethernet con-name static2 ifname ens256 \\\\
  ip4 192.168.0.50/24 gw4 192.168.0.1

# Add DNS
nmcli con mod static2 ipv4.dns "8.8.8.8"

# Activate connection
nmcli con down static2
nmcli con up static2

Connection Configuration Files

# Location of config files
ls /etc/sysconfig/network-scripts/

# View connection config
cat /etc/sysconfig/network-scripts/ifcfg-static2