Community discussions

MikroTik App
 
BSM
just joined
Topic Author
Posts: 17
Joined: Wed Feb 17, 2021 6:12 pm

Importing a hAP AC lite script into the hAP AC^2?

Wed Feb 17, 2021 9:00 pm

I have several hAP AC lite devices in use. Today I bought a hAP AC^2 to upgrade my living room router. I thought life can be easy, I export the settings from my living room AC lite device and import it in the AC^2.
It doesn't work ..... ? I don't get errors, but the script doesn't run until the end, why not?

Strange thing is that the script stops on line 52, sometimes 53. Checked this whith the 'verbose=yes' option.
Then I get disconnected on WinBox. When I reconnect I can see that line 54 ... are executed? It looks like the scrip is executed somewhere until halfway the firewall. An extra 30 lines affer 53 ??
Why not all the lines?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1915
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Importing a hAP AC lite script into the hAP AC^2?

Thu Feb 18, 2021 11:52 am

And how does the script looks like?

Post it using code tags button </>
Cut and past scrip to post, select script and click the code button above the post.
 
Why do not use Splunk to monitor your MikroTik Router(s)? Look at this page in how to set it up.

MikroTik->Splunk
 
 
BSM
just joined
Topic Author
Posts: 17
Joined: Wed Feb 17, 2021 6:12 pm

Re: Importing a hAP AC lite script into the hAP AC^2?

Thu Feb 18, 2021 12:15 pm

The complete code:
# jan/27/2021 11:19:45 by RouterOS 6.48
# software id = GAW3-8HWT
# 
# model = RB952Ui-5ac2nD
# serial number = CC3E0C95F4A3
/interface ethernet
set [ find default-name=ether1 ] name=ether1_WAN
set [ find default-name=ether2 ] name=ether2_Direct
set [ find default-name=ether3 ] name=ether3_LAN
set [ find default-name=ether4 ] name=ether4_LAN
set [ find default-name=ether5 ] name=ether5_LAN
/interface bridge
add name=bridge_Gast
add name=bridge_LAN_Wifi
add name=bridge_WAN
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MkT_Living
add authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys name=\
    profile_Wifi supplicant-identity="" wpa2-pre-shared-key=********
add authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys name=\
    profile_Gast supplicant-identity="" wpa2-pre-shared-key=********
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-g/n channel-width=20/40mhz-XX \
    country=belgium disabled=no frequency=2412 installation=indoor mode=\
    ap-bridge name=wlan_2.4 security-profile=profile_Wifi ssid=BaLiJuMa \
    wireless-protocol=802.11 wps-mode=disabled
set [ find default-name=wlan2 ] band=5ghz-n/ac channel-width=20/40/80mhz-XXXX \
    country=belgium disabled=no frequency=5180 installation=indoor mode=\
    ap-bridge name=wlan_5 security-profile=profile_Wifi ssid=BaLiJuMa \
    wireless-protocol=802.11 wps-mode=disabled
add default-forwarding=no disabled=no keepalive-frames=disabled mac-address=\
    4A:8F:5A:C4:BD:87 master-interface=wlan_2.4 multicast-buffering=disabled \
    name=wlan_Gast security-profile=profile_Gast ssid=GastWifi \
    wds-cost-range=0 wds-default-cost=0 wps-mode=disabled
add default-forwarding=no disabled=no keepalive-frames=disabled mac-address=\
    4A:8F:5A:C4:BD:87 master-interface=wlan_5 multicast-buffering=disabled \
    name=wlan_Gast5 security-profile=profile_Gast ssid=GastWifi \
    wds-cost-range=0 wds-default-cost=0 wps-mode=disabled
/ip pool
add name=dhcp_pool_LAN_Wifi ranges=192.168.2.2-192.168.2.254
add name=dhcp_pool_Gast ranges=192.168.102.2-192.168.102.254
/ip dhcp-server
add address-pool=dhcp_pool_LAN_Wifi disabled=no interface=bridge_LAN_Wifi \
    name=dhcp_LAN_Wifi
add address-pool=dhcp_pool_Gast disabled=no interface=bridge_Gast name=\
    dhcp_Gast
