Super User is a question and answer site for computer enthusiasts and power users. 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 a FreeBSD machine running on a virtual machine. I am using SUN Virtual Box. I need to set static IP address to this machine. So that I can access this machine. Is there anyway to do this ?

share|improve this question

migrated from Jun 12 '10 at 10:42

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

up vote 17 down vote accepted

in /etc/rc.conf:

ifconfig_em0="inet netmask"
defaultrouter="" -- the machine IP, -- gateway
These settings in rc.conf are looked up in the boot process.
If you'd like to set ip manually, run:
ifconfig em0 inet netmask
route delete default; route add default

share|improve this answer

Another way to do the same thing:

  • run "sysinstall" as root
  • "configure"
  • "networking"
  • "interfaces"
  • Now choose you interface and configure it.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .