Ubuntu
/etc/network/interfaces
# The loopbacknetwork interface
auto lo
iface lo inetloopback
# The primarynetwork interface
auto eth0
iface eth0 inetstatic
address124.16.139.23
network124.16.139.0
netmask255.255.255.0
gateway124.16.139.254
dns-nameservers124.16.136.254 8.8.8.8
CentOS
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
ONBOOT=yes
IPADDR=192.168.0.108
NETMASK=255.255.255.0
NETWORK=192.168.56.1
GATEWAY=192.168.0.1
DNS1=192.168.0.1