fbpx

Can load balancing be done with PCC and HotSpot on the same MikroTik device?

Yes, it is possible to configure load balancing using the PCC (Per Connection Classifier) ​​method together with HotSpot on the same MikroTik device.

This combination can be very useful for managing traffic load on networks where Internet access is also provided via HotSpot, such as in cafes, hotels or public spaces.

What is PCC and how does it work?

PCC is a load balancing technique in MikroTik's RouterOS that allows connections to be distributed between multiple Internet lines (for example, two ISP connections) based on specific criteria such as IP addresses or ports.

This ensures that multiple sessions or connections from the same client are kept on the same output interface, maintaining session consistency, especially useful to avoid problems in applications that do not handle IP changes well during a single session.

What is HotSpot and how does it work?

HotSpot in MikroTik is a functionality that provides a gateway to connect users to a local network, typically providing authentication and client management.

It is widely used to control Internet access in public places through a login page.

Configuring PCC with HotSpot in MikroTik

To implement both services on the same MikroTik device, you must configure both components to work in harmony, ensuring that HotSpot traffic is properly distributed across ISP lines according to PCC rules.

Here's how you could configure it:

  1. Configure Interfaces and Internet Connections:
    • Make sure all WAN interfaces are configured and can connect to the Internet.
  2. Configure PCC for Load Balancing:
    • Use mangle to mark packets and split traffic between available connections.

    /ip firewall mangle
    add chain=prerouting connection-mark=no-mark in-interface=bridge-local \
    action=mark-connection new-connection-mark=ISP1_conn per-connection-classifier=both-addresses-and-ports:2/0
    add chain=prerouting connection-mark=no-mark in-interface=bridge-local \
    action=mark-connection new-connection-mark=ISP2_conn per-connection-classifier=both-addresses-and-ports:2/1
  3. Configure Outgoing Routes:
    • Assign routes to split traffic based on connection marks.

    /ip route
    add dst-address=0.0.0.0/0 gateway=ISP1-gateway routing-mark=ISP1_conn
    add dst-address=0.0.0.0/0 gateway=ISP2-gateway routing-mark=ISP2_conn
  4. Set up HotSpot:
    • Set HotSpot to the internal interface where users will connect.

    /ip hotspot setup

Final Considerations

  • Testing and Monitoring: After configuring PCC and HotSpot, it is crucial to monitor the network to ensure that load balancing is working properly and that HotSpot users have a stable and efficient connection experience.
  • Security: Be sure to implement appropriate security measures to protect both HotSpot access and load balancing configuration.

Setting up PCC and HotSpot on the same MikroTik device requires careful planning to ensure that both services operate efficiently and without conflict, thus providing a robust and well-managed network.

There are no tags for this post.
Did this content help you?
Facebook
Twitter
LinkedIn
WhatsApp
Telegram

Other documents in this category

3 comments on “Can load balancing be done with PCC and HotSpot on the same MikroTik device?”

    1. Regards,

      Yes, PBR configurations can be made in MikroTik when you have Hotspot.
      Only as a recommendation you should create an address-list (LAN_Networks) in which you add the LAN network addresses you have, then in the MANGLE rule put that address-list (LAN_Networks) in dst-address-list but in denial, that is, activate the small box on the left side when the dst-address-list field is configured. Then you can put in src-address or src-address-list the network or networks to which you want to apply the PBR.

Leave your comment

Your email address will not be published. Required fields are marked with *

Tutorials available at MikroLABs

No Courses Found!

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011