Community discussions

MikroTik App
 
Tent1987
just joined
Topic Author
Posts: 14
Joined: Thu Jan 12, 2023 4:28 pm

Importing default config not working

Wed Jan 25, 2023 1:07 pm

So yeah finally got DHCP working.
Now my config is not good anymore.

So i wanted to import the default config from https://help.mikrotik.com/docs/display/ ... igurations
I have a MikroTik HAP AX3 v7.7 stable.
I have copy paste all the text from the script in "AP Router" because thats the one for hAP products to a txt file.
I have renamed the txt to Default.rsc.
WINBOX: Uploaded it to files.

When i import it with Winbox -> New Terminal it says "Syntax error (line 4 column 19)"
If i check that line and column it sees a ":" after the word "script". (see screenshot SyntaxError.png)
I removed the ":", now it says line error at line 223 column 19.
If i check that line and column it sees a ":" after the word "caps-mode-script".
I removed the ":", now it says line error at line 318 column 19.
If i check that line and column it sees a ":" after the word "custom-script".
I removed the ":", now it says line error at line 4 column 13.
If i check that line and column it sees a "s" it's the s from the word "script".

So removing those ":" does not work.

How do i import the defaulft config? What should be the correct default config?
Also i bought this with 7.6 with a lot of issues, i installed 7.7 with netinstall but that default config has almost nothing, only ether1to5, no bridge, no wifi etc.
If i do a reset config without ticking the box "No default Configuration" it will only give me the config with almost nothing only ether1to5, no bridge, no wifi etc.
You do not have the required permissions to view the files attached to this post.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26289
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Importing default config not working

Wed Jan 25, 2023 1:10 pm

there is no command "script". What are you trying to import there?
 
holvoetn
Forum Guru
Forum Guru
Posts: 5320
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Importing default config not working

Wed Jan 25, 2023 1:24 pm

This one, it's on the wiki page linked in the first post.
However: this is NOT a script which can be imported straight-away ...
CPE_Router.txt

OP:
If you still have access to the router, reset again with default config.
Then on first entry, use Quickset ONCE (never use it again afterwards ! Only do changes afterwards via cmd line, webfig or winbox)
You do not have the required permissions to view the files attached to this post.
Last edited by holvoetn on Wed Jan 25, 2023 1:26 pm, edited 1 time in total.
 
Tent1987
just joined
Topic Author
Posts: 14
Joined: Thu Jan 12, 2023 4:28 pm

Re: Importing default config not working

Wed Jan 25, 2023 1:24 pm

there is no command "script". What are you trying to import there?
As I said:
So i wanted to import the default config from https://help.mikrotik.com/docs/display/ ... igurations

🤣
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Importing default config not working

Wed Jan 25, 2023 1:25 pm

there is no command "script". What are you trying to import there?

The problem is not the user @Tent1987, but the staff member than create help page on this way....

For example:

help page script code

# jan/11/2023 15:27:23 by RouterOS 7.7rc5
# software id = 8K5U-LU5Y
#
            script: #| Welcome to RouterOS!
                    #|    1) Set a strong router password in the System > Users menu
                    #|    2) Upgrade the software in the System > Packages menu
                    #|    3) Enable firewall on untrusted networks
                    #|    4) Set your country name to observe wireless regulations
                    #| -----------------------------------------------------------------------------
                    #| RouterMode:
                    #|  * WAN port is protected by firewall and enabled DHCP client
                    #|  * Wireless and Ethernet interfaces (except WAN port/s)
                    #|    are part of LAN bridge
                    #| LAN Configuration:
                    #|     IP address 192.168.88.1/24 is set on bridge (LAN port)
                    #|     DHCP Server: enabled;
                    #|     DNS: enabled;
                    #| wlan1 Configuration:
                    #|     mode:                ap-bridge;
                    #|     band:                2ghz-b/g/n;
                    #|     tx-chains:           0;1;
                    #|     rx-chains:           0;1;
                    #|     installation:        indoor;
                    #|     wpa2:      no;
                    #|     ht-extension:        20/40mhz-XX;
                    #| WAN (gateway) Configuration:
                    #|     gateway:  ether1 ;
                    #|     ip4 firewall:  enabled;
[...]
                    :log info Defconf_script_finished;
                    :set defconfMode;
                    :set ssid;
                    
  caps-mode-script: #-------------------------------------------------------------------------------
                    # Note: script will not execute at all (will throw a syntax error) if
                    #       dhcp or wireless-fp packages are not installed
                    #-------------------------------------------------------------------------------
                    
                    #| CAP configuration
                    #|
                    #|   Wireless interfaces are set to be managed by CAPsMAN.
                    #|   All ethernet interfaces and CAPsMAN managed interfaces are bridged.
                    #|   DHCP client is set on bridge interface.
                    
                    # bridge port name
                    :global brName  "bridgeLocal";
                    :global logPref "defconf:";
                    
                    
                    :global action;
                    
                    :log info $action
                    
                    :if ($action = "apply") do={
[...]
                    
                      /interface bridge port remove [find comment="defconf"]
                      /interface bridge remove [find comment="defconf"]
                    
                    }
     custom-script: 
