Brisanet investiga problemas de upload em planos de fibra ótica
Em meio ao crescente uso da internet em diversas atividades diárias, como trabalho remoto, streaming e jogos online, a estabilidade da conexão se tornou um fator fundamental para muitos usuários. Recentemente, a operadora Brisanet, conhecida por sua extensa cobertura em fibra ótica, tem recebido comentários de clientes preocupados com problemas de instabilidade no upload, especialmente aqueles que utilizam planos de alta velocidade, como os de 700 megabits por segundo (Mbps).(...)
由於 FortiGate 600C 等較早期機型的 FortiOS 版本(5.x.x ),不支援在GUI下設定PPPOE。故只能夠過下指令的方式設定之(不管是直接接console線下指令或是在GUI的指令視窗都可以)
設定指令的參考範本:config system interface edit “wan1” set vdom “root” set mode pppoe set allowaccess ping fgfm set type physical set alias “MyISP” set username “” set password “”end
In this script, you need to define the username variable with the username of the PPPoE user you want to monitor. You also need to set the threshold variable to the maximum amount of data (in bytes) that the user can consume before being disconnected. Adjust these variables according to your requirements.
The script retrieves the bytes-in and bytes-out counters for the specified user and compares them with the threshold. If either the incoming or outgoing data exceeds the threshold, it logs a warning message and removes the user from the PPPoE server, effectively disconnecting them.
You can schedule this script to run periodically using the MikroTik scheduler to continuously monitor and disconnect users who exceed the data threshold.
Let's go through the script step by step:
1. The first line `:local username "user1"` assigns the value "user1" to the local variable "username". You can change this value to the desired PPPoE username you want to monitor.
2. The second line `:local threshold 1000000000` sets the data threshold to 1GB (1,000,000,000 bytes). You can adjust this threshold to the desired value.
3. The next two lines retrieve the bytes-in and bytes-out values for the specified username using the `/interface pppoe-server monitor get` command.
4. The if condition `:if ($bytesIn > $threshold || $bytesOut > $threshold) do={...}` checks if either the bytes-in or bytes-out values for the user exceed the threshold.
5. If the condition is true, i.e., data usage is exceeding the threshold, the script logs a warning message with the username and disconnects the user by removing them from the PPPoE server using the `/interface pppoe-server remove` command.
To disconnect specific users in PPPoE MikroTik when they consume a certain amount of data.
you can follow these steps:
1- Set up a data limit attribute for each PPPoE user:
Go to "PPP" -> "Profiles" in the MikroTik interface.
Select the profile used for PPPoE users and edit it.
In the "Rate Limit" tab, set the desired data limit for the "Tx Limit" field. For example, if you want to limit users to 1 GB, enter "1G/1G" (1 Gigabyte upload and download limit).
2- Create a script to monitor data usage and disconnect users:
Go to "System" -> "Scripts" in the MikroTik interface.
Click on the "+" button to add a new script.
Give the script a name (e.g., "DataLimitScript").
In the "Source" field, enter the following script code:
:local dataLimit 1G; -- Set the data limit here (e.g., 1 Gigabyte)
:local threshold ($dataLimit * 0.9); -- Set the threshold (e.g., 90% of the data limit)
:foreach user in=[/ppp active find] do={
:local userName [/ppp active get $user user];
:local bytesOut [/ppp active get $user bytes-out];
:local bytesIn [/ppp active get $user bytes-in];
:local totalBytes ($bytesOut + $bytesIn);
:if ($totalBytes >= $threshold) do={
:log info ("Data limit reached for user: ".$userName);
/ppp active remove $user;
}
}
2- Schedule the script to run periodically:
Go to "System" -> "Scheduler" in the MikroTik interface.
Click on the "+" button to add a new scheduler entry.
Set the desired interval for the script to run (e.g., every 5 minutes).
In the "On Event" field, enter the name of the script created in step 2 (e.g., "DataLimitScript").
This script will check the data usage of each active PPPoE user and disconnect them if they reach the specified data limit or threshold. Adjust the "dataLimit" variable to set the desired limit (e.g., "1G" for 1 Gigabyte). You can also modify the "threshold" variable to change the percentage at which users will be disconnected.
Please note that PPPoE users need to be active for the script to monitor their data usage. Also, ensure that the script runs with an appropriate frequency to check and disconnect users when necessary.
Jika kalian ingin memahami apa itu PPPoE, cara kerja, kelebihan dan kekurangnaya. Maka kalian harus membaca artikel ini. Disini admin akan menjelaskannya sejelas mungkin.
Jika kalian ingin memahami apa itu PPPoE, cara kerja, kelebihan dan kekurangnaya. Maka kalian harus membaca artikel ini. Disini admin akan menjelaskannya sejelas mungkin.