This section describes how to implement quota management when the FW functions as a security gateway on the intranet border.
As shown in Figure 1, an enterprise deploys the FW on the intranet boarder as an egress gateway and purchases a monthly traffic package of 500 GB targeted at small- and medium-sized enterprises from a carrier to enable intranet users to access the Internet. However, the part exceeding the package requires independent settlement. To reduce costs, enterprise managers consider assigning a fixed traffic quota to each employee. In addition, they intend to control employees' Internet access duration to boost productivity.
In a word, the managers hope to use the quota control policy function of the FW to meet the following requirements:
Assume that the user in this example already exists on the FW, and the authentication configuration is complete.
Quota Data |
Manager |
Common Employee |
|---|---|---|
Daily traffic quota |
- |
500 MB |
Daily Internet access duration |
- |
240 minutes |
Monthly traffic quota |
20000 MB |
10000 MB |
Start date for monthly traffic statistics collection |
First day of each month |
First day of each month |
Maximum bandwidth limit after the quota is exceeded |
800 Kbit/s |
0 |
[FW] quota-policy [FW-policy-quota] profile quota_employee [FW-policy-quota-profile-quota_employee] stream-daily 500 [FW-policy-quota-profile-quota_employee] stream-monthly 10000 [FW-policy-quota-profile-quota_employee] stream-monthly start-date 1 [FW-policy-quota-profile-quota_employee] time-daily 240 [FW-policy-quota-profile-quota_employee] limit-bandwidth 0 [FW-policy-quota-profile-quota_employee] quit
[FW-policy-quota] rule name quota_employee [FW-policy-quota-rule-quota_employee] user user-group /default/employee [FW-policy-quota-rule-quota_employee] action quota profile quota_employee [FW-policy-quota-rule-quota_employee] quit
[FW-policy-quota] profile quota_manager [FW-policy-quota-profile-quota_manager] stream-monthly 20000 [FW-policy-quota-profile-quota_manager] stream-monthly start-date 1 [FW-policy-quota-profile-quota_manager] limit-bandwidth 800 [FW-policy-quota-profile-quota_manager] quit
[FW-policy-quota] rule name quota_manager [FW-policy-quota-rule-quota_manager] user user-group /default/manager [FW-policy-quota-rule-quota_manager] action quota profile quota_manager [FW-policy-quota-rule-quota_manager] quit
For common employees, their network activities are blocked once any of the following requirements is met:
For managers, after their monthly Internet access traffic exceeds 20 GB, their maximum bandwidth is limited at 800 Kbit/s.
# sysname FW # interface GigabitEthernet0/0/1 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/3 ip address 10.3.0.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # quota-policy profile quota_employee stream-monthly 10000 stream-daily 500 time-daily 240 profile quota_manager stream-monthly 20000 limit-bandwidth 800 rule name quota_employee user user-group /default/employee action quota profile quota_employee rule name quota_manager user user-group /default/manager action quota profile quota_manager # return