Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 eth1 with:

  • IP address:;
  • Netmask:;
  • MAC address: A2:BB:CC:DD:5:15;
  • Gateway:

Mac address must be set up before eth1 is UP. I must use pre-up but i don't know.

share|improve this question
What steps have you tried so far and what were the problems? – Kevin Bowen Dec 19 '12 at 10:41

You can do that by configuring the /etc/network/interfaces file in Ubuntu.

Open /etc/network/interfaces file in an editor and the add these following lines

auto eth1
iface eth1 inet static
   hwaddress ether A2:BB:CC:DD:5:15

Here's a tutorial that can help you

You can check this out for more details

Here's a post that has lots of examples if you need a more advanced configuration

share|improve this answer
Mac address must be set up BEFORE eth1 starts – Alex Dec 19 '12 at 11:01
@Alex i have made the changes. – Mevin Babu Dec 19 '12 at 11:03
So I don't need to use pre-up, no? – Alex Dec 19 '12 at 11:04
No need . Editing this file would configure your lan during boot. – Mevin Babu Dec 19 '12 at 11:06
Note: this may break the output results from ifconfig, or ifconfig -a. You may want to run ip address show. – Kevin Bowen Dec 19 '12 at 11:06

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.