Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to configure a network interface permanently eth1 and to change the MAC address with the specified format : AA:BB:CC:DD:x:y, before the interface is up. A=1;B=2;C=2;D=2;x=6;y=8.

I wrote in /etc/network/interfaces:

auto eth1  
iface eth1 inet static  
pre-up ifconfig eth1 hw ether 1A:2B:2C:2D:6:8  

I don't know what I'm doing wrong.

share|improve this question
This looks correct and works for me. I'm looking for the issue your question is about but you didn't write what didn't work and how you tested it. – Marcin Kaminski Dec 20 '12 at 18:10

auto eth1

This tells Ubuntu to use DHCP for eth1. What happens if you remove this line?

This link may also help:

share|improve this answer
I'll try to remove the line and i'll tell you what happens.thank you for the answer. – Michelle Dec 20 '12 at 17:57
The system is ok with removing this line but removed or not something its not working.I suppose to be something wrong in the MAC changing... – Michelle Dec 20 '12 at 18:00
@orzechowskid Not true. auto eth1 does NOT have anything to do with the IP configuration assignment method. Its purpose is to mark interfaces to be enabled during boot or when ifup -a is used. – Marcin Kaminski Dec 20 '12 at 18:03
Thank you but i still need to know if the changing of the MAC address is wrong or i didnt understood it corectly? – Michelle Dec 20 '12 at 18:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.