This section provides an example for referencing a shared traffic profile in multiple policies to manage the bandwidth of one department in multiple dimensions.
As shown in Figure 1, an enterprise has departments A and B. The enterprise requires to enable the bandwidth management function on the FW to assign bandwidth resources available departments A and B. To prevent P2P services from occupying too many bandwidth resources, the enterprise also requires that the total bandwidth for P2P services of departments A and B be restricted. Therefore, departments A and B are subject to their separate bandwidth control and the bandwidth control of overall P2P services. Specific requirements are as follows:
[FW] traffic-policy [FW-policy-traffic] profile profile_dep_a [FW-policy-traffic-profile-profile_dep_a] bandwidth maximum-bandwidth whole downstream 60000 [FW-policy-traffic-profile-profile_dep_a] quit
In the example, user authentication configuration for department A (dep_a) and department B (dep_b) has been completed.
[FW-policy-traffic] rule name policy_dep_a [FW-policy-traffic-rule-policy_dep_a] source-zone trust [FW-policy-traffic-rule-policy_dep_a] destination-zone untrust [FW-policy-traffic-rule-policy_dep_a] user user-group /default/dep_a [FW-policy-traffic-rule-policy_dep_a] action qos profile profile_dep_a [FW-policy-traffic-rule-policy_dep_a] quit
[FW-policy-traffic] profile profile_dep_b [FW-policy-traffic-profile-profile_dep_b] bandwidth maximum-bandwidth whole downstream 40000 [FW-policy-traffic-profile-profile_dep_b] quit
[FW-policy-traffic] rule name policy_dep_b [FW-policy-traffic-rule-policy_dep_b] source-zone trust [FW-policy-traffic-rule-policy_dep_b] destination-zone untrust [FW-policy-traffic-rule-policy_dep_b] user user-group /default/dep_b [FW-policy-traffic-rule-policy_dep_b] action qos profile profile_dep_b [FW-policy-traffic-rule-policy_dep_b] quit
[FW-policy-traffic] profile profile_p2p_all [FW-policy-traffic-profile-profile_p2p_all] bandwidth reference-mode rule-shared [FW-policy-traffic-profile-profile_p2p_all] bandwidth maximum-bandwidth whole downstream 80000 [FW-policy-traffic-profile-profile_p2p_all] quit
The following example describes the bandwidth management configuration for the BitTorrent (BT) service. You can specify other P2P services as required.
[FW-policy-traffic] rule name policy_dep_a_p2p parent policy_dep_a [FW-policy-traffic-rule-policy_dep_a_p2p] source-zone trust [FW-policy-traffic-rule-policy_dep_a_p2p] destination-zone untrust [FW-policy-traffic-rule-policy_dep_a_p2p] application app BT [FW-policy-traffic-rule-policy_dep_a_p2p] action qos profile profile_p2p_all [FW-policy-traffic-rule-policy_dep_a_p2p] quit
[FW-policy-traffic] rule name policy_dep_b_p2p parent policy_dep_b [FW-policy-traffic-rule-policy_dep_b_p2p] source-zone trust [FW-policy-traffic-rule-policy_dep_b_p2p] destination-zone untrust [FW-policy-traffic-rule-policy_dep_b_p2p] application app BT [FW-policy-traffic-rule-policy_dep_b_p2p] action qos profile profile_p2p_all [FW-policy-traffic-rule-policy_dep_b_p2p] quit
# sysname FW # interface GigabitEthernet0/0/1 undo shutdown ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/3 undo shutdown 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 # traffic-policy profile profile_dep_a bandwidth maximum-bandwidth whole downstream 60000 profile profile_dep_b bandwidth maximum-bandwidth whole downstream 40000 profile profile_p2p_all bandwidth reference-mode rule-shared bandwidth maximum-bandwidth whole downstream 80000 rule name policy_dep_a source-zone trust destination-zone untrust user user-group /default/dep_a action qos profile profile_dep_a rule name policy_dep_a_p2p parent policy_dep_a source-zone trust destination-zone untrust application app BT action qos profile profile_p2p_all rule name policy_dep_b source-zone trust destination-zone untrust user user-group /default/dep_b action qos profile profile_dep_b rule name policy_dep_b_p2p parent policy_dep_b source-zone trust destination-zone untrust application app BT action qos profile profile_p2p_all # The following user/group creation configuration is stored in the database, but not in the configuration profile. user-manage group /default/dep_a user-manage group /default/dep_b