DNS resolution on router

I need to be able to perform name resolution from within a script, but I can’t even get it working from the console, and am looking for some pointers to get it working please?

[admin@MikroTik] > ip dns print   
                      servers: 1.1.1.1,8.8.8.8
              dynamic-servers: 
        allow-remote-requests: no
          max-udp-packet-size: 4096
         query-server-timeout: 2s
          query-total-timeout: 10s
       max-concurrent-queries: 100
  max-concurrent-tcp-sessions: 20
                   cache-size: 2048KiB
                cache-max-ttl: 1w
                   cache-used: 13KiB
[admin@MikroTik] > ping bbc.co.uk 
invalid value for argument address:
    invalid value of mac-address, mac address required
    invalid value for argument ipv6-address
    while resolving ip-address: could not get answer from dns server

For some reason neither of configured DNS servers (1.1.1.1 and 8.8.8.8 ) can be reached by your RB. You can check where it stops by running


/tool traceroute port=53 1.1.1.1  # and 8.8.8.8

/IP firewall export