I'm using starlink. They are currently in beta. Their ipv6 has a bug where they dont send router advertisements unless a router solicitation is requested. Since ipv6 on openwrt only sends out the solicit transaction on first boot, how can I force router solicitation? Someone on reddit fixed the issue in pfsense but I'm not sure how to apply that to openwrt. This was his solution if it helps explain what I need to do. Maybe just a cron job, but not sure what .sh to run.
Try these commands:
killall -SIGUSR2 odhcp6c
killall -SIGUSR1 odhcp6c
/etc/init.d/odhcpd reload
/etc/init.d/odhcpd restart
ifup wan6
So if I ran that every minute, it wouldn't cause issues would it?
First test it manually, and if one of the commands works, you can add it to crontab.
Wait up to 10 seconds after each command to be sure it has applied properly.
Great. Will test it out. Thank you for the suggestions. I will update with the results.
None of these seem to do what I am after. Killall restarts the ipv6 network as well as ifup wan6. This does repair the issue when it's down but I can't run it every minute or I lose ipv6 for 10 seconds at a time. The goal is to send router solicitation every minute without disrupting the interface. Someone suggested rtsol and cronjob but I'm not understanding that.
Here you go - a Makefile to compile rdisc6 so you can use the identical solution that was used in the reddit link you posted in your first post.
#
# Copyright (C) 2007-2021 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ndisc6
PKG_VERSION:=1.0.4
PKG_RELEASE:=1
PKG_SOURCE:=ndisc6-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.remlab.net/files/ndisc6/
PKG_HASH:=abb1da4a98d94e5abe1dd7b1c975de540306b0581cbbd36aff035118b2f25c1f
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/ndisc6
URL:=https://www.remlab.net/ndisc6/
SECTION:=network
CATEGORY:=Network
TITLE:=NDisc6
endef
define Package/ndisc6/description
NDisc6 is a small collection of useful tools for IPv6 networking
endef
define Package/ndisc6/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndisc6 $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdisc6 $(1)/usr/bin
endef
$(eval $(call BuildPackage,ndisc6))
Then set it to run with a cron job at whatever frequency you desire
If you can't compile it yourself, send me a link to the exact openwrt image download you're using and I'll compile a binary .ipk for you
Wow. I appreciate that. I could have swore I was using the latest stable release and just flashed a week ago but it's saying snapshot. I dont understand that, maybe misclick. In any case if you cant compile a binary .ipk for this, just the stable release would work and I can flash the stable version. Or whatever works best. I don't have anything special I need to save in this config. So to make a long story short if you need a stable branch to compile for i will use this one.
Hostname | OpenWrt |
---|---|
Model | Netgear Nighthawk X4S R7800 |
Architecture | ARMv7 Processor rev 0 (v7l) |
Firmware Version | OpenWrt 21.02-SNAPSHOT r15880-e17e212b51 / LuCI openwrt-21.02 branch git-21.060.51546-bd39e6a |
Kernel Version | 5.4.102 |
Obviously I haven't tested this - your mileage may vary
This is compiled for your current snapshot version - it should work
First install it and just run it to see if it installs/works. Then, if it does I can tell you how to add it as a cron job
It looks like netifd supports a built-in option:
A quick glance at the code of odhcpd seems to show that it only sends a solicit at interface startup. I didn't spend much time looking at the code though
I figured the OP can try the ipk I built first rather than spending a whole lot of time tracing through the code of odhcpd
it installed fine and ipv6 still works. How would i make the cronjob for it? Thank you.
I'm using the command from the reddit post you quoted. Edit the file /etc/crontababs/root
Add the following, changing the eth2
to whatever the physical interface is that is connected to your starlink device.
* * * * * /usr/bin/rdisc6 -q -1 eth2 >& /dev/null
Then restart cron with /etc/init.d/cron restart
Alternatively, go to Luci-->System-->Scheduled Tasks and add the same line. It will add it to the crontab file.
This will run the command every one minute
ok i set it all up... my physical interface is eth0.2 and that's the only thing i changed in your instructions. ill see if this works. Thank you.
seems to be working i think
Thu Mar 18 06:27:00 2021 cron.err crond[10310]: USER root pid 12043 cmd /usr/bin/rdisc6 -q -1 eth0.2 >& /dev/null
Thu Mar 18 06:27:51 2021 daemon.notice netifd: wan (1413): udhcpc: sending renew to 100.127.255.3
Thu Mar 18 06:27:51 2021 daemon.notice netifd: wan (1413): udhcpc: lease of 100.77.195.226 obtained, lease time 300
Thu Mar 18 06:27:58 2021 daemon.notice odhcp6c[6825]: Starting RENEW transaction (timeout 45s, max rc 0)
Thu Mar 18 06:27:58 2021 daemon.notice odhcp6c[6825]: Send RENEW message (elapsed 0ms, rc 0)
Thu Mar 18 06:27:58 2021 daemon.notice odhcp6c[6825]: Got a valid REPLY after 31ms
Thu Mar 18 06:27:58 2021 daemon.info odhcp6c[6825]: IA_PD 0001 T1 0 T2 0
Thu Mar 18 06:27:58 2021 daemon.info odhcp6c[6825]: 2605:59c0:52d8:7100::/56 preferred 150 valid 300
Thu Mar 18 06:27:58 2021 daemon.info odhcp6c[6825]: T1 75s, T2 120s, T3 300s
Thu Mar 18 06:27:58 2021 daemon.notice odhcp6c[6825]: Starting <POLL> transaction (timeout 75s, max rc 0)
Thu Mar 18 06:28:00 2021 cron.err crond[10310]: USER root pid 12248 cmd /usr/bin/rdisc6 -q -1 eth0.2 >& /dev/null
Thu Mar 18 06:29:00 2021 cron.err crond[10310]: USER root pid 12270 cmd /usr/bin/rdisc6 -q -1 eth0.2 >& /dev/null
Thu Mar 18 06:29:13 2021 daemon.notice odhcp6c[6825]: Starting RENEW transaction (timeout 45s, max rc 0)
Thu Mar 18 06:29:13 2021 daemon.notice odhcp6c[6825]: Send RENEW message (elapsed 0ms, rc 0)
Thu Mar 18 06:29:13 2021 daemon.notice odhcp6c[6825]: Got a valid REPLY after 40ms
Thu Mar 18 06:29:13 2021 daemon.info odhcp6c[6825]: IA_PD 0001 T1 0 T2 0
Thu Mar 18 06:29:13 2021 daemon.info odhcp6c[6825]: 2605:59c0:52d8:7100::/56 preferred 150 valid 300
Thu Mar 18 06:29:13 2021 daemon.info odhcp6c[6825]: T1 75s, T2 120s, T3 300s
Thu Mar 18 06:29:13 2021 daemon.notice odhcp6c[6825]: Starting <POLL> transaction (timeout 75s, max rc 0)
So you mean my work wasn't in vain?
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.