0

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:

hostname="freebsd"
sshd_enable="YES"
dumpdev="AUTO"
ifconfig_hn0="inet 192.168.220.12 netmask 255.255.255.0"
defaultrouter="192.168.220.1"

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

From inside the FreeBSD VM I can ping myself (192.168.220.12) but I cannot ping the router (192.168.220.1) 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
    options=71b<RXCSUM,TXSUM,VLAN_HWTAGGING,TS04,TS06,LR0>
    ether 00:15:5d:dc:0f:06
    inet 192.168.220.12 netmask 0xffffff00 broadcast 192.168.220.255
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    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

omega1
  • 392
  • 3
  • 7
  • 27

2 Answers2

2

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 192.168.220.1/24 for that network?
You could check what traffic goes on network using tcpdump: sudo tcpdump -c40 -ni hn0: are there any arp requests/replies?

Fedor Dikarev
  • 706
  • 4
  • 10
  • Hi, please see http://imgur.com/a/BuYeY for netstat -rn and arp -an. Still been unable to resolve this. Thank you. – omega1 Nov 28 '16 at 09:32
0

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 192.168.220.12 netmask 0xffffff00 broadcast 192.168.220.255

while your routing tables indicates that interface on a 23 bits subnet:

192.168.220.0/23 link#2 U hn0

SteDf
  • 56
  • 3
  • 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