Restore from RSC

Sorry for the basic question.

I am setting up a new location, connected to the Internet by the local cable TV provider, and with only a single wired piece of network gear: hAPax3.

This is the same set up I have at several other locations, so I thought I would use an existing export (i.e., .RSC file) as the basis for the new ax3’s config.

I think I have been able to create the new config, changing specific details as needed.

But, I have several questions:

  1. The configs reference MAC addresses in several location, such as:
/interface bridge
add admin-mac=xxxxxxxxxxxxxxx auto-mac=no comment=defconf name=bridge \
    port-cost-mode=short



/interface wifi
add configuration.country="United States" .mode=ap .ssid=2point4 disabled=no \
    mac-address=xxxxxxxxxxxxxxxxxxxx master-interface=wifi2 name=2point4 \
    security.authentication-types=wpa2-psk .passphrase=<PASSWORD>
add configuration.country="United States" .mode=ap .ssid=Guest disabled=no \
    mac-address=xxxxxxxxxxxxxxxxxxxx master-interface=wifi1 name=Guest-wifi1 \
    security.authentication-types=wpa2-psk .disable-pmkid=yes \
    .management-protection=disabled .passphrase=<PASSWORD> steering.rrm=no \
    .wnm=no
add configuration.country="United States" .mode=ap .ssid=Guest disabled=no \
    mac-address=xxxxxxxxxxxxxxxxxxxxx master-interface=wifi2 name=Guest-wifi2 \
    security.authentication-types=wpa2-psk .disable-pmkid=yes \
    .management-protection=disabled .passphrase=<PASSWORD> steering.rrm=no \
    .wnm=no

How should I handle this?

  1. Should I start with an empty config and winbox to the device’s MAC address? Or some other method?

  2. Are there other references in an exported RSC that contain device-specific data (such as MAC addresses) that I should be aware of?

Thank you.

Wasn’t there an interesting discussion about it recently ? :laughing:

My view:
In general MAC addresses should be unique. Period.
You can translate that to: unique within your network.
If those sites have zero interaction with each other, it’s not the end of the world if some MAC addresses are duplicated.
But be aware of it when they become connected … better safe then sorry. For me they remain unique.

Normally those admin-MAC addresses are created by default config, so you should be able to apply changes without touching those MACs.

There was indeed the discussion of auto-mac=no which my configs have.

All my sites are connected via wireguard, so for that, and other reasons, I, too, see a need for unique mac addresses.

While the default config will create MAC addresses, if I use a default config and then try to paste an RSC over it, won’t I get a wonky result? That is, some things overwritten, some things not, some things that exist in the default but not addressed by the overwriting RSC? No idea where existing MAC addresses would wind up in that process.

Exported config is mostly troublesome for setting static MAC addresses. You can simply remove that particular property setting from rsc and ROS will come up with one automatically. For the bridge MAC also remove auto-mac=no setting. You can then manually set MAC addresses later on.

Alternatively you csn ‘pre-invent’ suitable MAC address for bridge on target device if you can get info about ethernet interface MAC addresses (it’s printed on the device sticker): take MAC of ether1 and replace second digit with one of (2, 6 A, E). E.g.: xx:bb:cc:dd:ee:ff → x2:bb:cc:dd:ee:ff .

A possible approach :confused: in twelve (easy? :question: ) steps:

  1. reset a router
  2. run default configuration AND DO NOT modify anything
  3. export the configuration as .rsc file
  4. export the configuration of an identical, already configured, router
  5. open a new spreadsheet (excel, libreoffice calc or similar)
  6. open #4 in notepad, copy and paste contents to column A of the spreadsheet
  7. open #3 in notepad, copy and paste contents to column B of the spreadsheet
  8. insert cells in column B so that same sections of the config (lines starting with /) are on the same line
  9. check differences between the contents of column A and column B and write the ones you actually want on column C (it should be mostly column B lines)
  10. for the few occurences of MAC, replace in column C the MACs (coming from column B) with the MACs in column A
  11. copy column C to a new notepad and save as mydiff.rsc
  12. reset again the router in #1, this time with no default configuration, and import this mydiff.rsc file on it

