How to set statis ip in linux – redhat, centos

#### define eth0 interface
##### vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes
HWADDR=00:50:56:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
IPADDR=192.168.1.8
NETMASK=255.255.255.0

NETWORKING=yes
HOSTNAME=web.example.com
GATEWAY=192.168.1.1

nameserver 192.168.1.1
nameserver 8.8.8.8 # Google’s DNS server

Tags:

Add a Comment