Install SNMP (Simple Network Management Protocol) on Debian     This is an update to a previous post regarding the change of mac address in Debian. In the previous tutorial I told you can change it by ifconfig from a root account. Now I’m going to teach you how to set an interface mac address using /etc/network/interfaces . This is a better way to set your mac address because the mac you set in /etc/network/interfaces will always load when the interfaces are loaded so you don’t have to worry about the mac after reboot for example. Let’s start by looking at my /etc/network/interfaces it looks like this:

#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 1.1.1.2
netmask 255.255.255.0
network 1.1.1.255
broadcast 1.1.1.255
gateway 1.1.1.1
dns-nameservers 1.1.1.1
dns-search .com
hwaddress ether 00:01:04:1b:2C:1F

Open this file in your favorite editor. I use nano. You can see that my ip address is 1.1.1.2 and my gateway is 1.1.1.1 instead of these in your file you will see your network settings. Now, under the last line of the interfaces file you have to add the following

hwaddress ether 00:01:04:1b:2C:1F

replacing 00:01:04:1b:2C:1F with the mac you want to assign to the interface where you are adding the line. Now save the file with ctrl+x then y to confirm and restart the network service with
/etc/init.d/networking restart
Now type ifconfig and there it is you should see the mac you entered earlier assigned to eth0 (if you choused eth0). You’re done the mac will now load every time the network load’s.