I think I need to start with how best to start. Do i start with the defaul config or an empty/blank/non-existent config?

If I start with an empty config, and I add a made-up MAC address, then how can I get ROS to replace it with an appropriate (or correct) one?

For example, if I start with no config and add an RSC that starts with:

/interface bridge
add admin-mac=11:12:23:34:45:56 comment=defconf name=bridge \
    port-cost-mode=short

Can I get ROS to replace the MAC with the correct one?

And if I just remove the other instances of entries/commands with MAC addresses, and instead manually create the entry in winbox thereby allowing ROS to fill in the MAC address, that makes the process take longer and a little more prone to errors, right?

Great solution.

Smooth as silk…

Basically, start with defaul config, take note of device-specific data such as MAC addresses and copy that data to the RSC I want to use.

Then reset, use no config, paste RSC with correct MAC addresses.

FYI, the config I want to use is quite a bit different that the defauls (wireguard, firewall rules, etc.), so I think most of the entries that will actually be used will come from the already-configured-router’s RSC (i.e., column A).

Anything else device-specific (besides MAC addresses)?

Since default config creates non-empty export, it’s a sign that applying it requires blank starting state.

And no, you can’t instruct ROS to set something statically (e.g. bridge MAC address) without explicitly setting the value. You could run config without static settings (leaving ROS to come up with appropriate values) and at the end include code which reads running value and convert it to static setting (or change it ever so slightly if ROS doesn’t come up with good enough value).

Sorry, but too many pronouns for me to understand.

Default config creates a config.

I don’t understand what “it’s a sign that applying it requires a blank starting state” means.

Export of default config creates non-empty RSC.

Which means that such export can’t be applied to device with already applied default config - it causes errors about items already existing, etc.

Which in turn means that any exported RSC can only be applied to device with empty config.

Sounds like pasting an RSC over an existing config of any type (including a default config) is a bad idea.

Said another way, pasting a full RSC should be done to a device with no config set up.

Thank you.

Even partial RSC, the risk of duplication of items Is always there.

Simple math:
Empty+full=full :smiley:
Empty+partial=partial :slight_smile:
then:
Partial+full=
Full+partial=
Full+full=
partial+partial=
A POSSIBLE MESS :open_mouth:

Thanks very much everyone!

Quick follow up:

At what point in the set up of a new hapax3 do I upgrade the router and ROS?

That is, if I want to have a empty config in which to paste an rsc, do I upgrade RB/ROS first and then some form of reset and choose no default config, or does the version upgrades come after the pasting of the rsc?

Thanks.

If you don’t care about default config, then it doesn’t really matter. ROS upgrade in principle doesn’t change running config on the device. And default config is only applied when device is reset to defaults.

Given a free choice I’d upgrade first, then reset to blank config and then apply custom config from RSC … just to be extra sure that ROS upgrade doesn’t change anything.

Great, thank you.

Would you mind adding the best way to “reset to blank config?”

How about: in webfig, open System->Reset Configuration and check “No Default Configuration” . Optionally you can even upload your RSC before opening Reset Config and set it as “Run After Reset” action.

I’m pretty sure there’s similar way of doing it in winbox … and I know there’s appropriate command in CLI.

And then there’s the button way. Personally I was never really successfull with the button (timing issues) so I usually use it to get Netinstall going.

Got it – thank you.

I was dreading this failure.

Tried everything I could.

The new setup would not work.

Brand new ax3 out of the box.

Used default config and made a copy of it so I would have the MAC addresses.

Plugged the mac addresses into my RSC.

I was able to get it running and get connected to it with a blank (empty) config.

Unable to successfully paste the RSC – way too many failures.

Unable to upgrade because it would not see the Internet.

Tried uploading the 7.17.2 but it would not take the file after a reboot.

Very frustrating.

If RSC is used as “run after reset”, it may be necessary to include a short delay right at the top, e.g.


:delay 10

The need for delay comes from the fact that ROS kernel needs a few seconds to start drivers, until that’s done not all interfaces are available.