I have two TP-Link TL-WR1043ND routers with OpenWrt 22.3.3 on them. One is AP and second is Repeater (configured according to Wireless network bridge (wireless repeater) article). It's working well itselfs. But there's one detail. AP and Repeater are far from each other, and connection between them realizes via two directional antennas (one to one). Sometimes connection losts and 'Repeater segment of the LAN' can't reach internet. But it's not critical. The other thing, that hosts don't receive DHCP lease from AP and can't connect each other too. The manual network settings for PCs in that LAN segment coud be solution. But how to be with net printer? I can't realize how to configure it with manual network settings. However, it works well with DHCP leases.
So, the question, is it possible to 'proper' configure DHCP server on the Repeater? I mean, Repeater's DHCP server gives out leases to 'Repeater segment of the LAN', and not to "Main AP segment of the LAN'?
ps According to How-to (link above), the first repeater configuration step is to change default IP and disable DHCP. Can it be disabled only for AP direction?
This could be approached with symmetric routing. The repeater group would have their own IP subnet and local DHCP server always active in the repeater router. The repeater router makes a wireless connection using a WAN network to the main router and obtains a reserved IP from the main router's DHCP.
Symmetric routing means that it is not the usual lan->wan where LAN users are NATd as they go to the wan. To set this up:
In the repeater, turn off NAT (masquerade) on the wan
In the repeater, configure to allow forwarding wan->lan in addition to the existing default lan->wan.
In the main router, configure a DHCP reservation so the repeater router always has the same IP which you will need for the next step.
In the main router, install the return route: repeater lan.0/24 via repeater's IP on the main lan.
If the printer is in the repeater group, users on that side can always use it as usual even if the link to the main router is down. They would have no Internet or usage of devices on the main lan. Users of the main lan who want to print something will need to manually enter the printer's IP (on the repeater lan) into their OS printer configuration. (The printer should have a DHCP reservation so this IP is always the same). Then the main router will send that traffic through the link to the repeater router which will send it on to the printer.
What the default value? 24h? There was frequently enough when Repeater lost connection to AP and the lease ends up. So, I had Repeater which was inaccessible in any ways. Only waiting when it establish connection again.
Set 30 days? If there will no connection on the 15th, will it try to renew on 16th, 17th...?
Yes, nftables is all ours
The proper configuration of DHCP on both sides? Do you mean the same lease table (HOST-IP-MAC) on both DHCP, so these servers will 'peasely' work just in parallel.
But if I set wireless to WAN, Repeater will not provide network for wireless hosts (smartphones), isn't it?
Are you doing that now? With a AP and STA on single radio there is a problem that if the STA loses its link the AP will shut down.
Anyway, any device connected to the repeater will obtain an IP address in the repeater LAN, which is routable to the Internet assuming the link to the main router is up.
Yes. Repeater provides network for both wired and wireless hosts.
Here's little fragment from howto (see link in my first post):
For wireless connection, one additional step is required:
Create a new wireless interface. You can simply add it in LuCi → WiFi, or create a new wifi-iface section in /etc/config/wireless. Copy all the values from the existing interface, but make two changes: use mode 'ap' instead of 'sta' and leave out the WDS option or set it to 0. SSID and key may be the same as with the host SSID for transparent roaming, but they can also be different. As long as you connect this new interface to lan, which is the default, your other wireless devices connecting through this AP will also be seen as part of the big network.
When Repeater loses connect to main AP, it doesn't matter which interfaces are up or down. Because all hosts from 'Repeater segment of the LAN' can't connect each other ...because that LAN segment doesn't have DHCP.
There's the additional complication that if the link to the main router goes down, the repeater AP will also go off the air and no wireless clients can be served at all. This can be prevented by using the travelmate package. However even with travelmate, the AP will go down for a time before it is determined that the main router AP is not reachable. That will make all the clients reconnect and DHCP again.
Really the best solution to this is to improve the link so that it is reliable.
Tested that. It's not exactly like you describe. The repeater wireless doesn't go down. Android smartphones still can see 'OpenWrt'. On connection it returns "Connected to device. Can't provide internet." Local (repeater's segment of LAN) routings also work.
Seems to be working like I want. But additional tests are needed. Details I will report later.
Well, three weeks passed. No failures were observed. The settings are (only repeater host):
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.2'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
list dns '192.168.1.2'
list dns '192.168.1.1'
option name 'router'
option ip '192.168.1.1'
config dhcp 'lan'
option force '1'