Re: Loss of default route

From: Frank Leonhardt <freebsd-doc_at_fjl.co.uk>
Date: Thu, 13 Feb 2025 11:18:16 UTC
On 13/02/2025 08:35, Doug Hardie wrote:
> I am setting up a new server and anytime that "service" is run, it deletes the default route.  I don't have this problem on any other server.  Using 14.2-RELEASE.  The network interface has a fixed IP address.  There are no indications in messages of issues with the network interface. Even a service xxx stop where xxx does not exist removes the default route.
>
> root@checkout:/home/doug # netstat -rn
> Routing tables
>
> Internet:
> Destination        Gateway            Flags         Netif Expire
> default            10.0.1.1           UGS             ue0
> 10.0.0.0/16        link#2             U               ue0
> 10.0.1.212         link#1             UHS             lo0
> 127.0.0.1          link#1             UH              lo0
>
> root@checkout:/home/doug # service ntp stop
> ntp does not exist in /etc/rc.d or the local startup
> directories (/usr/local/etc/rc.d), or is not executable
> root@checkout:/home/doug # !net
> netstat -rn
> Routing tables
>
> Internet:
> Destination        Gateway            Flags         Netif Expire
> 10.0.0.0/16        link#2             U               ue0
> 10.0.1.212         link#1             UHS             lo0
> 127.0.0.1          link#1             UH              lo0
>
>
> /etc/rc.conf includes:
> defaultrouter="10.0.1.1"
>
> If I kill ntpd manually and then start it manually without service, the default route remains and ntpd finds its peers.
>
> -- Doug

I have a clean install of 14.2-RELEASE I'm using for testing ZFS, so 
I've just tried to recreate this and couldn't. And I tried quite hard!

You know defaultroute is kind of like a service in rc.d ? (Not that this 
helps but it might be relevant).

If you post some key files I can try those for you. Anything varying 
from a clean install. My bet is on something in rc.conf is a bit off and 
triggering a bug.

Regards, Frank.