| Hi, FreeBSD is community-maintained and as such we do not provide official support for it. However, I tried running this on a FreeBSD machine to reproduce your case. I added a dummy loopback interface and ran facter:
root@freebsd:~ # ifconfig |
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 |
options=81009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER> |
ether 00:0c:29:f1:92:d1 |
inet 172.16.230.139 netmask 0xffffff00 broadcast 172.16.230.255 |
media: Ethernet autoselect (1000baseT <full-duplex>) |
status: active |
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> |
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 |
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> |
inet6 ::1 prefixlen 128 |
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 |
inet 127.0.0.1 netmask 0xff000000 |
groups: lo |
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> |
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 |
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> |
inet 5.5.5.5 netmask 0xffff0000 |
groups: lo |
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> |
|
root@freebsd:~ # facter ipaddress |
172.16.230.139 |
|
root@freebsd:~ # uname -a |
FreeBSD freebsd 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 |
root@freebsd:~ # facter facterversion |
3.13.0
|
As shown above, ipaddress points to the em0 IP which is correct. I also tried to reproduce this on one of our supported OS-es (Ubuntu 18.04) with no avail. A truss run pointed to /var/db/dhclient.leases.em0 as the file facter parses to show the ipaddress fact. You can also run facter with the -l debug flag for debug level prints. Athanasios Douitsis, when you run ifconfig, what is the order of the networks? Does a loopback device come before the ethernet interface? |