Community discussions

 
lmclaren
just joined
Topic Author
Posts: 5
Joined: Thu Mar 09, 2006 8:15 am

Configure Script

Tue Jun 13, 2006 11:59 am

Hi,

I would like to export the configuration using say /export file=fred and use it as the default via the "configure script" when doing a netinstall.
I have cleaned up an export and it will work fine if I past it via a terminal but it will not work as a configure script via netinstall.
Is it possible to get a copy of the default that is used if a configure script is not specified?
If not does anyone have a sugestion for debugging the Configure script option? Does it realy work?

thanks

Lee McLaren
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Jun 14, 2006 11:49 am

there is no default. there are many people who use the netinstall option, so it does work. show us the script, maybe there is a problem.

also - this is a user forum, mikrotik does not guarantee that it will monitor or answer the posts here.
Last edited by normis on Fri Jun 30, 2006 10:44 am, edited 1 time in total.
 
lmclaren
just joined
Topic Author
Posts: 5
Joined: Thu Mar 09, 2006 8:15 am

Wed Jun 14, 2006 3:28 pm

Thankyou for replying Normis,

The script below was created by doing an /export backup and copying the file off, then used as the configure script using netinstall, the s/w version is 2.9.25 on a rb112.
After a restart none of the setting too hold, no scripts, no ip addresses, no pptp client etc.
I am using the same hardware each time.
Using winbox I connected via MAC address, opened a new terminal and pasted the same script and it applied all the settings correctly.


