Configure IP address on Oracle Linux
Adding IP address in Oracle Linux can be done by editing the network-scripts. While this procedure is tested on Oracle Linux, i'm sure it should work on Redhat Enterprise Linux and other versions of Redhat.
Editing network - scripts
The network interface configuration files are found in the directory:
/etc/sysconfig/network-scripts/
To add an IP address to an interface eth0
# cd /etc/sysconfig/network-scripts/
# vi ifcfg-eth0
Enter the below parameters for static configuration
DEVICE="eth0"
BOOTPROTO="static"
BROADCAST="192.168.2.255"
HWADDR="00:0C:29:DS:22:26"
IPADDR="192.168.2.2"
NETMASK="255.255.255.0"
NETWORK="192.168.2.0"
Editing network - scripts
The network interface configuration files are found in the directory:
/etc/sysconfig/network-scripts/
To add an IP address to an interface eth0
# cd /etc/sysconfig/network-scripts/
# vi ifcfg-eth0
Enter the below parameters for static configuration
DEVICE="eth0"
BOOTPROTO="static"
BROADCAST="192.168.2.255"
HWADDR="00:0C:29:DS:22:26"
IPADDR="192.168.2.2"
NETMASK="255.255.255.0"
NETWORK="192.168.2.0"
ONBOOT="yes"
TYPE="Ethernet"
Save the file by typing ESC :wq
Restart the network service for the changes to take effect.
# service network restart
TYPE="Ethernet"
Save the file by typing ESC :wq
Restart the network service for the changes to take effect.
# service network restart
Comments
Post a Comment