3

I've been following this post here on how to do this. I am using OS X and VirtualBox with an Ubuntu server.

In the post they have the following: (I don't see those settings)

auto eth0
 iface eth0 inet static
   address 10.253.0.50
   netmask 255.255.255.0
   network 10.253.0.0
   gateway 10.253.0.1
   dns-nameservers 8.8.8.8

Where do I find network, gateway and dns-nameservers?

When I do an ifconfig in Ubuntu, I only see the following relevant settings:

eth0

  • inet addr
  • Bcast
  • Mask

lo

  • inet addr
  • Mask
d a i s y
  • 5,551

2 Answers2

2

To have a static IP for your server, you have to understand your network configuration. If you are the one managing the IP network, you have to use one of the free IP. Otherwise, please ask your network admin for a static IP and use that.

  • address (enter the IP you got from admin)
  • netmask (enter the subnet mask)
  • network (you can identify your network from the IP you got)
  • gateway (This also you have get from the admin)
  • dns-nameservers (this can be 8.8.8.8 or whatever admin gives you)

Except, IP address, everything else can be copied from another machine from your network which is configured with static IP.

2

I believe I have this working with the following settings in /etc/network/interfaces:

auto eth0
iface eth0 inet static
address 192.168.1.32
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4