21.04.2015

centos debian interface config


#Centos 
/etc/sysconfig/network-scripts/ifcfg-<interface-name>

DEVICE=eth0 
BOOTPROTO=none 
ONBOOT=yes 
NETWORK=10.0.1.0 
NETMASK=255.255.255.0 
IPADDR=10.0.1.27 


 
#Debian 
/etc/network/interfaces
 
 auto eth0
    iface eth0 inet static
        address 192.168.0.7
        netmask 255.255.255.0
        gateway 192.168.0.254 
 
One file is the udev rule for network devices which is located here:
/etc/udev/rules.d/70-persistent-net.rules
Copy the new mac address to the line of your eth0 rule and delete the new rule for eth1.
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:50:56:b2:23:e0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
Modify the network configuration located under:
/etc/sysconfig/network-scripts/ifcfg-eth0