be retained. On the other hand, RAM is volatile so if the router is restarted or the power goes out the configuration in RAM will be lost.
When you buy a new router there shouldn't be any configuration yet however, if you have configuration in RAM (running-config) you can enter "copy running-config startup-config" and this will copy the running-config to the startup-config. If the router is rebooted it will lose the running-configuration and will check the startup-configuration and then load that to restore the settings.