0

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.

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • 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 Answers1

0

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

Dan O
  • 252
  • 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