Convert a DHCP server only sitting in the same subnet

Hello I have both GL-AR300M and GL-AR750 they both are great mini travel router.

Currently my existing devices:
internet > fiber modem (192.168.1.1) > wireless router (pppoe with VLAN 500, dhcp, 192.168.43.1) > access point (192.168.43.2)

My existing wireless router or access point have issue with DHCP they are limited to 2 days lease time and they unable to handle to busy renewal ip address, either one of them if I enable it will hang. Perhaps due to many smarthome devices (IoT, IP cameras).

So I wanted to use the one of GL-iNet, either GL-AR300M or GL-AR750 to convert as DHCP server and connect it eithe in my wireless router or access point, within same subnet and serve with following and issue the device with information:

Gateway: 192.168.43.1
Subnet: 255.255.255.0
DNS1: 8.8.8.8
DNS2: 8.8.4.4

How to configure the DHCP server ?

Disable DHCP on your wireless router and set its Static IP to 192.168.43.1. Set access point Static IP to 192.168.43.2.

Configure your GL.iNet device in Router network mode with Static IP 192.168,43,3 and DCHP range 192.168.43.100-192.168.43.199 (for up to 100 IP’s) using MORE SETTNGS → LAN IP. Connect one LAN port to your wireless router, but do NOT connect the WAN side to anything (no wifi, no cable, no tethering, no 3G/4G modem).

If you want to manually set the lease time, you can use LuCI → Network → Interfaces → Edit LAN → DHCP Server.

1 Like

Hi thanks for the reply,

I did this the devices connected it will given the IP address as follow:
Gateway: 192.168.43.3 to the GL.iNet not to my wireless router 192.168.43.1.

That’s way I puzzed no choice to use the GL.iNet as NAT to issue the IP addrress, Gateway and DNS1, DNS2. I can not find the DHCP GL.iNet with DHCP server configuration specificly for the pointed gateway.

The pointed gateway GL.iNet recognized as itself.

You can try the following steps

  1. Disable the DHCP service on the Wireless router
  2. Enable the AR750 to work in accesspoint mode and set the static IP address 192.168.43.2
  3. Run the following command to modify the DHCP Settings of the AR750
uci set dhcp.lan.ignore='0'
uci commit dhcp
/etc/init.d/dnsmasq restart

I have not actually tested the above steps. If there are other problems, I will continue to provide support.

I forgot about the default gateway.

You can try going to LuCI → Network → Interfaces → Edit LAN → DHCP Server → Advanced Settings, then enter the following:

3,192.168.43.1

Click the Save button, then Save & Apply button. Reboot for good measure.

The sample there showing "6,192.168.2.1,192.168.2.2 " what “6” means? and yours what is “3” mean? How can I do more understand on this DHCP-Options settings?

I configured as:

3,192.168.43.1
6,8.8.8.8,8.8.4.4

And the result is:

At this point I decided to set my GL.iNet to “192.168.43.5”.
It seem these configuration is working. But I would like to know more understand where to configure DHCP-Option above, I been looking at https://linux.die.net/man/8/dnsmasq. I still puzzed.

I would to know how to set the DHCP reservation with “permanent” lease time given from GL.iNet? Is it “infinite”?
image

Like this sample DHCP Server with DHCP reservation permanent lease time from my wireless router:
image

There are few places I found related to DHCP, but I still no idea what is the correlation within outside and inside from luci.




Hi do you know how to import or export list of static leases?

The following URL has description of DHCP, including all the DHCP options:

If you use the GL-AR750S as the default gateway, then I think all external traffic will have to hit that device first, instead of going directly to your wireless router.

You can use Static IPs, or set DHCP Lease time to 100000h (which is >10 years) or even higher.

Both the GL.iNet UI and the LuCI UI are really front-ends to the OpenWrt commands and API, so both should show the same settings. GL.iNet developed their UI to be much friendlier and simpler to use for the majority of owners, vs the much more detailed and complicated LuCI UI developed by the OpenWrt/LEDE project. I use the GL.iNet UI for basic functions and only use the LuCI UI if not available.

I think you can add the static IP’s for MAC addresses in the /etc/ethers file:

https://linux.die.net/man/5/ethers

EDIT: Disregard this because /etc/ethers is not used to issue static IP’s.

Thanks, but “infinite” will assign as permanent.

I tried to register about 140 IP addresses and trying to registering them into “Static IP Address Binding” in luci (Network > DHCP and DNS > Static Leases) based on my specific IP ranges and categories, but it seem the devices stop issuing IP address and devices can’t get any IP address, in my “cmd” it said “unable to contact your DHCP server. Request has timed out”. I’m not sure if I registered them to many or something else.

What is the Starting and Ending IP’s in your DHCP range?

Are all the Static IP’s within the DHCP range?

x.6 to x.239
Yes I wanted to assigned all static IP within the DHCP range

If things work with only a few static IP addresses, then there may be a limit on how many can be added.