Option name being converted to option tag in dhcp file on restore

Here's the version of LuCI my router is on: LuCI openwrt-21.02 branch (git-22.245.77575-63bfee6)](https://github.com/openwrt/luci) / OpenWrt 21.02-SNAPSHOT r15812+899-46b6ee7ffc

So I configured a router and the dhcp file for some static entries. Everything was working fine, tested several devices that were assigned a static IP, it was all good.

I then went to System > Backup / Flash Firmware > Backup and I generated an archive because i need to clone the configuration to several other routers.

I then plugged in a new router and under System > Backup/Flash Firmware > Restore I uploaded the archive I just generated and restored the new router to the configuration from the other router. These are the exact same routers, same model, same maker, etc.

However after this restore the static IP list was all messed up. There were no longer any hostnames tied to the entries despite my initial dhcp file having the "option name" setting configured for each host. I pulled the the dhcp file from the new router and to my surprise the line with "option name" was now gone, and at the end of each host entry was a new line with "option tag" with the hostname from "option name" tied to it.

I am having trouble understanding why upon restore the dhcp file is converting the "option name" field to "option tag" how can I stop this behavior?

This is not safe to do. You can only restore the configuration to the specific device that created it.

What are they?

ubus call system board

I am not a router wizard. I have 25 of the same router I need to configure, I have done this in the past with no issues, on older routers running older openWRT from the same manufacturer (they were Beryl MT1300s, which have been discontinued) I'm unsure how restoring to identical devices is a unsafe?

I will share both the routers here

Router archive was generated from:

root@GL-MT3000:~# ubus call system board
{
	"kernel": "5.4.211",
	"hostname": "GL-MT3000",
	"system": "ARMv8 Processor rev 4",
	"model": "GL.iNet GL-MT3000",
	"board_name": "glinet,mt3000-snand",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02-SNAPSHOT",
		"revision": "r15812+899-46b6ee7ffc",
		"target": "mediatek/mt7981",
		"description": "OpenWrt 21.02-SNAPSHOT r15812+899-46b6ee7ffc"
	}
}

Router archive was restored to:

root@GL-MT3000:~# ubus call system board
{
	"kernel": "5.4.211",
	"hostname": "GL-MT3000",
	"system": "ARMv8 Processor rev 4",
	"model": "GL.iNet GL-MT3000",
	"board_name": "glinet,mt3000-snand",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02-SNAPSHOT",
		"revision": "r15812+899-46b6ee7ffc",
		"target": "mediatek/mt7981",
		"description": "OpenWrt 21.02-SNAPSHOT r15812+899-46b6ee7ffc"
	}
}

It appears that you are running the gl-inet vendor firmware and not official openwrt. It is possible that it is a bug with their firmware, but you would need to ask them on their support channels.

Fortunately, that device works very well with the official openwrt firmware. You can install it easily, but be sure not to keep settings - the gl-inet configuration file syntax is not compatible with that from the official project.

Do you have a recommended build for this router or should I just grab the latest one?

I went to test restoring to the device that I made the archive from, however after some time I noticed that the dhcp list simply updated on it's own from "option name" to "option tag" so yes, there is something else going on and it does not seem related to the restore process. :weary:

https://firmware-selector.openwrt.org/?version=23.05.3&target=mediatek%2Ffilogic&id=glinet_gl-mt3000

Remember not to keep settings.

Thank you, I will set this up now to the best of my ability.

I thought of something now so will bother you again here, apologies. Is there a way to take what I have flashed and configured and export an image I can flash to other of my MT3000 routers so I do not have to flash and then restore from back up in order to clone it? I did some searching around the forums/google but nothing seemed to answer this question.

EDIT:

Actually I found an answer of your's here that seems to be what I'm asking about. It does not seem to be within my current capabilities.

That one is actually quite old and may not be entirely relevant anymore.

I'd recommend that you open a new thread regarding the 'cloning' of settings across multiple devices. We need to know more about your specific goals, requirements and constraints to advise, but there may be some ways to accomplish what you are attempting (for example, a UCI based first-boot script instead of restoring a backup from one specific device to the others).

1 Like