Method One:
ifconfig eth0 IP Address netmask gateway----If not set, use the default mask
Note: This method is only temporarily modified to restart the network or the server will be restored.
Method Two:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0 --Modify the file for permanent entry
1. Device aliases for Device=eth0 NIC
such as Ifcfg-eth0 the first network card bootproto=static network card to obtain the way IP address,
Static IP Address
DHCP (get IP via DHCP protocol)
Bootip IP addresses obtained through the BOOTP protocol
2. broadcast=192.168.0.255
3. Subnet broadcast address Hwaddr=00:50:56:8e:47:ee
4. Network Card Physical Address ipaddr=12.168.1.117
5. Nic IP address Ipv6init=no
6. Whether to enable Ipv6ipv6_autoconf=no
7. netmask=255.255.255.0--Nic corresponds to network mask
8. network=192.168.1.0--Network address of NIC
9. Onboot=yes
10.gateway=192.168.1.1--Gateway
11.type= "ETHERNET"
Restart Network Service after Setup: Service Network restart
Linux Modify settings IP address