How to set static IP address in CentOS 6.2

  
 

Set the IP address: /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE="eth0"#Device alias TYPE="Ethernet"BOOTPROTO=static#IP acquisition mode, there are three ways: static, dhcp, bootp HWADDR="08:00:27:F8:E3:10"# NIC address, ie MAC address IPADDR=192.168.1.88#IP address NETMASK=255.255.255.0# Subnet mask (equivalent to PREFIX=24)NETWORK= 192.168.1.0#Network address BROADCAST=192.168.1.255#Broadcast address IPV6INIT=noIPV6_AUTOCONF=noONBOOT="yes"# Activate this NIC to set the gateway when booting: /etc/sysconfig/networkNETWORKING=yesHOSTNAME=localhost.localdomain#Hostname, The host name in /etc/hosts corresponds to GATEWAY=192.168.1.1# Gateway address setting DNS: /etc/resolv.confnameserver 192.168.1.1nameserver 8.8.8.8nameserver 8.8.4.4 Restart network card service network restart/etc/init.d/Network restart View IPifconfig eth0

Copyright © Windows knowledge All Rights Reserved