Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 need a FreeBSD VM running on a new Mac machine. This is in order that I can test changes to the web server running on FreeBSD (company policy is that we test changes on an instance with a similar setup to our production environment.) However, currently I'm having very strange issues setting this up. (1) I was unable to setup a static IP without losing connection to the internet, by changing 'ifconfig_em0="dhcp"' to 'ifconfig_em0="inet [some-ip-address] gateway". I was no longer able to ping Google...

And more importantly (2) my IP address from DHCP seems to automatically change every couple of minutes. This will make it very difficult to work without being interrupted...

This pretty much explains the problem I'm having:

However, this solution is not working for me -- I am unable to access the machine from the fixed ip address I setup for it. In particular I've noticed that the two locations described as containing the MAC address of the virtual network device have different addresses there... Against the ifconfig on the VM I see: 00:0c:29:68:79:ee and against the .vmx file there is: 00:0c:29:64:03:8b...

Does anybody have any ideas about how to troubleshoot this?

share|improve this question

migrated from Apr 24 '11 at 12:45

This question came from our site for system and network administrators.

What you want in /etc/rc.conf is this:

ifconfig_em0="inet [some-ip] netmask [your-network-netmask]"

If the network is running in "bridged" mode the [some-ip] should be a spare IP on your network, and the [router-ip] should be the IP address of your default router.

For example:

ifconfig_em0="inet netmask"

You would also need to set up /etc/resolv.conf to have your DNS server address in, for example:

share|improve this answer
How do I know my router-ip, domain name and nameserver? Stupid question maybe, but I'm in a different country and I guess stuff might change depending on which Wi-Fi network I'm logged into or whether I'm using my VPN or not. Just wildly speculating... – olive Apr 26 '11 at 14:50
While it's working with DHCP run: netstat -rn - the entry for is the default route - look for the router's IP address there. The name server is probably the same as the router unless you run your own DHCP server. Examine /etc/resolv.conf while it's working with DHCP to confirm. – Majenko Apr 26 '11 at 15:20
That seemed to work. Thanks very much. – olive Apr 27 '11 at 3:42

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.