Configure Network File with custom MAC

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.

  • network, centos, ubuntu, debian, mac
  • 377 Users Found This Useful
Was this answer helpful?

Related Articles

Booting/Starting my VPS

You can Boot/Start your VPS using two different methods. We are highlighting these below for your...

Creating a custom php.ini in cPanel

reating a custom php.ini file can be useful in certain circumstances such as allowing different...

Do I recieve root access?

Yes! You can have as much or as little access as you wish to your server!

Do you provide remote reboot ports?

We currently do not offer and remote reboot option. However, since our reboots are provided free...

Free Linux Based Control Panels

When you purchase an Unmanaged VPS or Dedicated Server from us, you'll have no control panel...