Is just a "/system default-configuration print" command that NOT produce useful copy & paste script if the output is not further elaborathed.
Last edited by rextended on Wed Jan 25, 2023 1:30 pm, edited 1 time in total.
 
Tent1987
just joined
Topic Author
Posts: 14
Joined: Thu Jan 12, 2023 4:28 pm

Re: Importing default config not working

Wed Jan 25, 2023 1:28 pm

This one, it's on the wiki page linked in the first post.
However: this is NOT a script which can be imported straight-away ...

CPE_Router.txt
I'm sorry but that is not the one corresponding with hap routers. Why should I use that one?🤔

O snap I thought I could just import it.
Is it possible to even import a default config from a package?

Other thing I'm thinking about....
Downgrade to official 7.6 with a default config.
Configure the basic stuff.
Upgrade to 7.7.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5320
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Importing default config not working

Wed Jan 25, 2023 1:32 pm

Yeah, I was referring to the first one I encountered on that page, but they all have the same problem. Not suitable for direct import.

Reset with default config.
Use Quickset once.
Proceed from there using cmd line / webfig / winbox.

Should work in 7.7 as well.
 
Tent1987
just joined
Topic Author
Posts: 14
Joined: Thu Jan 12, 2023 4:28 pm

Re: Importing default config not working

Wed Jan 25, 2023 1:41 pm

Yeah, I was referring to the first one I encountered on that page, but they all have the same problem. Not suitable for direct import.

Reset with default config.
Use Quickset once.
Proceed from there using cmd line / webfig / winbox.

Should work in 7.7 as well.
I'm sorry but please! please! read before posting.

The current default config that's in my routeros7.7 only has ether1to5 interfaces. No wifi etc. I need wifi. I installed the main package with netinstall. Downloaded it from the official mikrotik website. Do I need the extra package?🤔

If I use quickset I'm not able to configure wifi. Only dhcp/nat/etc.

That's why I want the default config as when you buy the device.

I need to know how to import that one from the help pages.
Im pretty new to mikrotik/routeros but I'm already 8 days struggling to get it working. Sure im learning stuff.🤣
 
holvoetn
Forum Guru
Forum Guru
Posts: 5320
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Importing default config not working

Wed Jan 25, 2023 1:45 pm

AX3 ?
Then the wifiwave2 package might be needed, I think. It's in the extra packages.

Odd that it doesn't come by itself ... ??
 
erlinden
Forum Guru
Forum Guru
Posts: 1900
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Importing default config not working

Wed Jan 25, 2023 1:46 pm

Do I need the extra package?🤔
As far as I know the hAP ax3 requires wifiwave2 package.


Oops...too late
 
holvoetn
Forum Guru
Forum Guru
Posts: 5320
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Importing default config not working

Wed Jan 25, 2023 1:49 pm

Im pretty new to mikrotik/routeros but I'm already 8 days struggling to get it working. Sure im learning stuff.🤣
I'll join you for the AX-stuff. Still learning it too (waiting for one to be delivered).

Adding:
so ... an AX device which gets a complete reset, looses the package which is needed to have wifi working.
I classify that as an omission, I would even call it a bug !
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Importing default config not working

Wed Jan 25, 2023 2:03 pm

Let me know when Hoelve, mine is sitting in another room waiting for yours to be delivered ;-). They may even wireguard together
 
holvoetn
Forum Guru
Forum Guru
Posts: 5320
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Importing default config not working

Wed Jan 25, 2023 2:24 pm

there is no command "script". What are you trying to import there?
The problem is not the user @Tent1987, but the staff member than create help page on this way....
...
Is just a "/system default-configuration print" command that NOT produce useful copy & paste script if the output is not further elaborathed.
Adding:
while the general intention of that page is commendable (it really is !), it is far from complete.
E.g. no 5Ghz config for hap device (AC, AC2, AC3), no config for wave2 devices (AC3, Audience, AXx), ...
What I also find at least strange, is that e.g. script for hap is based on 7.7rc5 ?? Why not stick to release versions ?
 
Tent1987
just joined
Topic Author
Posts: 14
Joined: Thu Jan 12, 2023 4:28 pm

Re: Importing default config not working

Thu Jan 26, 2023 12:29 am

Hi @holvoetn, @erlinden,

Sorry i dont how to tag someone on this forum but i downloaded the extra packages.
I installed the wifiwave2*.npk
did a quick set and
I now have DHCP/Wifi and internet woot woot took me a long time.

Now my last question:
When i go to files i click on backup and it asks me to put in a file name, a password and encryption.
I have done that. Now i see "backup" in the column "Type".

Does this "backup" include current configuration, current RouterOS, current packages, so if something breakes i can just restore the file?
 
holvoetn
Forum Guru
Forum Guru
Posts: 5320
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Importing default config not working

Thu Jan 26, 2023 6:41 am

Config yes, packages no.
Don't forget that password if you used it.
 
Tent1987
just joined
Topic Author
Posts: 14
Joined: Thu Jan 12, 2023 4:28 pm

Re: Importing default config not working

Fri Feb 03, 2023 12:35 pm

Config yes, packages no.
Don't forget that password if you used it.
Thank you! This can be closed.

Who is online

Users browsing this forum: Bing [Bot], infabo and 44 guests