The invention provides a flexible bandwidth configuration method based on Linux flow control, and the method comprises the following steps: S1, obtaining a
router where a plurality of floating ips are located, wherein the plurality of floating ips are ready to be shared by a lessee; S2, employing an iptables command to mark a data
package sent by a lessee
virtual machine with a lessee flag value for recognizing the lessee, and enabling the
source address of the data
package to be replaced by a floating
ip address; S3, building an HTB
queue and default classification on an
extranet card; S4, building lessee classification in the HTB
queue, and setting a corresponding bandwidth value; S5, building a filter corresponding to the classification according to the lessee flag value. According to the invention, when one lessee applies for a plurality of
public network IP address, the method achieve a flexible
bandwidth sharing function, solves a problem of the waste of the lessee bandwidth resources, and reduces the use cost of the lessee.