Contents
Step 1: Configure PPPoE
- Basic PPPoE Setup:
- Set up your PPPoE server as you normally would. Ensure that you have configured the necessary interfaces and settings.
Step 2: RADIUS Configuration
- Add RADIUS Attributes:
- In your RADIUS server, add the reply attribute
Mikrotik-Address-List
. - This attribute will automatically add the IP address of the client logging in to a specified address list. For example, set the attribute value to
pppoe_paket10
.
- In your RADIUS server, add the reply attribute
Step 3: Mangle Rules Setup
-
Mark Connection:
- Use the following command to create a mangle rule that marks connections based on the address list:
for pppoe mangle, generally its better to use chain forward than prerouting
/ip firewall mangle add chain=forward src-address-list=range_pppoe_ip_list action=mark-connection new-connection-mark=CON-PPPOE
- Use the following command to create a mangle rule that marks connections based on the address list:
-
Mark Packets:
- Add another mangle rule to mark packets using the connection mark:
/ip firewall mangle add chain=forward connection-mark=CON-PPPOE src-address-list=pppoe_paket10 action=mark-packet new-packet-mark=pppoe_packet
Step 4: Queue Tree Configuration
-
Add Queue Trees:
- Create queue trees using the packet mark defined above. For example:
/queue tree add name="PPPoE Download Queue" parent=global queue=default packet-mark=pppoe_packet limit-at=1M max-limit=10M
Summary
This setup allows you to effectively manage bandwidth for PPPoE clients based on their RADIUS profiles. By using the Mikrotik-Address-List
attribute, you can dynamically manage IP addresses and apply appropriate bandwidth limitations.