Change Routeros Software Identity

Change Routeros Software IdentityChange Routeros Software Identity

Hey guys, pretty new to scripting here.i'm looking for a way to add to an existing script the ability to automatically set the system identity, based on the MAC address of the WAN interface. What i want it to do is get the MAC address of the interface of choice (which will be specified by the variable) and set the. Jul 13, 2006. Router Identity. Date and Time. Property Description. System Clock Manual Adjustment. Property Description. Configuration Change History. Command Description. Software Package Management. System Clock and NTP.

Hey guys, pretty new to scripting here.i'm looking for a way to add to an existing script the ability to automatically set the system identity, based on the MAC address of the WAN interface. What i want it to do is get the MAC address of the interface of choice (which will be specified by the variable) and set the system identity to that value. So basically::global IDENTITY xxx (where xxx is the name of the interface, i.e., ether1, ether2, etc). I know that /system identity set name= xx:xx:xx:xx:xx:xx is how to set the system identity, but i just don't know how to get the name set to the value that is pulled when setting the variable. I'd appreciate any help you guys could provide. Well, yes, there's no:end command.

If you want to stop a script from running, use:return instead, or branch out, as I did in my previous example. As for the Wireless/Ethernet check. You can simply check whether the output of one is an empty string, and try the other if it is. You keep wanting to do a sequence of:if commands that check for a specific name. Stop doing that! I mean, what if you want to run the script on a router where the interface names were already specified as something else - something more meaningful?

You want to let the user adjust it, so. Let them use whatever they've specified. Well, yes, there's no:end command. If you want to stop a script from running, use:return instead, or branch out, as I did in my previous example. As for the Wireless/Ethernet check. Experience Certificate Format For Heavy Driver more.

You can simply check whether the output of one is an empty string, and try the other if it is. You keep wanting to do a sequence of:if commands that check for a specific name. Stop doing that! I mean, what if you want to run the script on a router where the interface names were already specified as something else - something more meaningful? You want to let the user adjust it, so. Let them use whatever they've specified. Ok, so i found out that the person who originally wrote our scripts intentionally used the (invalid):end command so that the script would error out and stop running if that line was run (which only happens if a variable is not set).not elegant, but it does work, and unfortunately i'll probably not be able to change his mind on that part.

Whatever, as long as it does the job it was intended to do. As for running it on an existing config, that won't happen. These scripts are exclusively being used on devices which have been defaulted with no backups and no default configuration, so they are a completely clean slate. We are the only ones who have access to the devices and the scripts, so other users specifying different interface names is not going to happen. If we were needing to set the identity on a device with an existing configuration on it, we would just do so manually. The devices we are configuring will only be using the default names, so specifying 'wlan1' in the:if statement is fine for our purposes; we will not be using any devices with more than one wireless interface.

I appreciate the assistance though, it was very helpful in figuring out where i was going wrong.

Comments are closed.