Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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  
address 10.6.8.200  
netmask 255.255.255.128  
gateway 10.6.8.129  
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

1 Answer 1

auto eth1

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

This link may also help: http://www.cyberciti.biz/tips/howto-ubuntu-linux-convert-dhcp-network-configuration-to-static-ip-configuration.html

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

 
discard

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.