All,
Trying to figure out and resolve this one small issue with an otherwise fantastically functioning install:
dhclient isn't setting the default gateway upon reboots. If I try and release renew it doesn't disappear either, but consistently every time it reboots the default GW is not set (evidenced by netstat -rn). To work around it, I log in via ssh and simple add the route:
route add -net 0.0.0.0/0 xxx.xxx.206.1
The sequence of initial offer, acceptance, binding, down through creation of /etc/resolve.conf, is all in this snippet of:
`cat system_$date.log | grep dhclient`:
<13>1 2025-07-28T20:45:41+00:00 OPNsense.localdomain dhclient 84808 - [meta sequenceId="275"] dhclient-script: Reason PREINIT on igc0 executing
<13>1 2025-07-28T20:45:44+00:00 OPNsense.localdomain dhclient 88337 - [meta sequenceId="276"] dhclient-script: Reason REBOOT on igc0 executing
<13>1 2025-07-28T20:45:44+00:00 OPNsense.localdomain dhclient 90459 - [meta sequenceId="277"] dhclient-script: New IP Address (igc0): xxx.xxx.207.105
<13>1 2025-07-28T20:45:44+00:00 OPNsense.localdomain dhclient 91427 - [meta sequenceId="278"] dhclient-script: New Subnet Mask (igc0): 255.255.254.0
<13>1 2025-07-28T20:45:44+00:00 OPNsense.localdomain dhclient 92892 - [meta sequenceId="279"] dhclient-script: New Broadcast Address (igc0): xxx.xxx.207.255
<13>1 2025-07-28T20:45:44+00:00 OPNsense.localdomain dhclient 94485 - [meta sequenceId="280"] dhclient-script: New Routers (igc0): xxx.xxx.206.1
<13>1 2025-07-28T20:45:44+00:00 OPNsense.localdomain dhclient 98935 - [meta sequenceId="281"] dhclient-script: Creating resolv.conf
<13>1 2025-07-28T20:48:04+00:00 OPNsense.localdomain dhclient 19396 - [meta sequenceId="277"] dhclient-script: Reason PREINIT on igc0 executing
<13>1 2025-07-28T20:48:05+00:00 OPNsense.localdomain dhclient 20357 - [meta sequenceId="278"] dhclient-script: Reason ARPSEND on igc0 executing
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 20625 - [meta sequenceId="279"] dhclient-script: Reason ARPCHECK on igc0 executing
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 21035 - [meta sequenceId="280"] dhclient-script: Reason BOUND on igc0 executing
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 21550 - [meta sequenceId="281"] dhclient-script: New IP Address (igc0): xxx.xxx.207.105
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 21803 - [meta sequenceId="282"] dhclient-script: New Subnet Mask (igc0): 255.255.254.0
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 22202 - [meta sequenceId="283"] dhclient-script: New Broadcast Address (igc0): xxx.xxx.207.255
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 22415 - [meta sequenceId="284"] dhclient-script: New Routers (igc0): xxx.xxx.206.1
<13>1 2025-07-28T20:48:06+00:00 OPNsense.localdomain dhclient 23121 - [meta sequenceId="285"] dhclient-script: Creating resolv.conf
My question is why is it not setting default gateway that's clearly in the lease / offer? I can replicate this on reboot without fail. I also tried deleting the lease file entirely, and rebooting. It doesn't seem to change just restarting dhclient. It shows the lease history, but the last one and the majority of the entries look like this:
interface "igc0";
fixed-address xxx.xxx.207.105;
option subnet-mask 255.255.254.0;
option time-offset -25200;
option routers xxx.xxx.206.1;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
option dhcp-server-identifier xxx.xxx.xxx.xxx;
option dhcp-renewal-time 48204;
option dhcp-rebinding-time 75600;
renew 2 2025/7/29 01:06:44;
rebind 2 2025/7/29 10:06:44;
expire 2 2025/7/29 13:06:44;
I stripped out time, dns, and log server entries since that would seem to be irrelevant, also redacted the first two octets just for prudence.
I found initially that the cable modem was offering an RFC1918 address just before allowing the carrier DHCP passthrough to complete, giving me two conflicting default gateways that would need to get removed/replaced out by the second offer. I found the option in igc0's dhclient config to ignore DHCP addresses from the cablemodem's ip as shown in the lease under option dhcp-server-identifier.
Upon reboot, there's still no default gateway after successful dhcp configuration.
Is there ... some sort of way I could further debug dhclient's interaction with fib0 and figure out why the default route isn't being installed into fib0?
The address assigned has a /23 netmask and a gateway within the subnet range (xxx.xxx.206.0/23 = xxx.xxx.206.1 --> xxx.xxx.207.255, so the 206.1 is within the broadcast (arp) range, aka connected. There's no issues adding it with the simple route add command, but I think I shouldn't need to.
I also looked at the /conf/config.xml for the wan / igc0 interface, and it doesn't appear there's anything amiss at a glance.
<wan>
<if>igc0</if>
<descr/>
<enable>1</enable>
<spoofmac/>
<blockpriv>1</blockpriv>
<blockbogons>1</blockbogons>
<ipaddr>dhcp</ipaddr>
<dhcphostname/>
<alias-address/>
<alias-subnet>32</alias-subnet>
<dhcprejectfrom>192.168.100.1</dhcprejectfrom>
<adv_dhcp_pt_timeout/>
<adv_dhcp_pt_retry/>
<adv_dhcp_pt_select_timeout/>
<adv_dhcp_pt_reboot/>
<adv_dhcp_pt_backoff_cutoff/>
<adv_dhcp_pt_initial_interval/>
<adv_dhcp_pt_values>SavedCfg</adv_dhcp_pt_values>
<adv_dhcp_send_options/>
<adv_dhcp_request_options/>
<adv_dhcp_required_options/>
<adv_dhcp_option_modifiers/>
<adv_dhcp_config_advanced>advanced</adv_dhcp_config_advanced>
<adv_dhcp_config_file_override/>
<adv_dhcp_config_file_override_path/>
</wan>
I'm at a loss of where to take this further to troubleshoot, would appreciate any pointers.
How is the gateway configured (System: Gateways: Configuration)? Is it shown as "online" there?
The default route is not set by dhclient itself because there can be many default gateway candidates.