Wednesday, June 25, 2008

How to change RHEL IP Adress

  1. Change in the Graphical console
  2. Change in the command line GUI
    system-config-network-tui
  3. Change the configuration file.
    Editing configuration files which stored in /etc/sysconfig/network-scripts/ directory. Those file separate by network interface name as "ifcfg-eth*".

    # Intel Corporation 82573E Gigabit Ethernet Controller (Copper)
    DEVICE=eth0
    BOOTPROTO=static
    DHCPCLASS=
    HWADDR=00:30:48:56:A6:2E
    IPADDR=10.10.29.66
    NETMASK=255.255.255.192
    ONBOOT=yes

    Save and close the file. Define default gateway (router IP) and hostname in /etc/sysconfig//network file:
    # vi /etc/sysconfig/network
    Append/modify configuration as follows:
    NETWORKING=yes
    HOSTNAME=www1.nixcraft.in
    GATEWAY=10.10.29.65

    Save and close the file. Restart networking:
    # /etc/init.d/network restart

    Make sure you have correct DNS server defined in /etc/resolv.conf file:
    # vi /etc/resolv.conf
    Setup DNS Server as follows:
    nameserver 10.0.80.11
    nameserver 10.0.80.12
    nameserver 202.67.222.222


No comments: