Community discussions

MikroTik App
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 5926
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Configuring Direct Path to WAN2

Fri Jan 08, 2021 5:02 pm

Sometimes the email account goes haywire on the spouses PC.
The issue is that to rectify reset accounts one has to be on the providers WAN (Wan2 - secondary).
Since often it is not an option to interrupt services to others (by simply turning wan1 off momentarily) I had to come up with another solution.

Thought process - create vlan50 called EastlinkDirect
Ensure Vlan50 is accessible on a number of ports in the house
Create IP ROUTE RULE and new Route.

/ip route
add distance=50 gateway=2x.yyy.bb.1 routing-mark=eastlink_direct
add check-gateway=ping distance=3 gateway=1.0.0.1
add check-gateway=ping distance=4 gateway=9.9.9.9
add comment=SecondaryWAN distance=10 gateway=2x.yyy.bb.1
add comment=PrimaryRecursive distance=3 dst-address=1.0.0.1/32 gateway=aaa.nn.pp.r scope=10
add comment=ScondaryRecursive distance=4 dst-address=9.9.9.9/32 gateway=aaa.nn.pp.r scope=10
add comment=Email_bypass distance=1 dst-address=2x.aaa.k.mm/32 gateway=2x.yyy.bb.1
/ip route rule
add action=lookup-only-in-table interface=EastlinkDirect src-address=192.168.50.0/24 table=eastlink_direct


Should this work so as to be able to access wan2 at any time directly via vlan50??
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
sindy
Forum Guru
Forum Guru
Posts: 6657
Joined: Mon Dec 04, 2017 9:19 pm

Re: Configuring Direct Path to WAN2

Fri Jan 08, 2021 5:59 pm

Sure.

Any of interface=EastlinkDirect or src-address=192.168.50.0/24 is sufficient in the /ip route rule, specifying both doesn't do too much of a harm (just a lil bit more of CPU spent per packet).

I assume that under normal circumstances, you want that PC to benefit from load distribution between the WANs, so there is no point in telling you that you could lock it to WAN 2 by reserving a DHCP lease for it in the general purpose VLAN&subnet and making the /ip route rule refer to that reserved address.
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace all occurrences of each public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 5926
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Configuring Direct Path to WAN2

Fri Jan 08, 2021 7:15 pm

Sure.

Any of interface=EastlinkDirect or src-address=192.168.50.0/24 is sufficient in the /ip route rule, specifying both doesn't do too much of a harm (just a lil bit more of CPU spent per packet).

I assume that under normal circumstances, you want that PC to benefit from load distribution between the WANs, so there is no point in telling you that you could lock it to WAN 2 by reserving a DHCP lease for it in the general purpose VLAN&subnet and making the /ip route rule refer to that reserved address.
Correct there is no PC attached to VLAN50 at the moment but I could easily attach a laptop for example, or redirect one of my switchports to vlan50 vice another vlan. Understood about the double nature of the route rule, will simple make it the interface.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!

Who is online

Users browsing this forum: Bing [Bot], leosedf, sindy and 243 guests