Manual:IP/Cloud: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Versions|v6.14+}}
{{Versions|v6.14+}}
{{Note|Currently running as public beta. Server availability could vary, and syntax could change}}


==Summary==
==Summary==

Revision as of 13:22, 27 May 2014

Applies to RouterOS: v6.14+

Note: Currently running as public beta. Server availability could vary, and syntax could change


Summary

Starting with RouterOS v6.14 MikroTik offers a Dynamic DNS name service for RouterBOARD devices. This means that your device can automatically get a working domain name, this is useful if your IP address changes often, and you want to always know how to connect to your router.

Currently cloud service provides only two services:

  • ddns (provide dns name for router's external IPv4 address. IPv6 not supported)
  • approximate time (accurary of several seconds, depends on UDP packet latency, useful when NTP is not available)

Note: to actually connect to the router using the DNS name provided by cloud server, user must update router's firewall


Operation details

  • Router checks for outgoing IP address change: every 1 minute
  • Router waits for cloud server response: 15 seconds
  • DDNS record TTL: 60 seconds
  • Cloud time update: after router restart and during every ddns update (when router external IP address change or after force-ddns-update command);

After router sends it's IP address to the cloud server, it will stay on the server permanently. DNS name (/ip cloud ddns-name) will resolve to last sent IP address even if user set /ip cloud enabled = no. Currently there is no way to remove/disable this DDNS record and there is no expire time for it.

Properties

Sub-menu: /ip cloud


Property Description
enabled (yes | no) If set to "yes" then router will send an encrypted message to the MikroTik cloud server. Server will then decrypt the message and verify that sender is an authentic Mikrotik router. If all is OK then server will create a DDNS record for this router and send response to the router. Every minute the cloud service on the router will check if external IP address matches the one sent to server and will send encrypted update to cloud server if IP address changes.
force-ddns-update (command) When executed, ddns update to cloud server will be sent immediately, even if router's IP address is not changed. Note: if /ip cloud use-cloud-time is set to "auto" then router clock will be updated to cloud server time (if no ntp or sntp client is enabled). Cloud must be enabled to execute this command (/ip cloud enabled = yes)
use-cloud-time (auto | no) If set to "auto" then router clock will be set to time, provided by cloud server IF there is no SNTP or NTP service enabled. If set to "no" then cloud service will never update router clock.
ddns-own-sent-ip (string) Read only, shows router IPv4 address that was sent to cloud server and assigned to DNS name (see "/ip cloud ddns-name"). This field is visible only after at least one ddns-request was successfully completed.
ddns-warning (string) Read only, shows a warning message if IP address sent by router differs from IP address in UDP packet header as visible by cloud server. Typically this happens if router is behind NAT. Example: "DDNS server received request from IP 123.123.123.123 but your local IP was 192.168.88.23; DDNS service might not work"
ddns-name (string) Read only, shows DNS name assigned to the router. Name consists of 12 character serial number appended by .sn.mynetname.net. This field is visible only after at least one ddns-request is successfully completed.
ddns-status (status) Read only, contains text string that describes current ddns-service state.
  • Last DDNS update was OK - all OK.
  • Own-ip matches IP that was sent to server - all OK
  • Server ip resolved - may appear briefly if router has DNS server configured.
  • Update request sent to DDNS server - request sent to Cloud server, waiting for response.
  • DDNS server requested to re-send request - Cloud server detected that request message with particular ID has been already processed, but otherwise packet is OK. In this case server sends unused message ID to router and router re-sends request with the new ID. Normally this may happen if router was rebooted while sending/receiving cloud request or if Cloud UDP packet was lost.
  • Forced: started DDNS update - user just executed /ip cloud force-ddns-update command
  • DDNS server IP unreachable - there is no route on router to send packet to cloud server. Missing gateway to 0.0.0.0?
  • Error: no response from DDNS server - server not responding;
  • Error: REJECTED. Contact MikroTik support - cloud server decided that something is wrong with your request, please contact support
  • Error: unknown error - Cloud server response was decrypted successfully, but router could not interpret response codes in the message. May happen if server-side was upadted and cloud-protocol significantly changed. Router will re-send request after one minute.
  • Error: Invalid response from DDNS server - message checksum (MD5) incorrect. Router will re-send request after one minute.
  • Error: incorrect response length - similar to Error: unknown error. Router first checks UDP packet size and only if it is correct it will attempt to decrypt the message.
  • Error: internal error - cloud service failed to gather some critical information to authenticate with cloud server. No requests to cloud server will be sent.
  • Error: internal send error - cloud service failed to encrypt request.