Friday, November 23, 2012

Configure IP address in Redhat 6

Configure on commad-line by edit configuration file (Permanently)

  1. Open Terminal.
  2. Open network configuration file. In this example, it’ll configure on interface eth0. Type
    vi /etc/sysconfig/network-scripts/ifcfg-eth0
    Open NIC's configuration file
  3. The current configuration is DHCP.
    The NIC's configuration file
  4. Modify the file by press ‘i’ to enter insert mode. Change BOOTPROTO to static and add IP Address and Net mask as new lines if they’re not existed yet..
    BOOTPROTO=static
    IPADDR=192.168.125.10
    NETMASK=255.255.255.0
    Save the configuration file by press ESC + ‘:’ and type ‘wq’ to write and quit the editor.
    Edit the NIC's configuration file
  5. You can added these configuration to the config file. Replace [number] with your actual value.
    GATEWAY=[number]
    TYPE=Ethernet
    NETWORK=[number]
    BROADCAST=[number]
  6. Restart the network interface card. Type
    service network restart
    Restart network service
  7. Review the configuration. Type
    ifconfig
    . The IP Address has been changed permanently.
    List all NICs on the PC

source - http://www.linglom.com/2008/04/20/how-to-change-ip-address-on-linux-redhat/

No comments:

Post a Comment