This section provides an example for configuring maximum bandwidth for each IP address to restrict the total bandwidth available for enterprise employees to access the Internet and to limit the total maximum available bandwidth for intranet servers to provide services externally.
As shown in Figure 1, employees access the Internet through Source NAT. The enterprise applies for four IP addresses (1.1.1.2 to 1.1.1.5) as the post-NAT public IP addresses. The enterprise deploys multiple Web servers which provide Web access services through NAT Server for users on the Internet. The public IP address of the servers is 1.1.1.6. In peak hours, when Internet users access the Web servers, the web pages and pictures fail to be displayed completely. On the other hand, when the Web servers suffer from burst access, the Internet access experience of enterprise employees is also compromised.
The enterprise requires to enable the bandwidth management function on the FW to limit the total bandwidth of the employees that access the Internet and the total bandwidth for Web servers to provide services externally. That is, the FW limits only the bandwidth for the public IP address after Source NAT and before NAT Server. Assign 60 Mbit/s downstream bandwidth (untrust to trust) for intranet users to access the Internet and 40 Mbit/s downstream bandwidth (dmz to untrust) for Internet users to access the Web servers.
[FW] traffic-policy [FW-policy-traffic] profile profile_surf [FW-policy-traffic-profile-profile_surf] bandwidth maximum-bandwidth whole downstream 60000 [FW-policy-traffic-profile-profile_surf] quit
[FW-policy-traffic] public-ip source match enable
[FW-policy-traffic] rule name policy_surf [FW-policy-traffic-rule-policy_surf] source-zone trust [FW-policy-traffic-rule-policy_surf] destination-zone untrust [FW-policy-traffic-rule-policy_surf] source-address range 1.1.1.2 1.1.1.5 [FW-policy-traffic-rule-policy_surf] action qos profile profile_surf [FW-policy-traffic-rule-policy_surf] quit
[FW-policy-traffic] profile profile_websvr [FW-policy-traffic-profile-profile_websvr] bandwidth maximum-bandwidth whole downstream 40000 [FW-policy-traffic-profile-profile_websvr] quit
[FW-policy-traffic] public-ip destination match enable
[FW-policy-traffic] rule name policy_websvr [FW-policy-traffic-rule-policy_websvr] source-zone untrust [FW-policy-traffic-rule-policy_websvr] destination-zone dmz [FW-policy-traffic-rule-policy_websvr] destination-address 1.1.1.6 32 [FW-policy-traffic-rule-policy_websvr] action qos profile profile_websvr [FW-policy-traffic-rule-policy_websvr] quit
This section provides only the script related to the example.
# sysname FW # time-range rush_time period-range 15:00:00 to 18:00:00 working-day # interface GigabitEthernet0/0/1 undo shutdown ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/2 undo shutdown ip address 10.2.0.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 # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/2 # traffic-policy public-ip destination match enable public-ip source match enable profile profile_surf bandwidth maximum-bandwidth whole downstream 60000 profile profile_websvr bandwidth maximum-bandwidth whole downstream 40000 rule name policy_surf source-zone trust destination-zone untrust source-address range 1.1.1.2 1.1.1.5 action qos profile profile_surf rule name policy_websvr source-zone untrust destination-zone dmz destination-address 1.1.1.6 32 action qos profile profile_websvr