Keenetic routers can use multiple WAN connections simultaneously in balancing mode. Any WAN interface — wired, modem, DSL, WISP, PPPoE, etc. — can participate in balancing.
TIP: Note: Balancing will be most effective for multithreaded traffic (point-to-multipoint or one-to-many connections), such as torrent traffic, P2P or other protocols that open multiple connections that do not require saving the source address. In this case, the connections will be distributed over different links.
Balancing will not work correctly for point-to-point or one-to-one connections because most hosts will drop packets from the same session if they come from different IP addresses. For example, an HTTPS-enabled website or web service that opens multiple sessions might not work because if some sessions are routed to different ISPs, it will trigger security and errors for the HTTPS protocol.
Below, as an example, we will enable balancing mode for BitTorrent protocol (it is easier to demonstrate the operation of this mode for multithreaded traffic).
1. You need to set up a separate Internet connection policy. On the 'Connection priorities' page, on the 'Internet connection policies' tab, you need to click '+ Add policy' and specify the name of the new policy, for example, torrent-multipath. Here, a policy is a set of rules and routing policies applied to hosts' traffic when they access the Internet.
NOTE: Important! Balancing mode does not work in the default policy, only in additional policies.
In our example, the Main and Backup connections are intended to provide Internet access and maximize bandwidth while downloading a file for the BitTorrent protocol.
In the right column 'Connection', you need to check only them and save the settings.
2. Here, on the 'Connection priorities' page, click on the 'Policy bindings' tab. The 'Show all objects' option lets you display all devices registered in the local segments and the local network segments configured on the router.
By holding down the Ctrl key on your keyboard with the mouse, you can select multiple devices at once. In our example, you need to move only one object (host MYHOST) to the previously added torrent-multipath policy.
3. Prioritizing the Main and Backup connections.
NOTE: Important! The load ratio is determined by the priority value of the ip global interfaces within the connection policy. The priority of the Backup connection must be lower by one than the priority of the Main connection. In our example, priorities 65533 and 65532 are used.
To make the balancing work, you will need to set the ip global value for Main and Backup via the router's command-line interface (CLI). In our example, the GigabitEthernet0/Vlan4 interface named Main and the ISP named Backup:
(config)> interface GigabitEthernet0/Vlan4 Core::Configurator: Done. (config-if)> ip global 65533 Network::Interface::Ip: "GigabitEthernet0/Vlan4": global priority is 65533. (config-if)> exit Core::Configurator: Done. (config)> system configuration save Core::ConfigurationSaver: Saving configuration.
GigabitEthernet0/Vlan4 interface for 1 Gbit/s or FastEthernet0/Vlan14 interface for 100 Mbit/s.
(config)> interface ISP Core::Configurator: Done. (config-if)> ip global 65532 Network::Interface::Ip: "ISP": global priority is 65532. (config-if)> exit Core::Configurator: Done. (config)> system configuration save Core::ConfigurationSaver: Saving configuration.
4. Enable balancing mode for the torrent-multipath policy:
(config)> ip policy Policy5 Network::PolicyTable: Policy "Policy5" exists. (config-policy)> multipath Network::PolicyTable: "Policy5": enable multipath. (config-policy)> exit Core::Configurator: Done. (config)> system configuration save Core::ConfigurationSaver: Saving configuration.
In our example, the torrent-multipath alias corresponds to the policy's name of the Policy5:
(config)> show ip policy policy, name = Policy5, description = torrent-multipath: mark: ffffd05 table: 47
5. Here, in the command-line interface, check the routing table.
The numbering of the Internet connection policies (ip policy PolicyX) starts at 42.
In our example, the ip policy Policy5 is numbered 47:
(config)> show ip route table 47 ================================================================================ Destination Gateway Interface Metric ================================================================================ 0.0.0.0/0 192.168.209.1 GigabitEthernet0/Vlan4 253 0.0.0.0/0 184.108.40.206 ISP 253 10.1.30.0/24 0.0.0.0 Guest 0 220.127.116.11/32 192.168.209.1 GigabitEthernet0/Vlan4 0 172.16.82.0/24 0.0.0.0 Wireguard2 0 192.168.3.0/24 0.0.0.0 Bridge2 0 192.168.22.0/24 0.0.0.0 Home 0 192.168.209.0/24 0.0.0.0 GigabitEthernet0/Vlan4 0 18.104.22.168/24 0.0.0.0 ISP 0 22.214.171.124/25 126.96.36.199 ISP 0 188.8.131.52/32 184.108.40.206 ISP 0 220.127.116.11/32 192.168.209.1 GigabitEthernet0/Vlan4 0 18.104.22.168/32 192.168.209.1 GigabitEthernet0/Vlan4 0
After enabling balancing mode, a default route is added within the Additional policy for the interfaces added to this policy. In other words, if two ISP interfaces are in the table, it means that multipath works.
6. Check the Download speed on connected interfaces in the web interface on the Dashboard.
Channel rate of Main and Backup connections up to 100 Mbit/s = 12.5 Mbytes/s:
The download speed is summed from the two connections, so we get up to 22.4 Mbytes/s = 179.2 Mbit/s.
To disable balancing mode, you will need to run the following commands via the router's CLI:
(config)> ip policy Policy5 Network::PolicyTable: Policy "Policy5" exists. (config-policy)> no multipath Network::PolicyTable: "Policy5": enable multipath. (config-policy)> exit Core::Configurator: Done. (config)> system configuration save Core::ConfigurationSaver: Saving configuration...
TIP: Tip: If you have 100 Mbit/s and 200 Mbit/s Internet channels, you need to set the first Internet connection to ip global value 10000 and the second Internet connection to ip global value 20000. Then the balancing will work in the ratio of 1:2, and the total speed will increase up to 300 Mbit/s.
TIP: Note: The balancing mode also works for the Download Station built into KeeneticOS. You can assign a connection policy for the BitTorrent client with the command torrent policy <connection_policy>