The following tutorial will guide you through configuring RedHat, CentOS and Debian Based kernel network settings.
Common Settings
GATEWAY: The IP address of your network gateway. Required if you require connectivity beyond your local network subnet, such as having Internet connectivity.
IPADDR: The IP address of the network interface.
Configuring a Static IP
A static address is one that is permanently assigned to one host. It is an address that is manually configured by the administrator.
CentOS/RedHat
1. Open the configuration file for your network interface.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
2. Add the following settings to the file:
DEVICE=eth0
HWADDR=A5:4C:6D:EB:DE:91
ONBOOT=yes IPADDR=192.168.1.10 NETMASK=255.255.255.0 GATEWAY=192.168.1.1
3. Save the file and Exit
4. Restart network with the network restart command.
sudo service network restart
Ubuntu/Debian
1. Open the configuration file for your network interface.
vi /etc/network/interfaces
2. Add the following settings to the file:
#This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
hwaddress ether A5:4C:6D:EB:DE:91
3. Save the file and Exit
4. Restart network with the network restart command.
/etc/init.d/networking start
Don't hesitate to contact with us for any further query.