Static v Dynamic Lease Help Required

I have invested in an MTK MT7621AT Router (512MB Memory /32MB Flash) preloaded with Openwrt 19.07.02 clean.

PROGRESS
I have placed the OpenWrt router between my ISP router and my WiFi Mesh router (and repeaters).

The ISP router uses fixed addresses (DHCP disabled) for its separate network 192.168.1.0 and only connects a couple of items (a Digital to Analog IP telephone converter on 192.168.0.65 and the Openwrt router set to 192.168.1.10). It also runs (one separated network) our landline telephone. I used 192.168.1.20 to connect the mesh router to in order to set it up then converted the mesh router from Router Mode to Access Point.

I then installed OpenVPN and managed to get it to work so that any client accessing the network is routed directly to the VPN and the internet works fine (initial connection can take longer than usual but it works).

I have then set a bunch of static IP addresses on the Openwrt router to reserve the same address for each item for management control and/or because they need fixed IP addresses (e.g., my V@Box TV distribution box that connects to my Kodi instances).

This is where the fun started.

THE ISSUE
Let's use my iPhone as the example. If I connect to the server using automatic, everything works. However, it is not connecting using the reserved address of .100 but an allocated address of .159 even though the MAC address and hostname are allocated in the fixed lease list. It correctly finds the DNS server of 10.0.0.1. However, if I then manually enter the IP addresses for the machine, subnet (255.255.255.0) and the router (10.0.0.1) it stops working. Dead. Well for internet or other (internal) network addresses anyway, it will still find the Openwrt router on 10.0.0.1.

On the iPhone (not all devices allow this) I can also see the DNS settings as a separated list. When I enter a manual IP address, the DNS remains at automatic but it clearly is not finding the DNS server of 10.0.0.1 because when I change it to manual and enter the DNS address, everything starts working again.

2 QUESTIONS
My first question is why is the DHCP server not allocating the reserved address to the device? Even after the address is manually set and used, the DHCP issues a new lease when I go back to automatic. I know I can set a fixed address for every device (by also setting the DNS) but that rather defeats the point of a reserved address doesn't it?
My second question is why is the DNS (including search domains) not correctly set when I add a manual IP address?

I know Iam probably doing something wrong or not understanding what can be done properly so don't hold back in your answers!

Thanks in advance.

Geoff

First off if your WAN connection from the ISP router is 192.168.1.X you need to change the OpenWrt LAN to a different subnet such as 192.168.2.1/24. You can't have the same IP range on both sides of a router.

IOS often uses random MAC addresses on WiFi for user privacy. You should not need to reserve an IP for an iPhone because it doesn't take incoming connections anyway.

Thanks. To be clear, the ISP address is dynamically delivered and is 77. something.

The ISP router runs the 192.168.1.0 network.

The Openwrt router runs the 10.0.0.0 network.

The Mesh network used a 10.0.1.0 network to set it up initially but this is irrelevant now that it is in Access Point Mode not Router Mode.

Point taken on iPhones etc. but the question remains for those items that need to be fixed (Kodi example given) and those that cannot have their IP addresses and routers set but need a fixed address (for example my Sonos equipment). In the past I have had issues with a lease that was used by Sonos then being used elsewhere and the Sonos system broke down, hence the need for fixing their addresses now (recommended by Sonos).

G

Thanks for your input.

I think the issue was the time taken for leases to be renewed and Openwrt not always renewing against the fixed lease listing. I removed all entries from /tmp/dhcp.leases, immediately restarted dnsmasq over ssl (service dnsmasq restart) and since then the system has behaved correctly.

It would be useful to have a link icon to be able to remove a lease from the DHCP page (static or dynamic) rather than editing over ssl or ftp but it is not a burning issue.

On to the next issue, separating the LAN by IP address to access the VPN or not. I will open a new post thread if necessary once I have researched.

This can be closed.

Geoff

1 Like

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