#Script start ##################################
# jan/04/2000 03:26:15 by RouterOS 2.9.25
# software id = JD1G-3TT
#
/ interface ethernet
set ether1 name="ether1" mtu=1500 mac-address=00:0C:42:08:82:AC arp=enabled \
disable-running-check=yes auto-negotiation=yes full-duplex=yes \
cable-settings=default speed=100Mbps comment="" disabled=no
/ interface wireless
set wlan1 name="wlan1" mtu=1500 mac-address=00:0B:6B:37:B2:51 arp=enabled \
disable-running-check=no radio-name="notset" mode=ap-bridge ssid="hotspot" \
area="" frequency-mode=manual-txpower country=no_country_set \
antenna-gain=0 frequency=2412 band=2.4ghz-b/g scan-list=default \
rate-set=default supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps \
supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps \
basic-rates-b=1Mbps basic-rates-a/g=6Mbps max-station-count=2007 \
ack-timeout=dynamic tx-power-mode=default noise-floor-threshold=default \
periodic-calibration=default periodic-calibration-interval=60 \
burst-time=disabled dfs-mode=none antenna-mode=ant-a wds-mode=disabled \
wds-default-bridge=none wds-default-cost=100 wds-cost-range=50-150 \
wds-ignore-ssid=no update-stats-interval=disabled \
default-authentication=yes default-forwarding=yes default-ap-tx-limit=0 \
default-client-tx-limit=0 proprietary-extensions=post-2.9.25 hide-ssid=no \
security-profile=default disconnect-timeout=3s on-fail-retry-time=100ms \
preamble-mode=both compression=no allow-sharedkey=no comment="" \
disabled=no
/ interface wireless nstreme
set wlan1 enable-nstreme=no enable-polling=yes framer-policy=none \
framer-limit=3200
/ interface wireless manual-tx-power-table
set wlan1 manual-tx-powers=1Mbps:17,2Mbps:17,5.5Mbps:17,11Mbps:17,6Mbps:17,9Mbp\
s:17,12Mbps:17,18Mbps:17,24Mbps:17,36Mbps:17,48Mbps:17,54Mbps:17
/ interface wireless security-profiles
set default name="default" mode=none authentication-types="" \
unicast-ciphers="" group-ciphers="" wpa-pre-shared-key="" \
wpa2-pre-shared-key="" eap-methods=passthrough tls-mode=no-certificates \
tls-certificate=none static-algo-0=none static-key-0="" static-algo-1=none \
static-key-1="" static-algo-2=none static-key-2="" static-algo-3=none \
static-key-3="" static-transmit-key=key-0 static-sta-private-algo=none \
static-sta-private-key="" radius-mac-authentication=no group-key-update=5m
/ interface wireless align
set frame-size=300 active-mode=yes receive-all=no \
audio-monitor=00:00:00:00:00:00 filter-mac=00:00:00:00:00:00 ssid-all=no \
frames-per-second=25 audio-min=-100 audio-max=-20
/ interface wireless snooper
set multiple-channels=yes channel-time=200ms receive-errors=no
/ interface wireless sniffer
set multiple-channels=no channel-time=200ms only-headers=no receive-errors=no \
memory-limit=10 file-name="" file-limit=10 streaming-enabled=no \
streaming-server=0.0.0.0 streaming-max-rate=0
/ interface l2tp-server server
set enabled=no max-mtu=1460 max-mru=1460 \
authentication=pap,chap,mschap1,mschap2 default-profile=default-encryption
/ interface pptp-server server
set enabled=no max-mtu=1460 max-mru=1460 authentication=mschap1,mschap2 \
keepalive-timeout=30 default-profile=default-encryption
/ interface pptp-client
add name="pptp-out1" max-mtu=1460 max-mru=1460 connect-to=172.19.254.254 \
user="test" password="password" profile=default-encryption \
add-default-route=no allow=pap,chap,mschap1,mschap2 disabled=no
/ ip ipsec proposal
add name="default" auth-algorithms=sha1 enc-algorithms=3des lifetime=30m \
lifebytes=0 pfs-group=modp1024 disabled=no
/ ip dhcp-client
add interface=ether1 add-default-route=yes use-peer-dns=yes use-peer-ntp=yes \
comment="" disabled=no
/ ip dhcp-server config
set store-leases-disk=5m
/ ip hotspot service-port
set ftp ports=21 disabled=no
/ ip hotspot profile
set default name="default" hotspot-address=0.0.0.0 dns-name="" \
html-directory=hotspot rate-limit="" http-proxy=0.0.0.0:0 \
smtp-server=0.0.0.0 login-by=cookie,http-chap http-cookie-lifetime=3d \
split-user-domain=no use-radius=no
/ ip hotspot user profile
set default name="default" idle-timeout=none keepalive-timeout=2m \
status-autorefresh=1m shared-users=1 transparent-proxy=yes \
open-status-page=always advertise=no
/ ip proxy
set enabled=no src-address=0.0.0.0 port=8080 parent-proxy=0.0.0.0:0 \
cache-administrator="webmaster" max-disk-cache-size=none \
max-ram-cache-size=unlimited cache-only-on-disk=no \
maximal-client-connections=1000 maximal-server-connections=1000 \
max-object-size=4096KiB max-fresh-time=3d
/ ip accounting
set enabled=no account-local-traffic=no threshold=256
/ ip accounting web-access
set accessible-via-web=no address=0.0.0.0/0
/ ip service
set telnet port=23 address=0.0.0.0/0 disabled=no
set ftp port=21 address=0.0.0.0/0 disabled=no
set www port=80 address=0.0.0.0/0 disabled=no
set ssh port=22 address=0.0.0.0/0 disabled=no
set www-ssl port=443 address=0.0.0.0/0 certificate=none disabled=yes
/ ip upnp
set enabled=no allow-disable-external-interface=yes show-dummy-rule=yes
/ ip socks
set enabled=no port=1080 connection-idle-timeout=2m max-connections=200
/ ip dns
set primary-dns=172.19.254.254 secondary-dns=0.0.0.0 allow-remote-requests=no \
cache-size=2048KiB cache-max-ttl=1w
/ ip traffic-flow
set enabled=no interfaces=all cache-entries=4k active-flow-timeout=30m \
inactive-flow-timeout=15s
/ ip address
add address=192.168.254.254/24 network=192.168.254.0 broadcast=192.168.254.255 \
interface=wlan1 comment="" disabled=no
/ ip neighbor discovery
set ether1 discover=yes
set wlan1 discover=yes
set pptp-out1 discover=no
/ ip route
/ ip firewall connection tracking
set enabled=yes tcp-syn-sent-timeout=5s tcp-syn-received-timeout=5s \
tcp-established-timeout=1d tcp-fin-wait-timeout=10s \
tcp-close-wait-timeout=10s tcp-last-ack-timeout=10s \
tcp-time-wait-timeout=10s tcp-close-timeout=10s udp-timeout=10s \
udp-stream-timeout=3m icmp-timeout=10s generic-timeout=10m \
tcp-syncookie=no
/ ip firewall service-port
set ftp ports=21 disabled=no
set tftp ports=69 disabled=no
set irc ports=6667 disabled=no
set h323 disabled=yes
set quake3 disabled=no
set mms disabled=no
set gre disabled=yes
set pptp disabled=yes
/ system ntp server
set enabled=no broadcast=no multicast=no manycast=yes
/ system ntp client
set enabled=no mode=unicast primary-ntp=0.0.0.0 secondary-ntp=0.0.0.0
/ system routerboard settings
set baud-rate=115200 boot-delay=1s boot-device=nand-if-fail-then-ethernet \
enter-setup-on=any-key cpu-mode=power-save memory-test=no \
cpu-frequency=175MHz boot-protocol=bootp enable-jumper-reset=yes
/ system logging
add topics=info prefix="" action=memory disabled=no
add topics=error prefix="" action=memory disabled=no
add topics=warning prefix="" action=memory disabled=no
add topics=critical prefix="" action=echo disabled=no
/ system logging action
set memory name="memory" target=memory memory-lines=100 memory-stop-on-full=no
set disk name="disk" target=disk disk-lines=100 disk-stop-on-full=no
set echo name="echo" target=echo remember=yes
set remote name="remote" target=remote remote=0.0.0.0:514
/ system upgrade mirror
set enabled=no primary-server=0.0.0.0 secondary-server=0.0.0.0 \
check-interval=1d user=""
/ system script
add name="RebootConfig" source="
\n
\n# Get MAC address as text for name into \
NameTxt variable
\n:global NameRaw \[/interface ethernet get ether1 \
mac-address\]
\n:global NameTxt \(\[:pick \$NameRaw 0 2\] . \[:pick \
\$NameRaw 3 5\] . \[:pick \$NameRaw 6 8\] . \[:pick \$NameRaw 9 11\] . \
\[:pick \$NameRaw 12 14\] . \[:pick \$NameRaw 15 17\]\)
\n# If the name is \
not the same as NameTxt then set it.
\n:if \(\[/system identity get name\] \
!= \$NameTxt\) do= { /system identity set name= \$NameTxt
\n :log info \
\"Setting Name\" }
\n" \
policy=ftp,reboot,read,write,policy,test,winbox,password
/ system clock dst
set dst-delta=+00:00 dst-start="jan/01/1970 00:00:00" dst-end="jan/01/1970 \
00:00:00"
/ system watchdog
set reboot-on-failure=yes watch-address=none watchdog-timer=yes \
no-ping-delay=5m automatic-supout=yes auto-send-supout=no
/ system console
add port=serial0 term="" disabled=no
/ system identity
set name="Mikrotik"
/ system note
set show-at-login=yes note=""
/ system scheduler
add name="OnBoot" on-event=":delay 00:00:12
\n:log info \"Script RebootConfig \
Start\"
\n/system script run RebootConfig
\n:log info \"Script \
RebootConfig End\"" start-time=startup interval=0s comment="" disabled=no
/ port
set serial0 name="serial0" baud-rate=115200 data-bits=8 parity=none \
stop-bits=1 flow-control=none
/ ppp profile
set default name="default" use-compression=default use-vj-compression=default \
use-encryption=default only-one=default change-tcp-mss=yes comment=""
set default-encryption name="default-encryption" use-compression=default \
use-vj-compression=default use-encryption=yes only-one=default \
change-tcp-mss=yes comment=""
/ ppp aaa
set use-radius=no accounting=yes interim-update=0s
/ queue type
set default name="default" kind=pfifo pfifo-limit=50
set ethernet-default name="ethernet-default" kind=pfifo pfifo-limit=50
set wireless-default name="wireless-default" kind=sfq sfq-perturb=5 \
sfq-allot=1514
set synchronous-default name="synchronous-default" kind=red red-limit=60 \
red-min-threshold=10 red-max-threshold=50 red-burst=20 red-avg-packet=1000
set hotspot-default name="hotspot-default" kind=sfq sfq-perturb=5 \
sfq-allot=1514
add name="default-small" kind=pfifo pfifo-limit=10
/ user
add name="admin" group=full address=0.0.0.0/0 comment="system default user" \
disabled=no
/ user group
add name="read" policy=local,telnet,ssh,reboot,read,test,winbox,password,web,!f\
tp,!write,!policy
add name="write" policy=local,telnet,ssh,reboot,read,write,test,winbox,password\
,web,!ftp,!policy
add name="full" policy=local,telnet,ssh,ftp,reboot,read,write,policy,test,winbo\
x,password,web
/ user aaa
set use-radius=no accounting=yes interim-update=0s default-group=read
/ tool bandwidth-server
set enabled=yes authenticate=yes allocate-udp-ports-from=2000 max-sessions=10
/ tool mac-server ping
set enabled=yes
/ tool e-mail
set server=0.0.0.0 from="<>"
/ tool sniffer
set interface=all only-headers=no memory-limit=10 file-name="" file-limit=10 \
streaming-enabled=no streaming-server=0.0.0.0 filter-stream=yes \
filter-protocol=ip-only filter-address1=0.0.0.0/0:0-65535 \
filter-address2=0.0.0.0/0:0-65535
/ tool graphing
set store-every=5min
/ routing ospf
set router-id=0.0.0.0 distribute-default=never redistribute-connected=no \
redistribute-static=no redistribute-rip=no redistribute-bgp=no \
metric-default=1 metric-connected=20 metric-static=20 metric-rip=20 \
metric-bgp=20
/ routing ospf area
set backbone area-id=0.0.0.0 type=default translator-role=translate-candidate \
authentication=none prefix-list-import="" prefix-list-export="" \
disabled=no
/ routing bgp
set enabled=no as=1 router-id=0.0.0.0 redistribute-static=no \
redistribute-connected=no redistribute-rip=no redistribute-ospf=no
/ routing rip
set redistribute-static=no redistribute-connected=no redistribute-ospf=no \
redistribute-bgp=no metric-static=1 metric-connected=1 metric-ospf=1 \
metric-bgp=1 update-timer=30s timeout-timer=3m garbage-timer=2m
/ radius incoming
set accept=no port=1700
/ snmp
set enabled=no contact="" location=""
/ snmp community
set public name="public" address=0.0.0.0/0 read-access=yes
#Script End###########################
 
lmclaren
just joined
Topic Author
Posts: 5
Joined: Thu Mar 09, 2006 8:15 am

Thu Jun 15, 2006 3:23 am

Has anyone managed to get the configure script to work? Has anyone a sample that I can build on?
 
peson
Trainer
Trainer
Posts: 183
Joined: Tue Jul 20, 2004 10:33 am
Location: Sweden

Fri Jun 30, 2006 10:43 am

Has anyone managed to get the configure script to work? Has anyone a sample that I can build on?
Hey,
There seems to be a limitation of the size of the script used when doing the netinstall.
I have tried the same as you have and discovered it the hard way :-(
Try a script that is just a few lines and it will work.
If this is a bug in netinstall or in the ROS I don´t know.
I think MT guys need to look into it.
BR, Paul
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Fri Jun 30, 2006 10:45 am

we will check this
 
peson
Trainer
Trainer
Posts: 183
Joined: Tue Jul 20, 2004 10:33 am
Location: Sweden

Sun Aug 13, 2006 11:21 am

we will check this
Hey, Normis.
Have you done any testing, if so when is a correction planned.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Tue Oct 03, 2006 1:06 pm

there is a limitation of 64KB, it can't be increased, but the files are usually smaller than that. if not, try to remove some rules, and import them later via another file.
 
peson
Trainer
Trainer
Posts: 183
Joined: Tue Jul 20, 2004 10:33 am
Location: Sweden

Mon Jan 08, 2007 3:03 am

there is a limitation of 64KB, it can't be increased, but the files are usually smaller than that. if not, try to remove some rules, and import them later via another file.
Normis:
I fail with scripts that have more than 29 lines, the file is only 2kB.
I´m using 2.9.38, can you please verify this problem.
 
User avatar
raivis-v
Frequent Visitor
Frequent Visitor
Posts: 55
Joined: Thu Jul 14, 2005 10:21 am
Location: Latvia, Riga

Mon Jan 08, 2007 8:13 am

I suggest you to weed that script from unnecessary lines. e.g. this one.
/ routing bgp
set enabled=no as=1 router-id=0.0.0.0 redistribute-static=no \
redistribute-connected=no redistribute-rip=no redistribute-ospf=no 
It is default configuration, it is even not used. Leave only those things that you have changed and are using.
 
peson
Trainer
Trainer
Posts: 183
Joined: Tue Jul 20, 2004 10:33 am
Location: Sweden

Mon Jan 08, 2007 1:09 pm

I suggest you to weed that script from unnecessary lines. e.g. this one.
/ routing bgp
set enabled=no as=1 router-id=0.0.0.0 redistribute-static=no \
redistribute-connected=no redistribute-rip=no redistribute-ospf=no 
It is default configuration, it is even not used. Leave only those things that you have changed and are using.
Hey raivis-v,
The script in the thread isn´t provided from me, I have just make the statement that the scripting isn´t working efter 29 lines, try it yourself.
I doesn´t depend on the size of the script, of course Normis say 64kB, that´s a size limit, but when it it comes to line 30 it won´t accept the command and break the hole script.
 
User avatar
giallone
just joined
Posts: 23
Joined: Mon Mar 24, 2014 12:21 am

Re: Configure Script

Wed Jul 23, 2014 11:51 am

has this limitation been overcome?

I have long script to use as default configuration, and it seems not working using netinstall, unless I use the reset configuration and run-after-reset function.

But I need to set it from netinstall to be the default configuration if my clients reset the device.
 
User avatar
bigcw
Member Candidate
Member Candidate
Posts: 105
Joined: Mon Sep 08, 2014 2:38 pm

Re: Configure Script

Mon Sep 22, 2014 3:41 pm

I am also interested in whether this problem has been solved. Can anyone offer any experiences?
Ecom International Network - Operators of AS61337 with POPs in Europe and North America - www.ecomltd.co.uk
Colocker Data Centre - The data centre with a difference! - www.colocker.com

Who is online

Users browsing this forum: No registered users and 17 guests