Monday, May 25, 2009

Setting IP addresses through terminal (RHEL)

For some reason this is something that will just not stick in my head and I always have to go searching for it. The way you permanently set/change the ethx ip address is to edit the following file:

nano /etc/sysconfig/network-scripts/ifcfg-ethx

In this file you can set the ip address, gateway, netmask and ipv6 stuff.

To change the DNS addresses you must edit the following different file:

nano /etc/resolv.conf

Once you have made the changes you need to restart the network service to use the changes

service network restart

!!Remember all these commands need to be done as either root or through sudo!!