Appreciate this is quite a basic question for serverfault but I'm quite stuck with a problem with static IP addressing on a FreeBSD server and I'm not greatly familiar with FreeBSD, but I've been asked to set one up as a VM.

I have been able to manually set up the static IP address and my /etc/rc.conf file looks like this:

ifconfig_hn0="inet netmask"

This is a VM running on a VMWare server (under Windows).

From inside the FreeBSD VM I can ping myself ( but I cannot ping the router ( and therefore cannot ping outside at all.

I've tried restarting networking and even rebooting the VM to no avail. Other VM's running on this server work fine with static IP addresses and there is nothing else on that IP address. FreeBSD has PF disabled, so it's not firewall related.

Here is the output of ifconfig (lo0 is also there, but I didn't include it):

root@freebsd:~ # ifconfig
    hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 00:15:5d:dc:0f:06
    inet netmask 0xffffff00 broadcast
    media: Ethernet autoselect (10Gbase-T <full-duplex>)
    status: active

Happy to provide any other information with a view to resolving this.

Update : I have added output of netstat -rn and arp -an here http://imgur.com/a/BuYeY

  • 1
    What's "netmast" in the ifconfig output? – Johan Myréen Nov 25 '16 at 11:26
  • typo, I could get the text out of the VM onto a different machine so I typed it. Thanks. – omega1 Nov 25 '16 at 11:36

Your rc.conf looks good, you could check netstat -rn to verify routing table and arp -an to check arp table but I guess no problems with routing too.
Are you sure about Network Settings on VMWare server? Does it actually use for that network?
You could check what traffic goes on network using tcpdump: sudo tcpdump -c40 -ni hn0: are there any arp requests/replies?

| improve this answer | |
  • Hi, please see imgur.com/a/BuYeY for netstat -rn and arp -an. Still been unable to resolve this. Thank you. – omega1 Nov 28 '16 at 9:32

I'm not sure if that could be the problem but I can see from your ifconfig that your hn0 is using a 24 bits network mask:

inet netmask 0xffffff00 broadcast

while your routing tables indicates that interface on a 23 bits subnet: link#2 U hn0

| improve this answer | |
  • HI, apologies, I had changed that since. It is indeed a /23 network but still does not work correctly. – omega1 Nov 28 '16 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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