Basic networking please help

I am running Ubuntu Desktop and Ubuntu Server editions on two separate VMs.

For the desktop I have set network adapters:
Adapter 1: internal network called intnet
Adapter 2: NAT

Server:
Adapter 1: internal network called intnet

Now I'm suppose to set ip addresses which I'm pretty sure you do by editing the /etc/network/interfaces file but I'm new to this I don't really get it.

Ubuntu Desktop:
static IP 192.168.10.100 for the internal network adapter
netmask 255.255.255.0
dhcp IP for the NAT adapter

Ubuntu Server:
static IP 192.168.10.101
netmask 255.255.255.0

^ This is what I need to have set.. how do I do this? I've tried a few things and reset the network and it didn't work. Please can anyone help?

has this been resolved?

No.. I'm still looking for an answer.

auto eth0
iface eth0 inet static
address 192.168.10.100
netmask 255.255.255.0
gateway 192.168.10.254

I don't know if this is right for the first adapter and what about the NAT adapter?

What VM are you using? Usually, both VMware and VirtualBox have an DHCP server running for NAT networks. Assuming the internal network is eth0 and the NAT network is eth1:

auto lo eth0 eth1
iface lo inet loopback

iface eth0 inet static
    address 192.168.10.100
    netmask 255.255.255.0
    # No gateway, since internal networks usually have absolutely no connection
    # to the outside world

iface eth1 inet dhcp

Once that's done, restart the network by running invoke-rc.d networking restart from the command line.

1 Like

Thanks, I am using VirtualBox. The NAT network isn't named though is it okay to say it's

iface eth1 inet dhcp

would I have to do something like

iface eth1 nat dhcp

instead? Sorry if this is a stupid question.

The third word isn't in any way related to whatever name you've given to the internal network. Actually, the VM usually doesn't even know it's a purely virtual network. Instead it defines the protocol used. inet is for IPv4, inet6 for IPv6, ...