Hnet not giving ipv4 addresses to clients

Openwrt 18.06 on RPi with hnet protocol internally, dhcp externally. Router is an edge device. Some of the clients will be IPv4 only so need an IPv4 address, but I can't work out the config options to give them one. By setting ip4mode to 'on' in the 'pa' section of /etc/config/hnet I can get IPv4 addresses on the router's internal interfaces but no addresses are given to the downstream IPv4 clients. If I set ip4mode to the default of 'ifuplink' I don't even get IPv4 addresses on the router's internal interfaces. wireshark shows DHCP Discover requests from the clients but never any replies.

/etc/config/hnet contains

config pa pa
#       option ip4prefix 10.0.0.0/8
         option ip4mode on
#       option ulaprefix fd12:3456:789A::/48
#       option ulamode off
         option persistent_store /etc/hnet-pa.store

/etc/config/network contains

...
config interface 'eth1'
        option proto 'hnet'
        option ifname 'eth1'
        option ip6assign '62'
        option ipv6 '1'
        option dnsname 'hnet-eth1'
...

ifconfig shows that eth1 has an IPv4 address 10.0.111.52 along with GUA, ULA and LL addresses.

Clients only have GUA, ULA and LL addresses but no IPv4 address.

hnet-dump is

{
		"time": 1621886,
		"node-id": "a8015ac8",
		"links": {
			"eth1": 1,
			"wlan0": 2
		},
		"nodes": {
			"a8015ac8": {
				"update": 20,
				"age": 255793,
				"self": true,
				"cap_m": 4,
				"cap_p": 4,
				"cap_h": 4,
				"cap_l": 4,
				"user-agent": "hnetd\/",
				"domain": "home.arpa.",
				"router-name": "openwrt4",
				"router-name": "openwrt4",
				"neighbors": [
					
				],
				"prefixes": [
					{
						"prefix": "fd12:3456:789a:50::\/62",
						"authoritative": false,
						"priority": 2,
						"link": 33554432
					},
					{
						"prefix": "10.0.111.0\/24",
						"authoritative": false,
						"priority": 2,
						"link": 16777216
					},
					{
						"prefix": "10.0.113.0\/24",
						"authoritative": false,
						"priority": 2,
						"link": 33554432
					}
				],
				"uplinks": [
					{
						"delegated": [
							{
								"prefix": "fd12:3456:789a:50::\/62",
								"valid": 600,
								"preferred": 300,
								"domains": [
									
								]
							}
						]
					},
					{
						"delegated": [
							{
								"prefix": "10.0.0.0\/8",
								"valid": 598,
								"preferred": 298,
								"domains": [
									
								]
							}
						]
					}
				],
				"addresses": [
					{
						"address": "10.0.111.52",
						"link-id": 16777216
					},
					{
						"address": "10.0.113.20",
						"link-id": 33554432
					},
					{
						"address": "fd12:3456:789a:50::54",
						"link-id": 33554432
					}
				],
				"zones": [
					{
						"address": "fd12:3456:789a:50::54",
						"search": false,
						"browse": false,
						"domain": "111.0.10.in-addr.arpa."
					},
					{
						"address": "fd12:3456:789a:50::54",
						"search": false,
						"browse": false,
						"domain": "113.0.10.in-addr.arpa."
					},
					{
						"address": "fd12:3456:789a:50::54",
						"search": false,
						"browse": true,
						"domain": "hnet_eth1.openwrt4.home.arpa."
					},
					{
						"address": "fd12:3456:789a:50::54",
						"search": false,
						"browse": true,
						"domain": "hnet_wlan0.openwrt4.home.arpa."
					},
					{
						"address": "fd12:3456:789a:50::54",
						"search": false,
						"browse": false,
						"domain": "5.0.0.a.9.8.7.6.5.4.3.2.1.d.f.ip6.arpa."
					}
				],
				"pim_proxies": [
					
				],
				"ssids": [
					
				]
			}
		}
	}

hnet seems to configure dnsmasq to only do DNS, not DHCP. So openWrt needs to use odhcpd for DHCPv4. Set this in /etc/config/dhcp odhcpd section:

config odhcpd 'odhcpd'
    option maindhcp '1'

Then I get IPv4 addresses on clients.

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