How to disable ipv6 for wan?

syslog said

router odhcp6c[6478]: Failed to send SOLICIT message to ff02::1:2 (Network unreachable)

my isp don't use ipv6 (sic!), how to disable ipv6 dhcp only for this wan interface? On some forum suggest to remove wan6 from config, but some people said this can create "race condition".
Any idea?

Delete the wan6 interface?

Please provide a reference for this statement.

1 Like

on /etc/config/network

config interface 'wan6'
        option device '@wan'
        option proto 'dhcpv6'

became

#config interface 'wan6'
  #      option device '@wan'
    #    option proto 'dhcpv6'
  • That post is 8 years old - odhcpd has new versions since then
  • The subsequent post clearly explains what the poster was discussing regarding IPv6 "race condition" is likely SLAAC
  • Considering SLAAC, the thread says you may still see the message
1 Like

you can disable ipv6 from the device level
it might not make that message go away though

1 Like

You cannot disable IPv6 entirely as it is baked in in a modern kernel.

But you can disable as much as possible with this, from my notes:

Disable IPv6
https://3os.org/infrastructure/openwrt/disable-ipv6/
uci set 'network.lan.ipv6=0'
uci set 'network.wan.ipv6=0'
uci set 'dhcp.lan.dhcpv6=disabled'

# Disable RA and DHCPv6 so no IPv6 IPs are handed out
uci -q delete dhcp.lan.dhcpv6
uci -q delete dhcp.lan.ra

# Disable the LAN delegation
uci set network.lan.delegate="0"

# Delete the IPv6 ULA Prefix
uci -q delete network.globals.ula_prefix

# Disable odhcpd
/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop

# Save changes
uci commit
/etc/init.d/network restart

Optional , you can disable local address assignment via sysctl.conf
net.ipv6.conf.default.disable_ipv6 =1
net.ipv6.conf.all.disable_ipv6 =1 
net.ipv6.conf.lo.disable_ipv6 = 0
loopback left with ipv6 just in case some daemon program needs to be additionally re-configured to disable ip6 sockets.

I have full dual stack from my ISP so have IPv6 fully configured throughout my whole network :slight_smile:

2 Likes

Actually I use this solution
Seems to work

#config interface 'wan6'
#       option device '@wan'
#       option proto 'dhcpv6'
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.