B
B
by_EL2020-02-27 23:59:36
Computer networks
by_EL, 2020-02-27 23:59:36

How does routing work with dual wan on Mikrotik?

Hello, dear habr experts, there was such a question, there is a Mikrotik that is connected to two providers and two providers are added to the routing, that is, default gateway (next hops), A question such as Mikrotik will determine which gateway next hops belongs to which provider and send packets through it ?? For routing, we only specified gateway, but we didn’t specify an interface or something, how does Mikrotik understand it ??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
itigul, 2020-02-28
@itigul

In the case of Mikrotik, the default gateway becomes the route whose distance is less. This route has a Gateway whose ip belongs to the network where the IP address of your external interface is located.
dst-addr pref-src gateway dist
0.0.0.0/0 5.20.22.7 1
5.20.16.0/20 5.20.30.22 ether1 0 Roughly speaking
, the router looks into the table and sees:

  1. In order to access the Internet you need to find 5.20.22.7
  2. In order to find 5.20.22.7, you need to search the network for 5.20.22.0/20 using pref-src 5.20.30.22
  3. Then it just looks at which interface the address 5.20.30.22 belongs to and exits through it

Something like this. I hope I explained clearly.

3
3a4yI7aTiY, 2020-02-29
@3a4yI7aTiY

By default, it runs along the route, which has a shorter distance, if two Links work at the same time, then take a look at the manga, there are labeling of packages and connections

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question