I have a router running OpenWrt and a machine with embedded Linux built with Yocto. I need to detect lease renewing in my C application. On my router I decrease lease time to 30 seconds. When I log on Linux to my OpenWrt network and get DHCPv6 address I can ping from my Linux to the router (from address assigned by DHCPv6 server). But each time when the address is renewed ping starts to show nothing. No error, no information that network is unreachable, just nothing. At this time tcpdump still shows ICMP6 echo requests and ICMP6 echo replays. What can cause that ping shows nothing after renewing the address?
This is my router configuration in /etc/config/dhcp
:
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '50'
option leastime '30s'
option dhcpv6 'server'
option ra 'server'
option ra_useleasetime '1'
option ra_lifetime '30'
EDIT
I repeated the tests 3 times with the ip -6 route
and I did not get the entry with the changed metric. The only thing that changed was the expire time. ip -6 route
when ping works:
fd33:a242:c52a::581 dev wlan0 proto kernel metric 256 pref medium
fd33:a242:c52a::/64 dev wlan0 proto kernel metric 256 expires 53sec pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
ff00::/8 dev eth0 metric 256 pref medium
ff00::/8 dev wlan0 metric 256 pref medium
When ping doesn't work:
fd33:a242:c52a::581 dev wlan0 proto kernel metric 256 pref medium
fd33:a242:c52a::/64 dev wlan0 proto kernel metric 256 expires 51sec pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
ff00::/8 dev eth0 metric 256 pref medium
ff00::/8 dev wlan0 metric 256 pref medium