Turning Off the DHCP Server on OpenWrt


#1

Hello, I wish to turn my Xiaomi Mi 3G and Mi 3 into regular APs, with my Netgear DM200 acting as the main router, but to still have access to things such as the Transmission and FTP services (when I get around to start using them) on both of them, while having them all on the same subnet (the DM200 dictating that subnet), but each time I get around to disabling the DHCP server on them, I cannot access them anymore, resulting in me having to reinstall the firmwares, so I must be doing something wrong.

The DM200 is running OpenWrt proper, the Mi 3G is running PandoraBox (for now, perhaps I'll move over to this new X-Wrt), and the Mi 3 is running the aforementioned X-Wrt.

The Mi 3G is connected via ethernet to the DM200, and the Mi 3 is connected to the Mi 3G via 2.4Ghz WiFi (hence requiring relayd for my needs).

I'd like to receive help understanding what exactly I am doing wrong, since I had tried going according to the "Luci" method (as in GUI) on the wiki.


#2

If disabling the service isn't provided in the third-party firmware you have chosen, you should work through their support channels.

This hasn't changed in the three months since you asked for support for non-OpenWrt firmware before.


#3

A side note: if you disable DHCP you don't need to reset to gain access. As long as you remember the IP of the interface, you just set your PC's IP to a static IP in the same subnet.


#4

This is expected behavior if you disable a DHCP server without statically addressing your entire network or using another DHCP server.

Moreover from the description, the OP's issue is with connectivity - is that they are disabling DHCP...I"m just lost at why the OP then reports that as the problem. The solution is to stop disabling DHCP - or to understand what the DHCP server does.


#5

I think what he means is that he disables DHCP on the APs. But it appears that the relay isn't working, so the AP remains without DHCP server. I imagine this is what happens with the Mi 3 at least. But I am not sure what could be the reason for the other one that's wired.


#6

I am sorry, however I was not clear enough.
@jeff, I asked how to do it on OpenWrt, since it is the same on PandoraBox and X-Wrt, however if there is any difference, I'll find it myself.

As for the title and OP, I was not sure what it is called, with @mhegab understanding what I wish to do. I do not think there is a bug, but rather that I still do not understand how to do this properly.

Please try to understand, I do not like to be spoonfed, I'm just trying to learn (not just how to do it, but through it, also what happens at each step when I do so), so that I can also help others.


#7

Not knowing which wiki page you followed makes things difficult.

Disabling the service can be accomplished through LuCI, by /etc/init.d/<service> disable, or manually removing the symlinks from /etc/rc.d/

To resolve other issues, people will need to understand your topology (how things are connected together, subnets, ...) and what you've done to configure it.


#8

The thing is that, with OpenWrt being free open source highly customizable firmware, it's already overwhelming for the regular users to provide support for the community, particularly as they are volunteering to do it in a time they could otherwise have spent with their families, working or relaxing, but they give this time for the community of OpenWrt.

Manufacturers and other third party firmware communities should be able to support their own firmware.

Not only supporting other firmware will take form the time that could be otherwise be utilized to help OpenWrt users, but also users here are unlikely to be aware of the specifics of those other firmware let alone having them to try.

I have recently had help here to integrate my router with a third party router, so there are on issues with these things as long as the solution lies in the OpenWrt side. But when the issue is at the other side, then the manufacturer or the community of the other firmware are more likely to have the specific answer you want, as a theoretical answer will not really help much.

Anyway, in addition to my reply to the DHCP server point, I would advise you to put aside the Mi 3 for now, as relayd can complicate things. First set static IP for your Mi 3G (in the same subnet but outside router's DHCP pool, so say 192.168.1.10 if your router is 192.168.1.1) and your PC (say 192.168.1.20, with gateway set to your AP IP) and make sure you can access it. Then connect it to the router and see if you have connection. From there you can look into the FTP and whatever you are doing; this is the kind of specific where theory alone will not help.


#9

Thanks, however FTP access will be later, I just want to set up the network hierarchy right now.
And I'm not sure if I did it correctly, however I have access to the Mi 3G, through the Mi 3, via relayd.

About the 3rd party firmware, I agree with you, but again, I had asked how to do it on OpenWrt, with me figuring out the rest by myself (I do not understand chinese, after all).

And this in reply to @jeff, I was trying to follow these two pages for the Mi 3G and Mi 3, respectively:

  1. https://openwrt.org/docs/guide-user/network/lede_as_clientdevice
  2. https://openwrt.org/docs/guide-user/network/wifi/relay_configuration

By the way, I intend to flash the chinese X-Wrt on the Mi 3G soon, so at least it will be running "official" (not really) OpenWrt SNAPSHOT, and once the next stable builds ship, I plan on running OpenWrt proper on both the Mi 3 and Mi 3G, so long that everything is stable, and I have proper reception, so hopefully there won't be any unknown variables in the near future.

Update: relayd is working, however I still have triple-NAT, with the Mi 3 not following the Mi 3G (x.x.x.z is the desired IP address, however x.x.x.n is the ip address that is being given out).
Ultimately I want the DM200 to decide the addresses:
DM200 x.x.x.x
Mi 3G x.x.x.y
Mi 3 x.x.x.z


#10

If this third party firmware is close to official OpenWrt, getting SSH access and editing the /etc/config/dhcp file is the method that is closest to the metal.

Third party GUIs will vary widely, but in the "easy to use" philosophies where the user is offered a limited set of canned options, look for something called "Access Point Only" or a similar mode.


#11

I'll look into that, however the GUI here is LuCi, and unmodified (as in, not a fork or anything of the sort) at that.

nano does make things easier for me.


#12

I don't know about the difference between the two Xiaomi devices, but of course the DM200 will have to be your gateway and router, then you connect one or both Xiaomi to it. I presume that you don't have or don' want to run a cable so you are using relayd.

You make sure that you connect the LAN cable to the Mi 3G in the LAN not WAN port, this should make it same subnet as DM200.

As for relayd, it's a bit tricky. The LAN interface of the Mi 3 should be a different subnet, but its clients should be same network as the main network.

For example

DM200: 192.168.1.1, DHCP range form 192.168.1.100 to 192.168.1.199
Mi 3G: 192.168.1.2, DHCP off. Clients get IPs form DM200 DHCP
Mi 3: 192.168.2.2, DHCP off. Clients get IPs form DM200 DHCP

This might help
https://openwrt.org/docs/guide-user/network/wifi/relay_configuration

Edit: you might have hard time having IPs to be relayed form DM200 to Mi 3. Youcould set static IPs on the clients of Mi 3 to check.


#13

Thanks, the DM200 is the gateway and main router.
The Mi 3G has an MT7261 (dual core, quad thread, at 880Mhz), 256MB of DDR3, 3 Gigabit ethernet ports (1 WAN, 2 LAN), and USB3, as opposed to the Mi 3's MT7260 (single core, at 580Mhz), 128MB of DDR2, 3 100Mbts ethernet ports (1 WAN, 2 LAN), and USB2.

Is there no way to this with the Mi 3G connected via WAN? The IO is very limited on the Xiaomis.
And I'd rather have the Mi 3 on the same subnet, as was possible with the TP-Link RE200 (stock firmware).
I think this should be possible with relayd, that is why I had installed it.


#14

If you connect to the WAN then you will have two different networks. By definition, a "router" will route the traffic between the upstream (WAN) and downstream (LAN), and they have to be different networks.

If you do that, then it should be
DM200: 192.168.1.1
Mi 3G: 192.168.2.1, DHCP on.
Mi 3: 192.168. 3 .1, DHCP off. Clients get IPs form Mi 3G DHCP

I'm not sure what you mean by the IO is limited. Do you mean that you have very few ports? I don't know if you could the WAN port function as LAN.

The clients of the Mi 3 will be on the same subnet as the Mi 3G. It's only the LAN interface that will have different IP. This is how relayd works, as far as I know.


#15

Yeah, I had meant that the quantity of the ethernet ports is limited.
If I can get the WAN port to function as a LAN port, that will probably be the best.

As for relayd, as long as the Mi 3 will appear on the network as being in the same subnet (perhaps via a static IP address), and will follow the DM200's configuration, I guess there is no issue.


#16

I don't know if the WAN port can function as a LAN. You will have to check that.

As for the Mi 3 access, it will have 2 IPs. If you access it from Mi 3G that will be main subnet. If you want to connect to its WiFi and access it's interface, you will have to use the other IP (i.e. 192.168.2.2 in my first example). Obviously, the device accessing it will have to be set to static IP.

But for clients accessing internet (or your LAN) from Mi 3, they should have IPs on the main subnet.

The graph in the link sent illustrate that well.


#17

I'll try researching the whole WAN/LAN thing (if you can configure the LAN port to function as WAN, I guess it should be possible to configure the WAN port to function as LAN).

AS for the Mi 3, that sounds good, especially since giving it a static address will allow me to access it's configuration via the static address as well.
Thanks, though I had already looked at the graph earlier (and it mostly sums up my requirement very accurately).

However, I am still confused how did TP-Link configure the RE200 to follow whatever IP address the host router gives it, including it's configuration, all while staying within the same subnet.


#18

Repeaters and range extenders are designed to do that job. Routers are designed essentially to do routing.


#19

I understand that, but extenders are practically routers, as is proven by flashing OpenWrt on them (I still need to repair my TL-WA850RE).


#20

If it bothers you much, you could use an Ethernet cable to connect Mi 3 to mi 3G or powerline adapters.