Community discussions

MikroTik App
 
tomislav91
Member
Member
Topic Author
Posts: 313
Joined: Fri May 26, 2017 12:47 pm

speed up local subnet-server subnet

Thu Sep 26, 2019 10:54 pm

does it play any role in faster connection between two subnets with this commands
/ip firewall filter
add chain=forward action=fasttrack-connection connection-state=established,related src-address=192.168.2.0/24 dst-address=192.168.3.0/24
add chain=forward action=fasttrack-connection connection-state=established,related src-address=192.168.3.0/24 dst-address=192.168.2.0/24
add chain=forward action=accept connection-state=established,related
So idea is that somehow i speed up, if i can through my router connetion from local subnet to server subnet.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13667
Joined: Thu Mar 03, 2016 10:23 pm

Re: speed up local subnet-server subnet

Fri Sep 27, 2019 8:46 am

The two firewall filters should help.

Although if your firewall filter rules are following the default filter rules set, then there's already a rule
add action=fasttrack-connection chain=forward connection-state=established,related
which should do the trick a few packets later than the pair of rules you presented. Performance-wise shouldn't be much difference but the default rule still gives you possibility to selectively allow connections (using other filter rules placed below this one) between subnets while your pair of rules explicitly allow just everything.

You need to be aware of couple of facts:
  • in addition to the action=fasttrack-connection rules you still need matching action=accept rules ... not all fast-tracked packets are really fast-tracked, some of them still travel the "slow path" through rules. If a matching "slow rule" is missing, then those packets might get dropped causing the connections to stall occasionally (if not break)
  • firewall filter rules (in "slow path") get evaluated in sequence from top to bottom (until matching rule is found). Hence the rules which match the most packets should be placed higher on the list. And the more specific rules have to be higher than the more general rules (if the action is not the same that is).
 
tomislav91
Member
Member
Topic Author
Posts: 313
Joined: Fri May 26, 2017 12:47 pm

Re: speed up local subnet-server subnet

Sat Sep 28, 2019 12:30 am

so genneraly i can add fasttrack when source is ip of server and destination is my local subnet that use that server every day and also add accept for same src and dest?
I just want to somehow speedup connection to my server, as fast as i can with filter.