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 have two network adapters on VirtualBox for Ubuntu server.

  • Adapter 1: internal network called intent
  • Adapter 2: NAT

I want to configure them as follows,

  • static IP for the internal network adapter
  • netmask
  • dhcp IP for the NAT adapter

How can I do this?

share|improve this question

migrated from Nov 26 '11 at 7:16

This question came from our site for professional and enthusiast programmers.

I think you should ask at superuser. – wliao Nov 26 '11 at 6:20
Thanks for the advice. – user962971 Nov 26 '11 at 6:29

Open /etc/network/interfaces with your favorite text editor, ie:

sudo nano /etc/network/interfaces

Locate the interfaces and set them as desired, ie:

auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet dhcp

That should be all.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.