0

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 
tom654321
  • 3
  • 1
  • 3
  • You need to be looking at the client, not the router. – Michael Hampton Jul 28 '21 at 11:02
  • @MichaelHampton I copy my router configuration to show that I configure both statefull and stateless addresses and change lease time. I do not know what I should look for on the client. The address assigned from DHCPv6 server is not changed. – tom654321 Jul 28 '21 at 11:52
  • Look at everything. Firewall, routing table, interface configuration, `dmesg`, system logs, and anything else I forgot to mention. – Michael Hampton Jul 28 '21 at 11:54
  • I have no entries in iptables. In system logs appear only messages about renewing the address. dmesg doesn't show new messages after renewing the address. `netstat -rn6` shows one more entry: `fd33:a242:c52a::4e2/128 :: Un 0 2 0 wlan0`. I have also very similar entry but with different metric (256 instead of 0). Why this route is added to the table? – tom654321 Jul 28 '21 at 12:26
  • netstat? Why is that obsolete thing even installed on your system? It's embedded, right? Use `ip -6 route`. – Michael Hampton Jul 28 '21 at 12:27
  • @MichaelHampton I repeated the tests 3 times with the ip -6 route and I did not get the entry with the changed metric. I've edited post and copy entries from `ip -6 route`. – tom654321 Jul 28 '21 at 13:10

0 Answers0