• Kiếm tiền với Hostinger

    Kiếm Tiền Cùng Hostinger

    Bạn đang tìm kiếm cách kiếm thêm thu nhập online? Hãy tham gia ngay chương trình Affiliate của Hostinger! Với mỗi khách hàng đăng ký thông qua liên kết của bạn, bạn sẽ nhận được khoản hoa hồng hấp dẫn.

    Hostinger cung cấp các dịch vụ lưu trữ web (hosting) chất lượng cao với mức giá cạnh tranh, giúp bạn dễ dàng giới thiệu và thu hút người dùng.

    Đừng bỏ lỡ cơ hội tuyệt vời này để tăng thêm thu nhập thụ động.

    Tham Gia Ngay

(Mikrotik) Configure Auto failover on Mikrotik router using Netwatch

TigerDao

Administrator
Thành viên BQT
In this article, we will guide you through configuring Auto failover on Mikrotik router devices using the Netwatch feature according to the example below.
(IMG)


– On the model that has been configured with IP, NAT, and static route according to the diagram, by default Wan 1 is the main, all traffic will go through it and Wan 2 is the backup, we will configure auto failover so that the router automatically switches over. Wan 2 when Wan 1 loses connection.


(IMG)

(IMG)


– For the purpose of using Netwatch to check the connection on Wan 1, the Mangle rule will create a routing mark to the Host address set up in Netwatch and create a static route with that routing mark, to ensure the connection to the Host will be successful. always go through Wan 1.

– Go IP -> Firewalland create 2 rules as follows.


(IMG)

(IMG)

(IMG)

(IMG)


(IMG)



– Finally create a static route to Wan 1 with the created routing mark.


(IMG)


– Go next Tools -> Netwatchcreate a new rule as follows to a host outside the internet that you trust, in this example it is 208.67.222.222, set the check interval at interval. interval. In Up tab Set up run command “/ip route enable 1” when Host Up, and at Down tab will run the command “/ip route disable 1” when Host Down, in there first is the order of static route to Wan 1 in Route version, in CLI use command “ip route print details” to check the route order, which in this example is 1.


(IMG)

(IMG)

(IMG)

(IMG)


– Check in normal state, connection goes through Wan 1, Netwatch status and Route table will be as below.


(IMG)

(IMG)


(IMG)



– If due to some problem the Netwatch feature above Router Mikrotik cannot connect to the established Host, it will go into down state and run the command to disable the route through Wan 1, at this time the route through Wan 2 will be active, on the Client to check the connection will now go through Wan 2. When Once the Netwatch reconnects to the Host, Wan 1 will be activated again.


(IMG)

(IMG)


(IMG)


!!! Thank you for following the article!!!

Xem tiếp...
 
Top