-1

我使用 Mikrotik 作为 DNS 服务器和主路由器。我有两条 DNS 记录,例如邮件服务器 mail.example.com 的 xxx1 和 xxx2,并在第一台服务器关闭时尝试找到解决方案,Mikrotik 可以自动将其路由到第二台服务器。你能帮我解决这个问题吗?

4

1 回答 1

2

您可以使用netwatch功能:监视xxx1,当它关闭时,将您的DNS静态记录修改为xxx2。使用非常小的 TTL 值,例如 1 分钟。

/tool netwatch
add host=8.8.8.8
down-script="/ip dns static set [ find name=mail.xx.com ] address=x.x.x.2 ttl=30s "  
up-script="/ip dns static set [ find name=mail.xx.com ] address=x.x.x.1 ttl=30s "
于 2015-08-13T11:45:24.377 回答