pasting .rsc on a blank slate router

Hi guys,

I have a question regarding pasting a .rsc script on a blank slate router.

# jan/24/2019 11:07:15 by RouterOS 6.43.8
# software id = T1T5-B008
#
# model = 951G-2HnD
# serial number = 1234567890AB
/interface bridge
add comment="bridge for switch ports (eth2-5 + wlan1)" name=bridge1-DIST
/interface ethernet
set [ find default-name=ether1 ] name=ether1-GTW speed=100Mbps
set [ find default-name=ether2 ] speed=100Mbps
set [ find default-name=ether3 ] speed=100Mbps
set [ find default-name=ether4 ] speed=100Mbps
set [ find default-name=ether5 ] speed=100Mbps
/interface vlan
add interface=ether1-GTW name=vlan1-UFB vlan-id=10
/interface pppoe-client
add add-default-route=yes default-route-distance=0 disabled=no interface=\
    vlan1-UFB name=pppoe-out1-aNET password= user=\
    a@a.com
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa2-psk comment="" \
    eap-methods="" mode=dynamic-keys name=profile1 supplicant-identity=\
    MikroTik wpa2-pre-shared-key=
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce \
    disabled=no mode=ap-bridge security-profile=profile1 ssid=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.1.100-192.168.1.199
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridge1-DIST lease-time=1h \
    name=dhcp1
/interface bridge port
add bridge=bridge1-DIST hw=no interface=ether2
add bridge=bridge1-DIST hw=no interface=ether3
... and so on ...

On the last part of the script, during adding the bridge, as I was connected to the router from ether2 port, it got disconnected, which I assume that’s normal.

My question is, was my whole script pasted? I’m planning to use this .rsc for my template, so if I ever need to deploy router to my clients, I can just paste this .rsc to a blank slate router.

Please advise.

Many thanks,
Cheers!

You got disconnected because you were connected to a port that was somehow reassigned (added to a bridge, name changed, etc.). You’ll need to do those steps early, and then you can paste the whole load after that. However, consider using /import instead. You may need to add delay 3 here and there.

add a delay up the top of the script, and use the reset-config menu with no-default, run-after of your RSC, thats how I do templated installs.

Script should be pasted even if you disconnect.
If you want to be sure change /system identity at the end, so you will have a feedback.

Hi guys, thanks for your inputs.

If I use /import, will it parse everything? instead of pasting the .rsc on the terminal?