Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

Detect Internet is a tool that categorizes monitored interfaces into the following states - Internet, WAN, LAN, unknown, and no-link.

State

This submenu displays status of all monitored interfaces defined by the detect-interface-list parameter:

Code Block
languageros
interface/detect-internet/state/print

LAN

All layer 2 interfaces initially have this state.

WAN

Any L3 tunnel and LTE interfaces will initially have this state. Layer 2 interfaces can obtain this state if:

  • an interface has an active route to 8.8.8.8 in main routing table.
  • an interface can obtain (dynamic DHCP client is created) or has obtained ) an address from DHCP (does not apply if DHCP server is also running Detect Internet on the DHCP server interface).
Note

WAN interface can fall back to LAN state only when link status changes. LAN interfaces get locked to LAN after 1h and then change only when link status changes.

Note

Note that Detect Internet can install DHCP clients, default routes, DNS servers and affect other facilities. 
Use with precaution, and after enabling the service, check how it interferes with your other configuration.


Internet

WAN interfaces that can reach cloud.mikrotik.com using UDP protocol port 30000 can obtain this state. Reachability is checked every minute. If a cloud is not reached for 3 minutes, the state falls back to WAN.

Configuration

Code Block
languageros
/interface detect-internet

...

Code Block
languageros
[admin@MikroTik] > interface /detect-internet/print print
detect-interface-list: none
lan-interface-list: none
wan-interface-list: none
internet-interface-list: none

State

...


[admin@MikroTik] > interface/detect-internet/set internet-interface-list=all wan-interface-list=all lan-interface-list=all detect-interface-list

...

Code Block
languageros
/interface detect-internet state=all 
[admin@MikroTik] > interface/detect-internet/state/print 
Columns: NAME, STATE, STATE-CHANGE-TIME, CLOUD-RTT
# NAME STATE STATE-CHANGE-TIME CLO
0 ether1 internet dec/22/2020 13:46:18 5ms