Monday, November 1, 2010

assign static ip address on centos

1. cd /etc/sysconfig/networking/devices/

2. ls -l (list all interfaces)

3. vi ifcfg-eth0 (edit interface )

4.
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:9C:23:DE:92:8C
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
NETMASK=255.255.255.0
IPADDR=192.168.64.121
GATEWAY=192.168.0.1

5. To Save In VI, press key, and type in ” :wq ” followed by pressing the key.

6.#ifdown eth0 && ifup eth0 (reboot interface)

No comments: