IP Address Configuration on Linux (RHEL 5.4)

Versions

  • OS: Redhat Enterprice Linux 5.4

Directory and File

  • Directory: /etc/sysconfig/network-scripts/
  • File: ifcfg-eth0

Modify in blue & Add in red 

DEVICE=eth0

BOOTPROTO=static
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.254

HWADDR=[no need to modify]
ONBOOT=yes

Take Effect 

[root@A cluster]# ifdown eth0
[root@A cluster]# ifup eth0
[root@A cluster]# /etc/init.d/network restart

Quick Guide

[root@A cluster]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

  • [modify [ifcfg-eth0]'s content]

[root@A cluster]# ifdown eth0
[root@A cluster]# ifup eth0
[root@A cluster]# /etc/init.d/network restart

你可能感兴趣的:(configuration)