Hi all,
I have a device with several independent network interfaces and I am trying to setup two DHCP servers in two of them, and I want them to provide IP addresses in different range. I have set 3 interfaces as follows:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdd6:1dcb:0eab::/48'
config interface 'wan'
option ifname 'eth1'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.200.6'
config interface 'Bridge'
option proto 'static'
option ifname 'eth0 eth1'
option type 'bridge'
option netmask '255.255.255.0'
option ipaddr '192.168.10.1'
config interface 'lan'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.100.6'
option netmask '255.255.255.0'
If I set the DHCP server on the bridge interface and set "ignore" on the DHCP servers tab of the wan/lan interfaces, I get IP on the clients but on the bridge interface network range. When I try the following configuration it does not reply to any request on any interface:
root@OpenWrt:~# uci show dhcp
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.instance='lan_dns'
dhcp.lan.start='100'
dhcp.lan.leasetime='12h'
dhcp.lan.limit='150'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.instance='wan_dns'
dhcp.wan.start='100'
dhcp.wan.leasetime='12h'
dhcp.wan.limit='150'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
dhcp.lan_dns=dnsmasq
dhcp.lan_dns.domainneeded='1'
dhcp.lan_dns.localise_queries='1'
dhcp.lan_dns.rebind_protection='1'
dhcp.lan_dns.rebind_localhost='1'
dhcp.lan_dns.local='/lan/'
dhcp.lan_dns.domain='lan'
dhcp.lan_dns.expandhosts='1'
dhcp.lan_dns.authoritative='1'
dhcp.lan_dns.readethers='1'
dhcp.lan_dns.leasefile='/tmp/dhcp.leases.lan'
dhcp.lan_dns.resolvfile='/etc/resolv.conf.lan'
dhcp.lan_dns.interface='lan'
dhcp.lan_dns.localservice='0'
dhcp.wan_dns=dnsmasq
dhcp.wan_dns.domainneeded='1'
dhcp.wan_dns.localise_queries='1'
dhcp.wan_dns.rebind_protection='1'
dhcp.wan_dns.rebind_localhost='1'
dhcp.wan_dns.local='/wan/'
dhcp.wan_dns.domain='wan'
dhcp.wan_dns.expandhosts='1'
dhcp.wan_dns.authoritative='1'
dhcp.wan_dns.readethers='1'
dhcp.wan_dns.leasefile='/tmp/dhcp.leases.wan'
dhcp.wan_dns.resolvfile='/etc/resolv.conf.wan'
dhcp.wan_dns.interface='wan'
dhcp.wan_dns.notinterface='loopback'
dhcp.wan_dns.logqueries='1'
dhcp.wan_dns.localservice='0'
What am I missing / doing wrong? Any tips would be appreciated
Many thanks!