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 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 192.168.10.101 for the internal network adapter
  • netmask 255.255.255.0
  • dhcp IP for the NAT adapter

How can I do this?

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

migrated from stackoverflow.com Nov 26 '11 at 7:16

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

1 Answer

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
address 192.168.10.101
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255

auto eth1
iface eth1 inet dhcp

That should be all.

share|improve this answer
add comment

Your Answer

 
discard

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