Setting ip range

Greetings,

currently, I'm using openwrt-23.05 with a none standard ip range, it seems that in 24.10, I cannot use it, only the default one works, the reason for it is that setting my none standard ip range sets dhcp-range in /var/etc/dnsmasq.conf.cfg01411c to an invalid entry, is it a bug in openwrt/dnsmasq or it is a new limitation on ip ranges?
my range is 23.179.17.xxx

Thanks

When you say 'my range' do you mean that's an IP block you own? Or just a random range you've selected?

What's the output of:

cat /etc/config/network
cat /etc/config/dhcp

here:

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '1'
        option limit '156'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        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'

root@OpenWrt:~# cat /etc/config/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 'fd92:6961:97da::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
        list ports 'eth1'
        list ports 'eth3'
        list ports 'eth4'
        list ports 'eth5'
        list ports 'eth6'
        list ports 'eth7'
        list ports 'wan0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '23.179.17.138'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ports 'eth0 eth1 eth3 eth4 eth5 eth6'

config interface 'wan'
        option device 'eth2'
        option proto 'pppoe'
        option username 'eyalllllll@054'
        option password 'q1X67uf4'

config interface 'wan6'
        option device 'eth2'
        option proto 'dhcpv6'

it is a range I selected for the private network, it isn't exposed outside of my lan

Any particular reason you're not using IPs from the ranges specifically set aside for private use?

none specific, just don't like the 192.168,x,x ones...

Well use one of the other ranges then. Randomly selecting and using globally addressable IP ranges is not good practice.

But, in terms of your issue, your specified DHCP pool is invalid. You're telling DNSmasq to use a pool of 150 addresses starting from xxx.xxx.xxx.139 and there aren't that many addresses in a /24 block.

so I can set my router to 23.179.17.1 and the rest will be accessible using 23.179.17.xxx?

Probably, but you shouldn't.

1 Like

you mentioned other ranges, where can I find that list?

'Private' IP address ranges are:

10.0.0.0/8 IP addresses: 10.0.0.0 - 10.255.255.255
172.16.0.0/12 IP addresses: 172.16.0.0 - 172.31.255.255
192.168.0.0/16 IP addresses: 192.168.0.0 - 192.168.255.255

so I can take any sub range in the above ones?

Could it be you have no clue what you are actually doing and you have no idea what a "Network" and what a "Subnet" is, do you?!

2 Likes

Yes, all IPs within those ranges have been set aside for 'private' use.

no sure I understand what you are trying to say

thanks for all the help

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