Ethernet Interface templates – Centos, fedora, redhat

Create an interface manually

Just copy the following lines into a file called ifcfg-eth1 and drop it in the “/etc/sysconfig/network-scripts” folder.

then do a “service network restart”

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
BROADCAST=10.1.255.255      <-- replace with own
HWADDR=00:00:00:00:00:00   <-- replace with own MAC Address with your MAC Address
IPADDR=10.1.0.123                       <-- replace with own
NETWORK=10.1.0.1                   <-- replace with own gateway
NETMASK=255.255.0.0              <-- replace with own network mask
TYPE=Ethernet
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
BROADCAST=10.1.255.255     
HWADDR=00:00:00:00:00:00  
IPADDR=10.1.0.123                      
GATEWAY=10.1.0.1                  
NETMASK=255.255.0.0             
TYPE=Ethernet

The naming convention is crucial please pay attention to that.