ROS的Fasttrack,可以极大的减少ROS的CPU使用率已经带宽!特别注意:如果开启了 fasttrack,simple queue 将失效。

技术资料 分享,软路由,图文教程
0 904
admin
admin 自由达人 2022-11-24 14:40:09
用户等级:5级

原文

http://t.zoukankan.com/itfat-p-12936850.html

https://wiki.mikrotik.com/wiki/Manual:IP/Fasttrack

特别注意:如果开启了 fasttrack,simple queue 将失效。

需要两条命令来执行:

/ip firewall filter add chain=forward action=fasttrack-connection connection-state=established,related
/ip firewall filter add chain=forward action=accept connection-state=established,related

条件!

IPv4 FastTrack is active if following conditions are met:

  • no meshmetarouter interface configuration;
  • sniffertorch and traffic generator is not running;
  • no active mac-ping, mac-telnet or mac-winbox sessions restriction removed in 6.33;
  • /tool mac-scan is not actively used;
  • /tool ip-scan is not actively used;
  • FastPath and Route cache is enabled under IP/Settings

Description

IPv4 FastTrack handler is automatically used for marked connections. Use firewall action "fasttrack-connection" to mark connections for FastTrack. Currently only TCP and UDP connections can be actually FastTracked (even though any connection can be marked for FastTrack). IPv4 FastTrack handler supports NAT (SNAT, DNAT or both).

Note that not all packets in a connection can be FastTracked, so it is likely to see some packets going through slow path even though connection is marked for FastTrack. This is the reason why fasttrack-connection is usually followed by identical action=accept rule. FastTracked packets bypass firewall, connection tracking, simple queues, queue tree with parent=global, ip traffic-flow(restriction removed in 6.33), IP accounting, IPSec, hotspot universal client, VRF assignment, so it is up to administrator to make sure FastTrack does not interfere with other configuration;

支持的硬件清单如下图:

或者可以通过查询默认配置来确认是否支持快速转发Fasttrack

/system default-configuration print

FastTrack is supported on the listed devices.

RouterBoardInterfaces
RB6xx seriesether1,2
RB7xx seriesall ports
RB800ether1,2
RB9xx seriesall ports
RB1000all ports
RB1100, RB1000AHx2ether1-11
RB1000AHx2all ports
RB2011 seriesall ports
RB3011 seriesall ports
RB4011 seriesall ports
CRS series routersall ports except management interface (if the device has one)
CCR series routersall ports except management interface (if the device has one)
All deviceswireless interfaces, if wireless-fp, wireless-cm2, wireless-rep or wireless (starting from 6.37) package used

Examples

Initial configuration

For example, in home routers with factory default configuration, you could FastTrack all LAN traffic with this one rule placed at the top of the Firewall Filter. The same configuration accept rule is required:

/ip firewall filter add chain=forward action=fasttrack-connection connection-state=established,related
/ip firewall filter add chain=forward action=accept connection-state=established,related

View of simple FastTrack rules in the firewall, it is important to have other filter or mangle rules to get the advantage of the FastTrack:

  • /ip firewall filter

Fasttrack1 example.png

 

  • /ip firewall mangle

Screenshot 2015-11-27 09.40.09.png

 

Icon-warn.png

Warning: Queues (except Queue Trees parented to interfaces), firewall filter and mangle rules will not be applied for FastTracked traffic.

  • Connection is FastTracked until connection is closed, timed-out or router is rebooted.
  • Dummy rules will dissapear only after FastTrack firewall rules will be deleted/disabled and router rebooted.

FastTrack on RB2011

FastTrack is enabled on RB2011 at chain=forward with the rule from previous example. Bandwidth test with single TCP stream is sent,

Fasttrackon2011.png

楼主签名:唱跳rap和篮球
回帖
回复列表