I need some help… is it at all possible to add a DHCP client for an interface that does not yet exist ?
The reason I ask - a while back there was a bug that would change the LTE interface name of the Sierra wireless cards which was fixed in 6.30.x. This bug thus left us with numerous Mikrotiks in the field with interfaces such as lte2 , lte3 and lte4 which also have DHCP clients set for those interfaces so that they pick up our APN IP address.
I would now like to upgrade all these to the latest to eliminate that bug but ofcorse if I upgrade them, they will all go back lte1 and the DHCP client will no longer be vailid and I will therefore loose connectivity, and as my only connectivity to these Mikrotiks is over the lte interface I cannot do this.
What I would like to do is set a DHCP client for lte1 so that when I upgrade, they will still get the APN IP address from the LTE interface - I have tried /ip dhcp-client add interface=lte1 but I get “input does not match any value of interface” - is there any way to force this ?
Can the lte1 interface be set to join a bridge?
If so, then you could put the dhcp client on a bridge named lte-bridge, and that way, the interface stays there, but the connectivity doesn’t work until there’s an lte interface on the bridge.
Then again, this might just be moving the problem to “how do I make an interface that doesn’t exist be a member of a bridge when it gets added?”
Yes, it would be nicer with some proper checking if the interface exists and it doesn’t yet have dhcp client, unfortunately RouterOS scripting and myself don’t go well together. But it works fine, because if the interface does not exist, nothing happens. And it won’t let you add two active dhcp clients to same interface either.
This sounds like a great idea! What I ended up doing was exporting the config and saving it as a txt file, then using the reset config with the text file set as “run after reset” and it worked perfectly.