Operations 8 min read

Master Permanent and Temporary IP Configuration on Linux Servers

This guide explains how to set up both permanent and temporary IP addresses on Linux servers, covering configuration file edits, command-line tools like ifconfig, route, and ethtool, and includes step‑by‑step examples for SuSE environments.

Linux Cloud Computing Practice
Linux Cloud Computing Practice
Linux Cloud Computing Practice
Master Permanent and Temporary IP Configuration on Linux Servers

Overview

This article describes methods for configuring IP addresses on Linux servers, including permanent (persistent) and temporary (session‑only) setups, and introduces common networking commands such as ifconfig, route, and ethtool.

Operating Environment

SuSE 11 / SuSE 10

Permanent IP Configuration (persistent across reboots)

Modify the files under /etc/sysconfig/network/ifcfg-eth* (or ifcfg-${MAC_ADDRESS} on SuSE 10). Steps:

Log in as root and identify the network interface (e.g., eth0) using ifconfig.

Edit /etc/sysconfig/network/ifcfg-eth0 and set the following parameters:

BOOTPROTO='static'
IPADDR='192.168.0.1'
NETMASK='255.255.255.0'
STARTMODE='auto'

Configure the default gateway by editing /etc/sysconfig/network/routes and adding: default 192.168.1.1 - - Restart the network service to apply changes: # service network restart Verify the configuration with ifconfig -a and test connectivity by pinging the address.

Temporary IP Configuration (lost after reboot)

Use ifconfig to assign an address temporarily:

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up

Set the default gateway: route add default gw 192.168.1.1 Test connectivity with ping.

ifconfig Command Usage

Display all interfaces: ifconfig -a Bring an interface up or down: ifconfig eth0 up / ifconfig eth0 down Assign a single IP address: ifconfig eth0 192.168.0.1 Assign multiple IPs (alias):

ifconfig eth0:0 192.168.0.2 netmask 255.255.255.0

ethtool Command Usage

Query and set NIC parameters.

# ethtool eth0
# ethtool -S eth0
# ethtool -s eth0 speed 1000 duplex full autoneg on

route Command Usage

Show routing table: route -n Add a host route: route add -host 192.16.128.1 dev eth1 Add a network route: route add -net 192.16.128.0 netmask 255.255.0.0 dev eth1 Set default gateway: route add default gw 192.16.128.254 Delete a route:

route del -net 192.168.0.1 netmask 255.255.0.0 dev eth0
ethtoolrouteIP Configurationifconfig
Linux Cloud Computing Practice
Written by

Linux Cloud Computing Practice

Welcome to Linux Cloud Computing Practice. We offer high-quality articles on Linux, cloud computing, DevOps, networking and related topics. Dive in and start your Linux cloud computing journey!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.