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 set up eth1 using these :

mac address AA:6F:78:UI:34:34

and must be set up before eth1 starts and default gateway must be the first usable address from network

share|improve this question
what do you mean with first usable address from network? – MDeSchaepmeester Dec 18 '12 at 15:59
up vote 3 down vote accepted

Open the file /etc/network/interfaces and add the following content:

auto eth1
iface eth1 inet static 
  pre-up ifconfig eth1 hw ether AA:6F:78:UI:34:34

This sets the specific values. However at the moment it is unclear what you meant with your comment on the default gateway. Could you elaborate?

share|improve this answer
For MAC address it must be set up before the interface starts. All i know it's that i must use pre-up but i don't know how. Forget about the part with default gateway – Alex Dec 18 '12 at 16:08
I changed my answer it should reflect now your last comment. – qbi Dec 18 '12 at 16:12
Thank you very much – Alex Dec 18 '12 at 16:23
Hey @Alex, if you find my answer helpful or it solves your problem, it would be nice to upvote it or to accent it as correct answer. Have a nice day. – qbi Dec 18 '12 at 17:54
I have one more question for you. Do you know how to make apache2 to listen only on port 8080 – Alex Dec 18 '12 at 18:14

The gateway address can be any of the usable addresses within the 25 bit subnet here. It is usually the first, sometimes the last IPv4 address available.

auto eth1
iface eth1 inet static 
  hwaddress ether AA:6F:78:UI:34:34
share|improve this answer

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.