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

  • IP address: 10.5.15.200;
  • Netmask: 255.255.255.128;
  • MAC address: A2:BB:CC:DD:5:15;
  • Gateway: 10.5.15.129.

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

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

1 Answer

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
   address 10.5.15.200
   netmask 255.255.255.128
   gateway 10.5.15.129

Here's a tutorial that can help you http://www.howtogeek.com/howto/ubuntu/change-your-network-card-mac-address-on-ubuntu/

You can check this out for more details http://manpages.ubuntu.com/manpages/lucid/man5/interfaces.5.html

Here's a post that has lots of examples if you need a more advanced configuration http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/

share|improve this answer
1  
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
add comment

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.