Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:bandwidth_conf [2015/04/05 21:27] – translator1 | en:bandwidth_conf [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | An individual configuration file is used to define each bandwidth control policy. This file specifies bandwidth limits for protocol classes (groups). The method is similar to [[shaping_settings|overall bandwidth control]]). | ||
| - | [[subscriber_management|fdpi_ctrl]] utility applies the configured policies to subscribers. | ||
| - | |||
| - | The format of the instruction: | ||
| - | < | ||
| - | fdpi_ctrl команда --policing файл_описания_полисинга [список_IP] | ||
| - | </ | ||
| - | Instructions' | ||
| - | |||
| - | The First Example: | ||
| - | |||
| - | We intend to offer our subscribers the plan for 10 Mb/s with torrent bandwidth limit of 3 Mb/s. | ||
| - | |||
| - | To accomplish the goal we create a class for torrents as described in [[priority_config|Configuring priorities]]. | ||
| - | < | ||
| - | bittorrent | ||
| - | default | ||
| - | </ | ||
| - | We split the traffic into 2 classes for this example:\\ | ||
| - | cs0 - corresponds to DSCP=0 QOS(IPP)=0 Best Effort\\ | ||
| - | cs1 - corresponds to DSCP=8 QOS(IPP)=1 Priority | ||
| - | |||
| - | We create the configuration file rateplan_1.cfg. It specifies bandwidth limits for each of 8 protocol classes (groups). We use HTB (the method of borrowing available bandwidth) and specify the bandwidth limit for torrents 3 Mb, but not smaller than 1 Mb. Unlike torrents, other traffic may take the whole available bandwidth. | ||
| - | |||
| - | < | ||
| - | htb_inbound_root=rate 10mbit | ||
| - | htb_inbound_class0=rate 8bit ceil 10mbit | ||
| - | htb_inbound_class1=rate 1mbit ceil 3mbit | ||
| - | htb_inbound_class2=rate 8bit ceil 10mbit | ||
| - | htb_inbound_class3=rate 8bit ceil 10mbit | ||
| - | htb_inbound_class4=rate 8bit ceil 10mbit | ||
| - | htb_inbound_class5=rate 8bit ceil 10mbit | ||
| - | htb_inbound_class6=rate 8bit ceil 10mbit | ||
| - | htb_inbound_class7=rate 8bit ceil 10mbit | ||
| - | htb_root=rate 10mbit | ||
| - | htb_class0=rate 8bit ceil 10mbit | ||
| - | htb_class1=rate 1mbit ceil 3mbit | ||
| - | htb_class2=rate 8bit ceil 10mbit | ||
| - | htb_class3=rate 8bit ceil 10mbit | ||
| - | htb_class4=rate 8bit ceil 10mbit | ||
| - | htb_class5=rate 8bit ceil 10mbit | ||
| - | htb_class6=rate 8bit ceil 10mbit | ||
| - | htb_class7=rate 8bit ceil 10mbit | ||
| - | </ | ||
| - | htp_inbound_root, | ||
| - | rate - is the minimal bandwidth\\ | ||
| - | ceil - is the maximum bandwidth that can be borrowed from the root class if available\\ | ||
| - | class2-7 would not be used as we configure two classes only: 0 and 1. | ||
| - | |||
| - | Here we assign the configured policy to subscribers that use this plan: | ||
| - | < | ||
| - | fdpi_ctrl load --policing rateplan_1.cfg --file subscribers_with_rateplan_1.txt | ||
| - | </ | ||
| - | |||
| - | The Second Example: | ||
| - | |||
| - | Let us assign the plan from the previous example to a subscriber with several IPs. | ||
| - | |||
| - | Check that database support is enabled in dpi / | ||
| - | < | ||
| - | udr=1 | ||
| - | </ | ||
| - | If it is not enabled: we enable it and restart DPI: service fastdpi restart | ||
| - | |||
| - | We reserve for corporative subscriber all his IPs: | ||
| - | < | ||
| - | fdpi_ctrl load --bind_multi --user OOO_PizzaJohnes: | ||
| - | </ | ||
| - | The subscriber' | ||
| - | |||
| - | We assign the bandwidth limits according to the plan: | ||
| - | < | ||
| - | fdpi_ctrl load --policing rateplan_1.cfg --login OOO_PizzaJohnes | ||
| - | </ | ||
| - | |||
| - | //For advanced users//: | ||
| - | We advise to learn how to [[bandwidth_incoming|control outbound traffic via feedback loop]]. | ||
| - | |||
| - | |||
| - | |||