/interface bridge port
add bridge=bridge_WAN interface=ether2_Direct
add bridge=bridge_WAN interface=ether1_WAN
add bridge=bridge_LAN_Wifi interface=ether4_LAN
add bridge=bridge_LAN_Wifi interface=ether3_LAN
add bridge=bridge_LAN_Wifi interface=ether5_LAN
add bridge=bridge_LAN_Wifi interface=wlan_5
add bridge=bridge_LAN_Wifi interface=wlan_2.4
add bridge=bridge_Gast interface=wlan_Gast
add bridge=bridge_Gast interface=wlan_Gast5
/interface list member
add interface=bridge_WAN list=WAN
add interface=bridge_LAN_Wifi list=LAN
/ip address
add address=192.168.2.1/24 interface=bridge_LAN_Wifi network=192.168.2.0
add address=192.168.1.2/24 interface=ether1_WAN network=192.168.1.0
add address=192.168.102.1/24 interface=bridge_Gast network=192.168.102.0
/ip dhcp-client
add interface=bridge_WAN
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=192.168.2.1,8.8.8.8,9.9.9.9 gateway=192.168.2.1
add address=192.168.102.0/24 gateway=192.168.102.1
/ip dns
set servers=192.168.1.1,8.8.8.8,8.8.4.4,9.9.9.9
/ip dns static
add address=192.168.2.1 name=MkT_Living
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=drop chain=forward comment=\
    "Gast netwerk geen toegang tot locale netwerk" dst-address=192.168.0.0/16 \
    src-address=192.168.102.0/24
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat out-interface-list=WAN src-address=\
    192.168.2.0/24
add action=masquerade chain=srcnat out-interface-list=WAN src-address=\
    192.168.102.0/24
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip route
add distance=1 gateway=192.168.1.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Brussels
/system identity
set name=MkT_Living
/system leds settings
set all-leds-off=after-1h
 
BSM
just joined
Topic Author
Posts: 17
Joined: Wed Feb 17, 2021 6:12 pm

Re: Importing a hAP AC lite script into the hAP AC^2?

Thu Feb 18, 2021 12:17 pm

I've splitted my .rsc file in 3 files, all less than 50 lines. When I import these 3 files sequentially, there is no problem importing it into the AC^2 ....! ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24823
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Importing a hAP AC lite script into the hAP AC^2?

Thu Feb 18, 2021 1:39 pm

If number of ports is the same, there is no difference what model you have. You can see in the export script, that apart from interfaces, most commands are neutral
No answer to your question? How to write posts
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1915
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Importing a hAP AC lite script into the hAP AC^2?

Thu Feb 18, 2021 1:44 pm

Ok, so you have posted config of the router, not a script.

Id the problem is to get config from old router to new router, try to copy group by group of commands until it fails.
Then post her what does fail.

As Normis writes, the config should be rather equal on those two boxes.
 
Why do not use Splunk to monitor your MikroTik Router(s)? Look at this page in how to set it up.

MikroTik->Splunk
 
 
BSM
just joined
Topic Author
Posts: 17
Joined: Wed Feb 17, 2021 6:12 pm

Re: Importing a hAP AC lite script into the hAP AC^2?

Thu Feb 18, 2021 1:57 pm

Ok, so you have posted config of the router, not a script.
Sorry, I'm new to MikroTik.

Id the problem is to get config from old router to new router, try to copy group by group of commands until it fails.
Then post her what does fail.

As Normis writes, the config should be rather equal on those two boxes.
There is no fail, that's the strange thing. The AC2 doesn't run the complete import if I import the above config file at once. If I run it in separate parts it runs fine.

I'm thinking there is a hardware problem with my recent AC2. It also didn't do anything out of the box: no wifi, not possible to connect to 192.168.88.1 via Eth2..5, no detection on WinBox via MAC or IP. I had to do a reset by holding the reset button during power-up, after that it looked ok as in default configuration.
 
creatin
Frequent Visitor
Frequent Visitor
Posts: 94
Joined: Sat Nov 23, 2019 2:59 am

Re: Importing a hAP AC lite script into the hAP AC^2?

Tue Feb 23, 2021 5:37 am

Try to add pause of 2-3 seconds between importing each line
 
BSM
just joined
Topic Author
Posts: 17
Joined: Wed Feb 17, 2021 6:12 pm

Re: Importing a hAP AC lite script into the hAP AC^2?

Tue Feb 23, 2021 9:42 am

Is it possible to add a delay using the 'import' command?

Who is online

Users browsing this forum: alien78, slowbend and 18 guests