Community discussions

MikroTik App
 
yacsap
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Wed Dec 17, 2014 11:44 am
Location: Auckland, New Zealand
Contact:

pasting .rsc on a blank slate router

Thu Jan 24, 2019 9:51 pm

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!
[ IMikroTik ] >
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1109
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: pasting .rsc on a blank slate router

Thu Jan 24, 2019 10:50 pm

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.
 
joegoldman
Long time Member
Long time Member
Posts: 533
Joined: Mon May 27, 2013 2:05 am

Re: pasting .rsc on a blank slate router

Thu Jan 24, 2019 11:05 pm

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.
 
Redmor
Member Candidate
Member Candidate
Posts: 251
Joined: Wed May 31, 2017 7:40 pm
Location: Italy

Re: pasting .rsc on a blank slate router

Fri Jan 25, 2019 8:18 am

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.
ImageImage
 
yacsap
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Wed Dec 17, 2014 11:44 am
Location: Auckland, New Zealand
Contact:

Re: pasting .rsc on a blank slate router

Tue Jan 29, 2019 12:44 am

Hi guys, thanks for your inputs.

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

Who is online

Users browsing this forum: Tobei, zaina1 and 61 guests