Some help with system logs (warn odhcpd[1933]: No default route present, overriding ra_lifetime!)

I have lots of these messages: warn odhcpd[1933]: No default route present, overriding ra_lifetime!

Obv I found similar thread: Odhcpd[2134]: No default route present, overriding ra_lifetime!

The solution is to suppress this but how can it be properly solved if you don't have an actual ISP with IPv6 capabilities as I do? Can I just go to Network > Interfaces > and delete wan6?

Absolutely.

1 Like

The error is still appearing. I guess I need a full IPv6 removal somehow?

One of your interfaces still has it on. I just fixed this issue for myself yesterday.

Check both the "Interface" options on each interface and then go to the devices tab and check each device for having IPV6 disabled.

Once all interfaces / devices have it off it will go away. Other than knowing this information there isnt a current way to disable IPV6 globally in one click.

image

image

Actually, I just checked this morning and its back. Not happening nearly as much as before. Ill have to continue to see if I can find out what's happening.

Sat Nov 30 08:45:22 2024 daemon.warn odhcpd[1221]: No default route present, overriding ra_lifetime to 0!

Using this: https://openwrt.org/docs/guide-user/base-system/dhcp and Daemon warning in log - #3 by Peacefuleight

It pointed me to the DHCP control file. /etc/config/dhcp

I manually removed the DHCPv6 entries. Im going to evaluate if this solves my issue, possibly yours too.

Even with IPV6 off the following entries were still being found,
image

Update:
Appears that edit didn't fix it either. I could probably go scorched earth and remove the DCHPv6 packages but that would be counter intuitive as IPV6 is growing rapidly in implementation, mostly with the cellular providers.

Now I'm trying putting the default IPV6 route back on the LAN interface. Its a private address and I removed it because I didn't want to hand out IPV6 anything internally. Ill continue to monitor and let you know if I find the fix for the log spam. Just note that these logs are not detrimental if you don't use IPV6 but they can bloat logging. Optionally you can change the log level so you dont see them anymore as well.

Its been about 15-20 min now with none of those logs anymore. So it appears that removing the "default" route in the Global Network Options for IPV6 might likely be the source of the problem. I mean looking at the logging it is complaining of missing a default route so this tracks.

I would think that this is likely a bug that can be fixed or a note put on the Global Network Options page notify the user that a default route must be populated if IPV6 packages are installed, even if disabled or not used.

Run these commands:

uci set dhcp.lan.ra_default='2'
uci commit dhcp
service dnsmasq restart

It is just log. Does it cause any performance issue?

If you do not have an ipv6 Internet feed, no, there is no performance issue. It is a warning (that there is no default route and the ra_lifetime is being overridden).
Setting ra_default='2' configures the override in advance.

What does '2' equal? I mean your fix seems very simple but just trying to understand why with IPV6 disabled this becomes an issue.

I feel like setting an arbitrary value might end up causing performance issues down the line since the ra_lifetime continues to function for no purpose.

I haven't looked into this but could we not just split v6 into its own service and just disable the service globally? Not sure if that's possible, just spitball ing, but I intend to look into this. Its been a LONG time since my Cisco classes.

The ability to completely disable IPv6 has been removed in a lot of areas. For example, IPv6 is built into the kernel (much like IPv4), and Linus Torvalds himself signed off on the commit to make such "disable IPv6" flags non functional.

Basically - you'll be rigging non-standard configs to make your device ignore, "disable" or "sidestep" IPv6.

I'm sure the other user can expound on the '2' setting.

1 Like

@gameinn @lleachii

Description of the setting for ra_default can be found in the dhcp documentation previously linked by @GWTechTalk
Extracted from there:

ra_default Default router lifetime in the RA message will be set if default route is present and a global IPv6 address (0) or if default route is present but no global IPv6 address (1) or neither of both conditions (2)

This is not suppressing an error. The message in the logs is a warning. Setting ra_default to "2" in the config (of odhcpd) removes the need for a warning.

FYI we are talking about "Router Advertisment".
You can take a deep dive into the subject by starting here:
https://www.rfc-editor.org/rfc/rfc4861#page-19

2 Likes

Either way, I appear to be right about the log occurring when the Global Prefix variable is empty. Having a default in there prevents the log from occurring as well as @bluewavenet 's suggestion.

Blue's suggestion is likely the official way to fix this that I didn't understand. Would be conducive to new users to have this option by default set to '2' when your DHCPv6 server is disabled.

I would think it could be possible to have a secondary command on disabling the IPV6 on the primary DHCP interface or bridge to set this value preventing confusion. But I'm thinking more like a home consumer and not that of an enterprise of which might have use for a config such as this?

Think of it like:
odhcpd: "Just so you know, there is currently no default route, just saying"

Setting the config option of ra_default to 2, tells odhcpd not to bother telling us because we already know.

If a default route appears eg because an ipv6 feed comes online, then, with ra_default set to 2, there is no downside, everything still works.

However if you cripple ipv6 in some way, like leaving Global Prefix empty etc., then ipv6 routing will fail when the ipv6 feed comes online....

3 Likes

Great explanation!

Still happening for me.

it really is a pain

Too bad giving it an actual default route...:

root@OpenWrt:~# ip -6 route add blackhole default

... does not shut up odhcpd :clap: :joy:

Maybe head over to the "feature request" thread that's ongoing right now and post an FR

Would it be reasonably safe to service odhcpd disable instead ?

I mean if user does not intend on using IPv6 at all.