Hi,
did it happen to anyone that the new version of openwrt 23.05.x the dhcp does not assign IPv4 addresses?
With version 22.03.05 I have no problem, when I try to upgrade to 23.05.2 the dhcp only assigns IPv6 addresses.
Why? What solution?
Thanks.
I assume that you mean 23.05.2, but what is "ldhcp"?
As you came from 22.03, it is possible that some network/firewall/whatever settings have changed in 23.05. You might try resetting the router and re-configuring from scratch.
(Btw, which router you are talking about? You might check the OpenWrt router wiki, if there is anything special regarding your router.)
Sorry for the spelling errors.
The router is an X86_64 mini pc.
my /etc/config/dhcp is simple:
config dnsmasq 'dnsmasq1'
option authoritative '1'
option domain 'basilicata.nnxx'
option domainneeded '1'
option ednspacket_max '1232'
option expandhosts '1'
option leasefile '/tmp/dhcp.leases'
option local '/ninux/'
option localise_queries '1'
option localservice '1'
option readethers '1'
option rebind_localhost '1'
option rebind_protection '1'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
list address '/wifiauth.nnxx.ninux.org/192.168.182.1'
list server '/nnxx/141.95.18.146'
list server '/nnxx/51.178.46.85'
list server '8.8.8.8'
list server '2001:4860:4860::8888'
list rebind_domain '/nnxx/'
list rebind_domain '/basilicata.nnxx/'
list notinterface 'pppoe-wan'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
dhcp settings look pretty normal, but what about firewall and network config? Anything special there?
In any case, like I said earlier, you might try resetting, to see if the default config works...
(There has been no flood of "dhcp does not work" complaints with 23.05.2, so the symptom is likely related to your config or your build.)
For build i use this script and I have always used without any problems:
my network:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdd9:5aff:96d4::/48'
config device 'device1'
option name 'br-lan'
list ports 'eth1'
list ports 'eth2'
list ports 'eth3'
option type 'bridge'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '10.27.22.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option proto 'pppoe'
option device 'eth0.835'
option username 'myuser'
option password 'mypass'
option ipv6 'auto'
config interface 'ninux_mesh'
option auto '1'
option device 'br-mesh'
option proto 'autoip'
option force_link '1'
option stp '1'
option macaddr '06:48:41:31:5f:35'
config device 'device_ninux_mesh'
option bridge_empty '1'
option ports 'mesh0 mesh1'
option name 'br-mesh'
option type 'bridge'
config interface 'vpnbas'
option proto 'none'
option device 'vpnbas'
config interface 'ZeroTier'
option proto 'none'
option device 'owzt9dd842'
My Firewall:
config defaults 'defaults'
option forward 'REJECT'
option input 'ACCEPT'
option output 'ACCEPT'
option synflood_protect '1'
config zone 'zone1'
option forward 'ACCEPT'
option input 'ACCEPT'
option name 'lan'
list network 'lan'
option output 'ACCEPT'
config zone 'zone2'
option forward 'REJECT'
option input 'REJECT'
option masq '1'
option mtu_fix '1'
option name 'wan'
list network 'wan'
list network 'wan6'
option output 'ACCEPT'
config forwarding 'forwarding1'
option dest 'wan'
option src 'lan'
config rule 'rule1'
option dest_port '68'
option family 'ipv4'
option name 'Allow-DHCP-Renew'
option proto 'udp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule2'
option family 'ipv4'
option icmp_type 'echo-request'
option name 'Allow-Ping'
option proto 'icmp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule3'
option family 'ipv4'
option name 'Allow-IGMP'
option proto 'igmp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule4'
option dest_port '546'
option family 'ipv6'
option name 'Allow-DHCPv6'
option proto 'udp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule5'
option family 'ipv6'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option name 'Allow-MLD'
option proto 'icmp'
option src 'wan'
option src_ip 'fe80::/10'
option target 'ACCEPT'
config rule 'rule6'
option family 'ipv6'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option name 'Allow-ICMPv6-Input'
option proto 'icmp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule7'
option dest '*'
option family 'ipv6'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option name 'Allow-ICMPv6-Forward'
option proto 'icmp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule8'
option dest 'lan'
option name 'Allow-IPSec-ESP'
option proto 'esp'
option src 'wan'
option target 'ACCEPT'
config rule 'rule9'
option dest 'lan'
option dest_port '500'
option name 'Allow-ISAKMP'
option proto 'udp'
option src 'wan'
option target 'ACCEPT'
config zone 'ninux'
option forward 'ACCEPT'
option input 'ACCEPT'
option name 'ninux'
option output 'ACCEPT'
option network 'vpnbas owzt9dd842 ninux_mesh'
config forwarding 'lan2ninux'
option dest 'ninux'
option src 'lan'
config forwarding 'ninux2lan'
option dest 'lan'
option src 'ninux'
config forwarding 'ninux2wan'
option dest 'wan'
option src 'ninux'
config rule 'raspy1http'
option name 'HTTP'
list proto 'tcp'
option src 'wan'
option dest 'lan'
option dest_port '80'
option target 'ACCEPT'
list dest_ip '2a07:7e81:3f1c::6'
config rule 'raspy1https'
option name 'HTTPS'
list proto 'tcp'
option src 'wan'
option dest 'lan'
option dest_port '443'
option target 'ACCEPT'
list dest_ip '2a07:7e81:3f1c::6'
config redirect 'redirect1'
option dest 'lan'
option dest_port '80'
option name 'raspy1http'
list proto 'tcp'
option src 'wan'
option src_dport '80'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect2'
option dest 'lan'
option dest_port '443'
option name 'raspy1https'
list proto 'tcp'
option src 'wan'
option src_dport '443'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect3'
option dest 'lan'
option dest_port '25'
option name 'raspy3smtp'
list proto 'tcp'
option src 'wan'
option src_dport '25'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect4'
option dest 'lan'
option dest_port '587'
option name 'raspy3smtps'
list proto 'tcp'
option src 'wan'
option src_dport '587'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect5'
option dest 'lan'
option dest_port '465'
option name 'raspy3smtpssl'
list proto 'tcp'
option src 'wan'
option src_dport '465'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect6'
option dest 'lan'
option dest_port '587'
option name 'raspy3smtptls'
list proto 'tcp'
option src 'wan'
option src_dport '587'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect7'
option dest 'lan'
option dest_port '110'
option name 'raspy3pop3'
list proto 'tcp'
option src 'wan'
option src_dport '110'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect8'
option dest 'lan'
option dest_port '143'
option name 'raspy3imap'
list proto 'tcp'
option src 'wan'
option src_dport '143'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect9'
option dest 'lan'
option dest_port '993'
option name 'raspy3imaps'
list proto 'tcp'
option src 'wan'
option src_dport '993'
option target 'DNAT'
option dest_ip '10.27.22.6'
config redirect 'redirect10'
option dest 'lan'
option dest_port '2400'
option name 'raspy3ssh'
list proto 'tcp'
option src 'wan'
option src_dport '2400'
option target 'DNAT'
option dest_ip '10.27.22.6'
It looks like the source is not coming directly from openwrt.org.
Have you tried using a firmware image directly downloaded from downloads.openwrt.org (or the firmware-selector
Please feel free to clarify.
do check your lan and wan mac addresses
I have a few routers there wrong
if the lan and wan have the same mac all sort of problems happen
but:
root@ReginaMargherita116:~ # uci export dhcp
package dhcp
config dnsmasq 'dnsmasq1'
option authoritative '0'
option domain 'basilicata.nnxx'
Might be some non-visible character/symbol in the config file.
You might delete the whole line and rewrite it manually in editor.
uci set dhcp.@dnsmasq[0].authoritative='1'
uci show dhcp
dhcp.dnsmasq1.autoritative='1'
uci commit dhcp
uci show dhcp
dhcp.dnsmasq1.autoritative='0'
I try with:
https://firmware-selector.openwrt.org/?version=23.05.2&target=ramips%2Fmt76x8&id=glinet_gl-mt300n-v2
pakages:
base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7603 kmod-nft-offload kmod-usb-ohci kmod-usb2 libc libgcc libustream-mbedtls logd luci mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail swconfig uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls openwisp-config openwisp-monitoring zerotier mesh11sd watchcat avahi-autoipd luci-proto-autoip
and uci-defaults:
uci -q batch <<-EOF >/dev/null
set network.ninux_mesh=interface
set network.ninux_mesh.auto='1'
set network.ninux_mesh.device='br-mesh'
set network.ninux_mesh.proto='autoip'
set network.ninux_mesh.stp='1'
set network.device_ninux_mesh=device
set network.device_ninux_mesh.bridge_empty='1'
set network.device_ninux_mesh.ports='mesh0 mesh1'
set network.device_ninux_mesh.name='br-mesh'
set network.device_ninux_mesh.type='bridge'
set network.ZeroTier=interface
set network.ZeroTier.proto='none'
set network.ZeroTier.device='owzt9dd842'
commit network
EOF
I have idem error: the client receive via dhcp only IP ipv6
Found, it will be a bug on mesh11sd.
If active it does not assign ipv4 to lan
If I disable it, restart the router ...I also have IPv4
I have always used wpad--mbedtls with 802.11s meshes. Just a wirld guess.