Set a different DHCP Range than the Router IP


I would like my router and other network devices such as servers to have a static IP in the following area.

10.0.0.X (The router has

The DHCP range should start at and stop at

At the moment I solve it like this.

config dhcp 'lan'
        option interface 'lan'
        option leasetime '12h'
        option start ''
        option limit '150'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        list dhcp_option '6,'

But then I get errors in the web interface.
Is there a better configuration for my case?

which web interface and what errors?

I can give the Static IP on client side. Thats OK.

But I want the DHCP range to start at 10.0.1.XXX and not because that’s the router IP.

I think the error comes because of this change

option start ‘’

option start should just be 100. But how can i set the range?

The error is on Foris

## Remote Exception: Internal error invalid literal for int() with base 10: ''('<class 'ValueError'>')

{"module": "lan", "action": "get_settings", "kind": "request"}

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/foris_controller/", line 114, in process_message
    data = module_instance.perform_action(message["action"], message.get("data", {}))
  File "/usr/lib/python3.6/site-packages/foris_controller/", line 60, in perform_action
    res = action_function(data)
  File "/usr/lib/python3.6/site-packages/foris_controller_modules/lan/", line 36, in action_get_settings
    return self.handler.get_settings()
  File "/usr/lib/python3.6/site-packages/foris_controller/", line 110, in inner
    res = func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/foris_controller_modules/lan/handlers/", line 41, in get_settings
    return self.uci.get_settings()
  File "/usr/lib/python3.6/site-packages/foris_controller_backends/lan/", line 104, in get_settings
    dhcp_data, "dhcp", "lan", "start", self.DEFAULT_DHCP_START))
ValueError: invalid literal for int() with base 10: ''

 'DOCUMENT_ROOT': '/www',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_COOKIE': 'foris.session=12dda7a071032916ca7d02f5aa2f6a3e; '
 'HTTP_HOST': '',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
                    'AppleWebKit/537.36 (KHTML, like Gecko) '
                    'Chrome/72.0.3626.119 Safari/537.36',
 'PATH_INFO': '/main/lan/',
 'PATH_TRANSLATED': '/www/main/lan/',
 'REMOTE_PORT': '57262',
 'REQUEST_SCHEME': 'http',
 'REQUEST_URI': '/foris/config/main/lan/',
 'SCRIPT_FILENAME': '/www/foris/config',
 'SCRIPT_NAME': '/foris/config',
 'SERVER_PORT': '80',
 'SERVER_SOFTWARE': 'lighttpd/1.4.50',
 '': <bottle.Bottle object at 0x2c4b870>,
 'bottle.raw_path': '/lan/',
 'bottle.request': <LocalRequest: GET>,
 'bottle.request.urlparts': SplitResult(scheme='http', netloc='', path='/foris/config/main/lan/', query='', fragment=''),
 'bottle.route': <GET '/<page_name:re:.+>/' <function config_page_get at 0x2c47cf0>>,
 'foris.backend': UbusSender('/var/run/ubus.sock'),
 'foris.language': 'de',
 'foris.session': <foris.middleware.sessions.SessionForisProxy object at 0x2e07410>,
 '': {'csrf_token': 'juR4kxOeNNvHnUE317QOnbmPi02WPsJo',
                        'user_authenticated': True},
 '': '12dda7a071032916ca7d02f5aa2f6a3e',
 'foris.version': '99.1',
 'route.handle': <GET '/<page_name:re:.+>/' <function config_page_get at 0x2c47cf0>>,
 'route.url_args': {'page_name': 'lan'},
 'wsgi.errors': <flup.server.fcgi_base.OutputStream object at 0x2e04db0>,
 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x2db7970>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}

Might be just a bug in Foris

but not actually impeding the actual DHCP functionality. You mentioned initially

and thus it would imply that DHCP is working as expected except for that Foris issue. Any issue with LuCI?

LuCI workd fine. There’s no errors.

I believe you want:

option start '100'
option limit '150'

I got that via Foris, though for a little different range and I use a 192.168.x prefix. Generally to minimize problems, I’d suggest to use Foris to set things that can be set in there. When there are multiple configuration layers, I understand it’s quite difficult to support changing stuff on arbitrary layers and propagate meaningfully to others.

I want a DHCP Range from - and a Router IP with

And this without errors in Foris.

I see, I didn’t notice this mismatch. I suppose Foris isn’t designed for more than /24 for LAN. I can’t see why you don’t make Omnia’s LAN, but I guess you have some reasons…

It’s an optical thing for me.
That’s where the autist in me comes out.

But maybe I go then to

In that case I can’t see an argument against DHCP assigning from within 10.0.0.x :slight_smile:

Of course, none of this claims Foris can’t be improved to handle these… it’s just that I’m convinced the Turris team’s priorities are currently elsewhere (and I agree with that).

was this issue reported somewhere? I couldn’t find any mention of it on
I understand that this problem is not critical and does not affect all users but I think it should be fixed anyway. It is not necessary to extend the functionality of Foris to support more complex IP ranges (even though it would be perfect). But Foris should at least display a message that a more complex configuration was set in LuCI instead of giving up and reporting an internal error.

I haven´t any problem with block and Foris.

This issue is not within re/Foris. Let’s say we are somehow strict about what can be configured with re/Foris as we allow only valid values. On the other hand, LuCI neither in SSH, because there isn’t any check if you configured it correctly. You will notice that if you will restart the service. If it does not start, you need to check logs, and if starts, you need to check if there are not any warnings.

You can check it with documentation of OpenWrt for DHCP [1] that the only valid value for start is an integer. It means that should be e.g. 100 as you correctly pointed out. There shouldn’t be an IP address.

Regarding the issue that Foris crashes on it, we know that it does what it does, which is not good for the user experience and we improved the behavior in reForis.


Sorry, it was my fault. I configured LuCI incorrectly which caused an error in Foris. The problem was that I filled in a complete IP as a “DHCP Start” instead of just a number.