hnetd
hnetd copied to clipboard
Lifetimes on ULA prefix do not get renewed, thus it goes AWOL
Since upgrading to hnetd git master (ab5cbe0) I've noticed that one of my two Homewrt routers forgets its ULA prefix shortly after booting up. After boot, it will learn the ULA prefix from its neighbour, configure it on its local interfaces and advertise it in RAs, but the preferred/valid lifetimes (default 5m/10m) do not refresh and thus the prefix expires not long after. First it just gets deprecated, and eventually deconfigured completely from local interfaces and vanishes from RAs.
This is a hnet-dump
taken on the router named x
, which is the one exhibiting the problem. On the other router, y
, the lifetimes of ULA prefix gets consistently reset when 30 seconds remain of its preferred lifetime. Both x
and y
are running the same version of hnetd. Another thing worth noting is that it is y
who is "originating" the ULA prefix to the Homenet (it shows up as "delegated" to an "uplink" on y
in the hnet-dump).
{
"time": 24386999,
"node-id": "d3a0ef12",
"links": {
"eth0.1": 1,
"eth0.2": 2,
"eth0.3": 3,
"eth0.4": 4,
"eth1": 5,
"wlan0": 6,
"wlan1": 7
},
"nodes": {
"0987fa42": {
"update": 162,
"age": 24078969,
"cap_m": 4,
"cap_p": 4,
"cap_h": 4,
"cap_l": 4,
"user-agent": "hnetd\/",
"router-name": "y",
"router-name": "y",
"neighbors": [
{
"node-id": "d3a0ef12",
"local-link": 3,
"neighbor-link": 4
}
],
"prefixes": [
{
"prefix": "2a02:fe0:c420:1c98::\/64",
"authoritative": false,
"priority": 2,
"link": 1
},
{
"prefix": "fd2c:20ec:a47d:9f::\/64",
"authoritative": false,
"priority": 2,
"link": 1
},
{
"prefix": "2a02:fe0:c420:1c9b::\/64",
"authoritative": false,
"priority": 2,
"link": 2
},
{
"prefix": "fd2c:20ec:a47d:41::\/64",
"authoritative": false,
"priority": 2,
"link": 2
},
{
"prefix": "fd2c:20ec:a47d:69::\/64",
"authoritative": false,
"priority": 2,
"link": 3
},
{
"prefix": "2a02:fe0:c420:1c9c::\/64",
"authoritative": false,
"priority": 2,
"link": 4
},
{
"prefix": "fd2c:20ec:a47d:a9::\/64",
"authoritative": false,
"priority": 2,
"link": 4
},
{
"prefix": "2a02:fe0:c420:1c93::\/64",
"authoritative": false,
"priority": 2,
"link": 5
},
{
"prefix": "fd2c:20ec:a47d:54::\/64",
"authoritative": false,
"priority": 2,
"link": 5
},
{
"prefix": "2a02:fe0:c420:1c97::\/64",
"authoritative": false,
"priority": 2,
"link": 6
},
{
"prefix": "fd2c:20ec:a47d:58::\/64",
"authoritative": false,
"priority": 2,
"link": 6
},
{
"prefix": "10.0.102.0\/24",
"authoritative": false,
"priority": 2,
"link": 1
},
{
"prefix": "10.0.120.0\/24",
"authoritative": false,
"priority": 2,
"link": 2
},
{
"prefix": "10.0.74.0\/24",
"authoritative": false,
"priority": 2,
"link": 4
},
{
"prefix": "10.0.131.0\/24",
"authoritative": false,
"priority": 2,
"link": 5
},
{
"prefix": "10.0.79.0\/24",
"authoritative": false,
"priority": 2,
"link": 6
}
],
"uplinks": [
{
"delegated": [
{
"prefix": "fd2c:20ec:a47d::\/48",
"valid": 599,
"preferred": 299,
"domains": [
]
}
]
}
],
"addresses": [
{
"address": "10.0.102.52",
"link-id": 1
},
{
"address": "2a02:fe0:c420:1c98::1",
"link-id": 1
},
{
"address": "fd2c:20ec:a47d:9f::74",
"link-id": 1
},
{
"address": "10.0.120.29",
"link-id": 2
},
{
"address": "2a02:fe0:c420:1c9b::5d",
"link-id": 2
},
{
"address": "fd2c:20ec:a47d:41::5d",
"link-id": 2
},
{
"address": "10.0.71.33",
"link-id": 3
},
{
"address": "2a02:fe0:c420:1c9f::32",
"link-id": 3
},
{
"address": "fd2c:20ec:a47d:69::61",
"link-id": 3
},
{
"address": "10.0.74.59",
"link-id": 4
},
{
"address": "2a02:fe0:c420:1c9c::50",
"link-id": 4
},
{
"address": "fd2c:20ec:a47d:a9::7b",
"link-id": 4
},
{
"address": "10.0.131.41",
"link-id": 5
},
{
"address": "2a02:fe0:c420:1c93::6a",
"link-id": 5
},
{
"address": "fd2c:20ec:a47d:54::69",
"link-id": 5
},
{
"address": "10.0.79.14",
"link-id": 6
},
{
"address": "2a02:fe0:c420:1c97::7d",
"link-id": 6
},
{
"address": "fd2c:20ec:a47d:58::4e",
"link-id": 6
}
],
"zones": [
{
"address": "2a02:fe0:c420:1c97::7d",
"search": false,
"browse": true,
"domain": "w5.y.home."
},
{
"address": "2a02:fe0:c420:1c98::1",
"search": false,
"browse": true,
"domain": "e1.y.home."
},
{
"address": "2a02:fe0:c420:1c9b::5d",
"search": false,
"browse": true,
"domain": "e3.y.home."
},
{
"address": "2a02:fe0:c420:1c9c::50",
"search": false,
"browse": true,
"domain": "e5.y.home."
},
{
"address": "2a02:fe0:c420:1c9f::32",
"search": false,
"browse": true,
"domain": "e4.y.home."
},
{
"address": "2a02:fe0:c420:1c93::6a",
"search": false,
"browse": true,
"domain": "w24.y.home."
},
{
"address": "2a02:fe0:c420:1c97::7d",
"search": false,
"browse": false,
"domain": "79.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c9c::50",
"search": false,
"browse": false,
"domain": "74.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c93::6a",
"search": false,
"browse": false,
"domain": "131.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c98::1",
"search": false,
"browse": false,
"domain": "102.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c9b::5d",
"search": false,
"browse": false,
"domain": "120.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c93::6a",
"search": false,
"browse": false,
"domain": "3.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c93::6a",
"search": false,
"browse": false,
"domain": "4.5.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c97::7d",
"search": false,
"browse": false,
"domain": "7.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c97::7d",
"search": false,
"browse": false,
"domain": "8.5.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c98::1",
"search": false,
"browse": false,
"domain": "8.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c98::1",
"search": false,
"browse": false,
"domain": "f.9.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9b::5d",
"search": false,
"browse": false,
"domain": "1.4.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9b::5d",
"search": false,
"browse": false,
"domain": "b.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9c::50",
"search": false,
"browse": false,
"domain": "9.a.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9c::50",
"search": false,
"browse": false,
"domain": "c.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9f::32",
"search": false,
"browse": false,
"domain": "9.6.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
}
],
"pim_proxies": [
],
"ssids": [
]
},
"d3a0ef12": {
"update": 908,
"age": 15291,
"self": true,
"cap_m": 4,
"cap_p": 4,
"cap_h": 4,
"cap_l": 4,
"user-agent": "hnetd\/",
"router-name": "x",
"router-name": "x",
"neighbors": [
{
"node-id": "0987fa42",
"local-link": 4,
"neighbor-link": 3
}
],
"prefixes": [
{
"prefix": "2a02:fe0:c420:1c95::\/64",
"authoritative": false,
"priority": 2,
"link": 1
},
{
"prefix": "fd2c:20ec:a47d:25::\/64",
"authoritative": false,
"priority": 2,
"link": 1
},
{
"prefix": "2a02:fe0:c420:1c9d::\/64",
"authoritative": false,
"priority": 2,
"link": 2
},
{
"prefix": "fd2c:20ec:a47d:9d::\/64",
"authoritative": false,
"priority": 2,
"link": 2
},
{
"prefix": "2a02:fe0:c420:1c99::\/64",
"authoritative": false,
"priority": 2,
"link": 3
},
{
"prefix": "fd2c:20ec:a47d:89::\/64",
"authoritative": false,
"priority": 2,
"link": 3
},
{
"prefix": "2a02:fe0:c420:1c9f::\/64",
"authoritative": false,
"priority": 2,
"link": 4
},
{
"prefix": "2a02:fe0:c420:1c91::\/64",
"authoritative": false,
"priority": 2,
"link": 6
},
{
"prefix": "fd2c:20ec:a47d:7d::\/64",
"authoritative": false,
"priority": 2,
"link": 6
},
{
"prefix": "2a02:fe0:c420:1c96::\/64",
"authoritative": false,
"priority": 2,
"link": 7
},
{
"prefix": "fd2c:20ec:a47d:77::\/64",
"authoritative": false,
"priority": 2,
"link": 7
},
{
"prefix": "10.0.8.0\/24",
"authoritative": false,
"priority": 2,
"link": 1
},
{
"prefix": "10.0.57.0\/24",
"authoritative": false,
"priority": 2,
"link": 2
},
{
"prefix": "10.0.25.0\/24",
"authoritative": false,
"priority": 2,
"link": 3
},
{
"prefix": "10.0.71.0\/24",
"authoritative": false,
"priority": 2,
"link": 4
},
{
"prefix": "10.0.85.0\/24",
"authoritative": false,
"priority": 2,
"link": 6
},
{
"prefix": "10.0.123.0\/24",
"authoritative": false,
"priority": 2,
"link": 7
}
],
"uplinks": [
{
"dhcpv6": "001700202a020fe00001000200010000000101102a020fe0000100020001000000010111",
"dhcpv4": "060854d0146e54d0146f",
"delegated": [
{
"prefix": "2a02:fe0:c420:1c90::\/60",
"valid": 1185256,
"preferred": 580456,
"domains": [
"::\/0"
]
},
{
"prefix": "10.0.0.0\/8",
"valid": 555,
"preferred": 255,
"domains": [
"::\/0"
]
}
]
}
],
"addresses": [
{
"address": "10.0.8.56",
"link-id": 1
},
{
"address": "2a02:fe0:c420:1c95::38",
"link-id": 1
},
{
"address": "fd2c:20ec:a47d:25::38",
"link-id": 1
},
{
"address": "10.0.57.1",
"link-id": 2
},
{
"address": "2a02:fe0:c420:1c9d::1",
"link-id": 2
},
{
"address": "fd2c:20ec:a47d:9d::1",
"link-id": 2
},
{
"address": "10.0.25.28",
"link-id": 3
},
{
"address": "2a02:fe0:c420:1c99::5c",
"link-id": 3
},
{
"address": "fd2c:20ec:a47d:89::5c",
"link-id": 3
},
{
"address": "10.0.71.37",
"link-id": 4
},
{
"address": "2a02:fe0:c420:1c9f::25",
"link-id": 4
},
{
"address": "fd2c:20ec:a47d:69::25",
"link-id": 4
},
{
"address": "10.0.85.25",
"link-id": 6
},
{
"address": "2a02:fe0:c420:1c91::59",
"link-id": 6
},
{
"address": "fd2c:20ec:a47d:7d::59",
"link-id": 6
},
{
"address": "10.0.123.32",
"link-id": 7
},
{
"address": "2a02:fe0:c420:1c96::60",
"link-id": 7
},
{
"address": "fd2c:20ec:a47d:77::60",
"link-id": 7
}
],
"zones": [
{
"address": "2a02:fe0:c420:1c95::38",
"search": false,
"browse": true,
"domain": "e1.x.home."
},
{
"address": "2a02:fe0:c420:1c96::60",
"search": false,
"browse": true,
"domain": "w5.x.home."
},
{
"address": "2a02:fe0:c420:1c99::5c",
"search": false,
"browse": true,
"domain": "e3.x.home."
},
{
"address": "2a02:fe0:c420:1c9d::1",
"search": false,
"browse": true,
"domain": "e2.x.home."
},
{
"address": "2a02:fe0:c420:1c9f::25",
"search": false,
"browse": true,
"domain": "e4.x.home."
},
{
"address": "2a02:fe0:c420:1c91::59",
"search": false,
"browse": true,
"domain": "w24.x.home."
},
{
"address": "2a02:fe0:c420:1c95::38",
"search": false,
"browse": false,
"domain": "8.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c91::59",
"search": false,
"browse": false,
"domain": "85.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c99::5c",
"search": false,
"browse": false,
"domain": "25.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c9d::1",
"search": false,
"browse": false,
"domain": "57.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c9f::25",
"search": false,
"browse": false,
"domain": "71.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c96::60",
"search": false,
"browse": false,
"domain": "123.0.10.in-addr.arpa."
},
{
"address": "2a02:fe0:c420:1c91::59",
"search": false,
"browse": false,
"domain": "1.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c91::59",
"search": false,
"browse": false,
"domain": "d.7.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c95::38",
"search": false,
"browse": false,
"domain": "5.2.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c95::38",
"search": false,
"browse": false,
"domain": "5.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c96::60",
"search": false,
"browse": false,
"domain": "6.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c96::60",
"search": false,
"browse": false,
"domain": "7.7.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c99::5c",
"search": false,
"browse": false,
"domain": "9.8.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c99::5c",
"search": false,
"browse": false,
"domain": "9.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9d::1",
"search": false,
"browse": false,
"domain": "d.9.0.0.d.7.4.a.c.e.0.2.c.2.d.f.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9d::1",
"search": false,
"browse": false,
"domain": "d.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
},
{
"address": "2a02:fe0:c420:1c9f::25",
"search": false,
"browse": false,
"domain": "f.9.c.1.0.2.4.c.0.e.f.0.2.0.a.2.ip6.arpa."
}
],
"pim_proxies": [
],
"ssids": [
]
}
}
}
In spite of the hnet-dump output above showing the ULA prefixes assigned to all of x
's links, in reality it is absent, as shown below:
root@x:~# ifstatus e1
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 25271,
"l3_device": "eth0.1",
"proto": "hnet",
"device": "eth0.1",
"metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "10.0.8.56",
"mask": 24
}
],
"ipv6-address": [
{
"address": "2a02:fe0:c420:1c95::38",
"mask": 64,
"preferred": 579535,
"valid": 1184335
}
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "2a02:fe0:c420:1c95::38",
"mask": 64,
"nexthop": "::",
"source": "::\/0"
}
],
"dns-server": [
"2a02:fe0:1:2:1:0:1:110",
"2a02:fe0:1:2:1:0:1:111",
"84.208.20.110",
"84.208.20.111"
],
"dns-search": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
]
},
"data": {
"created": 25,
"dhcpv4": "server",
"dhcpv6": "server",
"dhcpv6_raw": "",
"dnsname": "e1",
"domain": [
"e1.x.home.",
"home"
],
"filter_class": "HOMENET",
"firewall": [
],
"iface_id": [
],
"ip4assign": "24",
"ip6assign": "64",
"link_id": "",
"mode": "auto",
"pd_manager": "\/var\/run\/hnetd_pd",
"prefix": [
],
"ra": "server",
"ra_default": 0,
"ra_management": 1,
"zone": "lan"
}
}
root@x:~# ip a l eth0.1
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether a2:21:b7:bb:03:51 brd ff:ff:ff:ff:ff:ff
inet 10.0.8.56/24 brd 10.0.8.255 scope global eth0.1
valid_lft forever preferred_lft forever
inet6 2a02:fe0:c420:1c95::38/64 scope global noprefixroute dynamic
valid_lft 1184332sec preferred_lft 579532sec
inet6 fe80::a021:b7ff:febb:351/64 scope link
valid_lft forever preferred_lft forever