How to change the IP of an Oracle Linux OS 6.X server

First you need to login in and get a terminal. The su – to root and cd to the /etc/sysconfig/network-scripts directory

image

This is where the network configuration files are;

image

Eth0 is the ethernet port that is used for server access, we will vi the config file ifcfg-eth0; “vi ifcfg-eth0”

image

and then your in the editor, where you edit the file.

clip_image003

  • BOOTPROTO is either dhcp or static, dhcp is used when dynamically assigning the IP address
  • IPADDR is the IP Address when statically defined
  • NETMASK is the network mask, usually 255.255.255.0 for most home networks
  • GATEWAY is the default gateway
  • DNS1 is the DNS server
  • DNS2 is the secondary DNS server

Once the new IP information is set, you can restart the network service to use the new configuration

“service network restart”

image

Assuming there are no errors, your new network configuration will be live.

3 Replies to “How to change the IP of an Oracle Linux OS 6.X server”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.