route: message...

On FreeBSD 15.0-RELEASE-p5 I have all the time error message:
route: message indicates error: File exist
add host 127.0.0.1: gateway lo0 fib:0: route already in table
route: message indicates error: File exist

I do not have problems but I like to know where in the settings should I look for.

In /etc/rc.conf I have:
Code:
hostname="fernandel"
in /etc/resolver.conf

Code:
nameserver 127.0.0.1
and in /usr/local/etc/unbound/unbound.conf
Code:
interface: 127.0.0.1
access-control: 127.0.0.1/8

Thank you.
 
Why are you posting information relating to DNS when you have an error involving routing?

Post your whole rc.conf.
 
Why are you posting information relating to DNS when you have an error involving routing?

Post your whole rc.conf.
Code:
clear_tmp_enable="YES"
syslogd_flags="-ss"
hostname="fernandel.net"
background_dhclient="YES"

# lagg
# cloned_interfaces="lagg0"
# wlans_iwm0="wlan0"
# create_args_wlan0="wlanaddr 00:2b:67:05:75:7f country US"
# ifconfig_re1="up"
# ifconfig_wlan0="WPA"
# ifconfig_lagg0="up laggproto failover laggport re1 laggport wlan0 DHCP"

# ethernet
ifconfig_re1="DHCP"
# ifconfig_ue0="DHCP"

# wifi
# wlans_iwm0="wlan0"
# ifconfig_wlan0="WPA DHCP"

unbound_enable="YES"

# IPFW
# firewall_enable="YES"
# firewall_type="workstation"
# firewall_script="/etc/ipfw.rules"
# firewall_quiet="YES"
# firewall_logdeny="YES"
# firewall_logging="YES"
# firewall_logif="YES"

# PF
# pf_enable="YES"
# pf_rules="/etc/pf.conf"
# pf_flags=""
# pflog_enable="YES"
# pflog_logfile="/var/log/pflog"

# IPF
ipfilter_enable="YES"
ipfilter_rules="/etc/ipf.rules"
ipmon_enable="YES"
ipmon_flags="-Ds"

ntpd_enable="YES"
update_motd="NO"
powerd_enable="YES"
powerd_flags="-a hiadaptive -i 25 -r 85 -N"
# powerd_flags="-a adaptive -b adaptive -n adaptive"
devfs_system_ruleset="devfsrules_user"
dbus_enable="YES"
# webcamd_enable="YES"
smartd_enable="YES"
# cupsd_enable="YES"
clamav_clamd_enable="YES"
clamav_freshclam_enable="YES"
kld_list="amdgpu acpi_video"
# microcode_update_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"

Thank you.
 
There's nothing in your rc.conf that seeming does anything with routes, except maybe DHCP on your re1 interface. But that's not going to touch lo0 or 127.0.0.1. Anything in /etc/rc.local perhaps? Also check for files in /etc/rc.conf.d/.
 
There's nothing in your rc.conf that seeming does anything with routes, except maybe DHCP on your re1 interface. But that's not going to touch lo0 or 127.0.0.1. Anything in /etc/rc.local perhaps? Also check for files in /etc/rc.conf.d/.
I do not have /etc/rc.local and /etc/rc.conf.d/ is empty.
 
What does netstat -rn show?
Code:
netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags         Netif Expire
default            192.168.1.1        UGS             re1
127.0.0.1          link#3             UH              lo0
192.168.1.0/24     link#2             U               re1
192.168.1.134      link#3             UHS             lo0

Internet6:
Destination                       Gateway                       Flags         Netif Expire
::/96                             link#3                        URS             lo0
::1                               link#3                        UHS             lo0
::ffff:0.0.0.0/96                 link#3                        URS             lo0
fe80::%lo0/10                     link#3                        URS             lo0
fe80::%lo0/64                     link#3                        U               lo0
fe80::1%lo0                       link#3                        UHS             lo0
ff02::/16                         link#3                        URS             lo0
 
I suggest enabling verbose booting, that might give some clues where and when this error happens.
 
So your route already has a (correct) default gateway.
default 192.168.1.1 UGS re1

My read is that (something) is trying to create a gateway to your loopback device -- which is odd :-)

add host 127.0.0.1: gateway lo0 fib:0: route already in table

BTW: (my FreeBSD host): Loopback device is defined (the same way) yours is:
127.0.0.1 link#3 UH lo0

At the moment I would say the (ERROR IS GOOD) because route(8) is stopping something strange from happening in your routing table. Next step would be to see where that "add host" command is coming from.
 
Anything in /etc/dhclient.conf? Perhaps it's trying to set additional routes (that aren't needed because it's an implied route).
 
Back
Top