100 is the offset from the network address, in the default configuration this would mean start leasing addresses from 192.168.1.100,
My reading of this is that the default starting network address is 192.168.1.0.
In other parts of the same document, I see the use of the other two private netblocks 10.0.0.0 and 172.16.0.0 in examples. However, I can not find the instruction about how to specify either of them to be the default network address for a DHCP Pool. Please advise.
Yes, this is the default network used by default for LAN in OpenWrt.
In order to use numbers in that range for a DHCP lease, you must renumber your LAN to use one of those network numbers instead. This is called renumbering your Local Network.
See:
You renumber your LAN:
on the LuCI web GUI under Network > Interfaces > LAN; or
Could you give me the URL to the description for this?
How does the part of document describing this procedure relate to the what I have been reading in the main OpenWrt Documentation - User Guide where I picked up the question?
If I understand properly, the question that I am asking is at a level that is deeper than the Documentation covers. It is probably described inline with the source code. I need to actually experiment with the OpenWrt code to find out.
You so not configure the network segment in the DHCP pool, you configure the network segment in the LAN interface, then the start and length of the pool in the DHCP configuration.
The DHCP server uses the first address in the subnet block, plus the configured "start" parameter, as the starting point. The first and last IPs in a subnet block are reserved for broadcast purposes and can't be used by a client. For a /24 block those would be the addresses that end in .0 and .255.
Note that unlike some other routers, OpenWrt / dnsmasq DHCP addresses are not assigned in numerical order as clients connect. They are based on hashing the client's MAC address so they land "randomly" somewhere within the assignable range. But they will always be in the assignable range.
In order to use working IP addresses (i.e. that will route and forward), the DHCP system running on the network must issue addresses and configurations EXACTLY IDENTICAL to the configs of the running network itself. OpenWrt handles that by only configuring DHCP to use "offsets" (as you describe them).
Dynamic Host Configuration Protocol (DHCP) servers runs on most consumer-grade or end-client routers and Access Points. It is not required to run a network. In a case where a network does not use DHCP, it's called Static Addressing. Perhaps this helps on your confusion on DHCP network numbering and network Interface configurations relating to one another.
Aren't we mixing different concepts here? On one side there is the network interface, on the other side is the DHCP server, and in the middle there is UCI. I would first decide what do you need, in terms of functionality, and then how (if possible) to configure that using UCI.
You can have several network segments in the same interface, and you can configure that using UCI (see https://openwrt.org/docs/guide-user/network/network_interface_alias). Now, having a DHCP server on a multi-segment network interface (if you need it, you can always experiment using static IP addresses) is a bit trickier, and I do not think you can configure that using UCI; but that does not mean that it cannot be done, perhaps you will have to configure DNSMASQ manually, perhaps you will have to use another DHCPd.
Thank you for bring up the "Divide and Conquer" approach to keep this Q&A orderly.
My basic question is whether the DHCP pool starting address may be specified (changed from the default)?
If so, is there any documented procedure?
Using UCI may be the way to do it. But, it opens up another set of topics of how to use it to accomplish the goal in Pt. 1).
Several network segments in the same interface leading to some complications that you stated is something that I should avoid at this preliminary phase of the study.
As to static address assignment, it may be related to eventual configuration of the environment that I may be set up. It can be treated as a special case of DHCP, so that we do not need to look at at this juncture.
So, please guide me through the first three steps. We should put steps 4 & 5 aside for now.
Basic operations like points 1-3 are almost self-explanatory in the LuCI GUI. You really should just install OpenWrt on something and try it. Point 5 is usually handled by making DHCP reservations (which is supported by the GUI) instead of having a mix of static and dynamically assigned addresses on the same network.
Multiple networks on one interface is an advanced topic and usually there is a better way to do what you are trying to achieve without having multiple networks on one interface. The one exception is having a cable modem where the WAN obtains a public IP address from the cable system as a DHCP client, and also holds a private static IP to allow logging into the modem. In that case there is no DHCP server in the router for either use of the WAN port.
In general the more complete documentation assumes you're going to configure with the CLI. Searching the OpenWrt wiki will find pages like this one: https://wiki.openwrt.org/doc/uci/dhcp
The starting address for the DHCP pool is constructed from the IP address of the interface ("option ipaddr" at /etc/config/network) and the range defined for that interface ("option start" at /etc/config/dhcp).
Appreciate you instructions and explanations. Indeed, the first three steps should be fairly straightforward. I was just lost while trying to navigate through a set of unfamiliar documents and terminology.
With the above understanding, I looked at some off-the-shelf routers. It seems from their GUI descriptions that some of them are pretty open about specifying the LAN address and DHCP parameters. I have not touched these for a long time. And, of course there was not a situation that I wanted to pay attention to them from this angle back then. I will try to decide one of them from the store to attempt changing the configuration parameters.
Actually, now that you helped me to focus on these two sets of parameters, my experiment becomes really simple. That is, take one of the common working retail routers and set its LAN address to say 240.1.1.1 and pick two no-zero numbers (say 100 and 250) to set the starting and ending addresses of the DHCP pool. With all IoTs on this LAN set to DHCP client mode, can they PING one another (or equivalent operation) successfully? Based on what I learned from tests performed by other colleagues on a different thread, the IoTs need be Linux based PC, because Windows may not send the packet out.