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).
 
Same here:

Code:
Apr 11 15:41:22 <console.info> edge kernel: [244] route: message indicates error: File exists
Apr 11 15:41:22 <console.info> edge kernel: [244] add host 127.0.0.1: gateway lo0 fib 1
Apr 11 15:41:22 <console.info> edge kernel: [244] add host 127.0.0.1: gateway lo0 fib 0: route already in table
Apr 11 15:41:22 <console.info> edge kernel: [244] Additional inet routing options: log ICMP redirect=YES gateway=YES.
Apr 11 15:41:22 <console.info> edge kernel: [244] route: message indicates error: File exists
Apr 11 15:41:22 <console.info> edge kernel: [244] add host ::1: gateway lo0 fib 1
Apr 11 15:41:22 <console.info> edge kernel: [244] add host ::1: gateway lo0 fib 0: route already in table

And in rc.conf:

Code:
network_interfaces="lo0 igb0 igb1 igb2 igb3"
ifconfig_lo0="inet 127.0.0.1"

In sysctl.conf:

Code:
net.fibs=2

My system is old. It came along since Rel. 2.2.1, and probably wasn't freshly installed since Rel. 10 or earlier.
At some point somebody told me that the "ifconfig_lo0" setting is no longer necessary (but as we have just seen in another thread, it is still useful to have it there, to know the place where to properly add further options), and at some point the fibs did appear.

It seems to me somebody did insert whatever automation into the /etc/rc.network & friends, and didn't do it all too cleanly. But as long as things just work, I didn't bother to look at it and possibly clean it up.
 
At some point somebody told me that the "ifconfig_lo0" setting is no longer necessary
Neither is the network_interfaces, it gets those automatically too. The OP doesn't have those settings in his rc.conf though, so that can't be it.
 
You sure? The one I checked didn't have that routing error message anywhere.

Do you have any jails running?
No, I do not have jails. And I check agin and there are no errors but on the display I see those failed messages...
I do not understand.
 
Neither is the network_interfaces, it gets those automatically too. The OP doesn't have those settings in his rc.conf though, so that can't be it.
Okayokay. Mostly clean test installation with:
FreeBSD 15.0-PRERELEASE #0 main-n279771-027be99b1f33

Code:
route: message indicates error: File exists
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 192.168.97.17
route: message indicates error: File exists
add host ::1: gateway lo0 fib 0: route already in table
 
So...

rcorder:
Code:
...
netif
static_arp
resolv
pfsync
devd
pflog
ppp
stf
rtsold
static_ndp
defaultroute
bridge
routing
...

Somewhere inside rc.d/routing:

Code:
+ setvar _if _loopback
+ _var=route_IF
+ _default=''
+ prefix=route_
+ suffix=''
+ eval echo '${route__loopback-}'
+ echo -inet 127.0.0.1 -iface lo0
+ route_args='-inet 127.0.0.1 -iface lo0'
+ [ -n '-inet 127.0.0.1 -iface lo0' ]
+ /sbin/route add -inet 127.0.0.1 -iface lo0
route: message indicates error: File exists
add host 127.0.0.1: gateway lo0 fib 0: route already in table

console.log:
Code:
Starting Network: lo0 vtnet0.
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
[...]
Starting devd.



Code:
    # Provide loopback route in all routing tables.  This has to come
    # first so that any following routes can be added.
    static_routes="_loopback ${static_routes}"
    route__loopback="-inet 127.0.0.1 -iface lo0 ${_fibmod}"
...
    # Install configured routes.
    if [ -n "${static_routes}" ]; then
        for i in ${static_routes}; do
            _skip=0
            if [ -n "$_if" ]; then
                case $i in
                *:$_if)    ;;
                *)    _skip=1 ;;
                esac
            fi
            if [ $_skip = 0 ]; then
                route_args=`get_if_var ${i%:*} route_IF`
                if [ -n "$route_args" ]; then
                    ${ROUTE_CMD} ${_action} ${route_args}
                else
                    warn "route_${i%:*} not found."
                fi
            fi
        done
    fi
 
Back
Top