Set domain name to access device which is in repeater/range extender mode?

I want to access my device which is in repeater mode (connected to an upstream router) via a host/domain name without changing any configuration on the router.

Currently I could only access the device using DNS suffix provided by the router during dhcp lease.
Is there any way my repeater which is running dhcp client (udhcpc) send its FQDN to router such that router resolves any queries when that FQDN is asked to resolve?
Note I tried option 81 in udhcpc but router over-writes the option with its own domain name in the dhcp ACK

Add something like that to your /etc/config/dhcp

config domain
	option name 'aaa.bbb.ccc'
	option ip ''

Or with LUCI go to Hostnames at Network section.


Actually I want to resolve domain name when device is in repeater mode. In this mode there is no dhcp server running on the device, So etc/config/dhcp doesn't really come into picture. Instead dhcp client is running on the device in this mode. So I need a solution where dhcp client can set or send its own domain name which upstream router should resolve on its behalf.

The server is running, unless you disabled it. Notwithstanding, I think the config goes into the upstream router.

OpenWrt does this? Are you using OpenWrt firmware?

If you have a main router plus a repeater, then all the work fails on the main router; the repeater just authenticate clients on the wireless network, and nothing else. Obviously, there should be no DHCP or DNS on the repeater.

As any other device in your network, that repeater should acquire an IP address from the main router using DHCP; I would recommend reserving a fixed address for all "infrastructure" devices in your network. Also, to reach the repeater using a domain name, you should configure the DNS on the main router accordingly.

1 Like

This is my concern. I do not want to change any settings on the main router. I am looking for a solution where my repeater can tell its domain or FQDN to the main router may be in a dhcp request or somewhere else. That is the requirement.

For example: Let's say I want to access my repeater with abc.lan where abc is the hostname of the repeater and lan is the domain part. As of now I could only send hostname abc to the main router and not "abc.lan" My repeater can be accessed on "abc.local" where local is the domain of the router but I want it to be accessed on "abc.lan" without modifying dns configuration of the main router.

If you are not accessing the repeater from outside your local network just specifying the hostname and ignoring the fqdn should resolve the IP address

Incorrect, an entry placed into the OpenWrt must be a FQDN to work:

It can also be accessed using just the hostname "abc"

Be careful with describing how clients work, and how DNS works. Most DNS servers that aren't at the root level (those servers don't run OpenWRT :wink: ) only respond to queries that are within their domain of authority, and will may query other servers when not (or leave it up to the client to make those additional queries). It is not the server that resolves "abc" into a query for "abc.local".

Many clients have a domain-search list. If the entered hostname does not resolve, then it will append a domain from that list and try again until either successful, or ultimately fails after exhausting that list.

Unlikely possible without modifying the DNS server to do this on a network-wide basis. It is that server and how it interacts with the DHCP server that determines how names are entered into the DNS data store. It is configured as it is configured with respect to "accepting" hostnames from the DHCP clients that contain domain parts.

You can modify name resolution on your hosts, one at a time, in several ways to achieve that goal on a host-by-host basis. The easiest, perhaps, is adding an entry to /etc/hosts for the IP of your repeater.

1 Like

My repeater can only be accessed with abc by appending (.) in the end. For example when I type "abc./", my gateway resolves it and the reason I see that my end client(PC), then probably consider it as FQDN and does not append DNS suffix from its search list.

But I do not want users of repeater to append (./) at the end to access it. It should be a proper domain name, for example "abc.lan"

1 Like

Yes Jeff, You are absolutely right with your part on how client work and that they do append domain part from ther DNS Suffix search list in case user does not enter an FQDN(Fully qualified domain name). That is my concern. I do not want to change anything on my gateway or my end client(PC). I want some setting on the repeater that can make it run smooth.
Also if I append period (.) at the end of the hostname of repeater like abc./, then also it works as I guess my end client sees it as a FQDN and does not append domain part obtained from the router over dhcp or pre-configured in its DNS Suffix search list.
But I want something like abc.lan and not just (.) in the end

On the client device try setting option hostname your.fqdn in the config interface ... section having option proto dhcp. This will specifiy the hostname OpenWrt (udhcpc) sends when requesting a DHCP lease from upstream.

1 Like