CN105471765B - Virtual machine external mesh bandwidth limiting method for cloud platform - Google Patents

Virtual machine external mesh bandwidth limiting method for cloud platform Download PDF

Info

Publication number
CN105471765B
CN105471765B CN201510982130.4A CN201510982130A CN105471765B CN 105471765 B CN105471765 B CN 105471765B CN 201510982130 A CN201510982130 A CN 201510982130A CN 105471765 B CN105471765 B CN 105471765B
Authority
CN
China
Prior art keywords
bandwidth
external network
information
virtual machine
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510982130.4A
Other languages
Chinese (zh)
Other versions
CN105471765A (en
Inventor
罗义兵
杨松
季统凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201510982130.4A priority Critical patent/CN105471765B/en
Publication of CN105471765A publication Critical patent/CN105471765A/en
Application granted granted Critical
Publication of CN105471765B publication Critical patent/CN105471765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

the invention relates to the technical field of cloud computing, in particular to a virtual machine extranet bandwidth limiting method of a cloud platform. The invention firstly stores the limited parameter information such as IP, bandwidth and the like into a database through a Reset interface; then, notifying a bandwidth limiting Agent to obtain the latest bandwidth information, and obtaining the latest bandwidth information in a database by the bandwidth limiting Agent; then, the bandwidth limiting Agent establishes a bandwidth queue in an interface where an external network IP is positioned on the virtual router, and adds an external network IP address filtering rule to the queue; eventually, the bandwidth limitations of the virtual machine will work when it accesses the extranet. The method can solve the problem that the virtual machine in the cloud platform accesses the bandwidth limitation of the external network through NAT mapping on the virtual route, can support that one external network interface has a plurality of external network IPs and has bandwidth limitation on the plurality of external network IPs, and has more accurate and reliable bandwidth limitation; can be used for limiting the bandwidth of the virtual machine extranet.

Description

Virtual machine external mesh bandwidth limiting method for cloud platform
Technical Field
The invention relates to the technical field of cloud computing, in particular to a virtual machine extranet bandwidth limiting method of a cloud platform.
Background
many bandwidth limiting functions are realized for large network hardware, but the bandwidth is limited from a software level on a cloud platform environment, and the virtual machine extranet access and extranet access virtual machine access are limited. Some existing schemes for analyzing the cloud platform to realize the bandwidth limitation of the external network are to mount an external network card on a virtual machine, then limit the bandwidth of the external network card, few bandwidth limitation schemes for mapping an internal network to an external network IP through NAT on a virtual router are mentioned, and meanwhile, the bandwidth limitation of a plurality of external network IPs is realized on one virtual router, so that a convenient bandwidth limitation interface is provided.
disclosure of Invention
The invention provides a virtual machine extranet bandwidth limiting method for a cloud platform.
The technical scheme for solving the technical problems is as follows:
the method comprises the following steps:
(1) Saving the limited IP, bandwidth and other parameter information into a database by providing a Reset interface;
(2) Informing a bandwidth limiting Agent to acquire the latest bandwidth information, and acquiring the latest bandwidth information in a database by the bandwidth limiting Agent;
(3) The bandwidth limiting Agent establishes a bandwidth queue on an interface where an external network IP is positioned in the virtual router, and adds an external network IP address filtering rule to the queue;
(4) When the virtual machine accesses the external network, the matching rule plays a role in limiting the bandwidth of the external network.
The Reset interface provides an interface by a network service and supports the input of a parameter JSON format;
The network service also provides database access and persists bandwidth and IP information into the database;
And after the database is updated, the network server side sends a message to the bandwidth limiting Agent, and the message is sent through a message route.
After receiving a bandwidth limiting message routing message, the bandwidth limiting Agent acquires the latest bandwidth information from a network server in a message routing form, wherein the bandwidth limiting information comprises a virtual route id, an external network IP and bandwidth information;
The bandwidth limiting Agent acquires an external network interface on a network name space where the virtual machine route is located according to the virtual route id, and updates the bandwidth on the interface;
the bandwidth updating comprises the steps of firstly checking whether the external network IP bandwidth rule exists, and if so, updating a bandwidth queue matched in the rule; otherwise, a new bandwidth queue is established on the external network interface according to the bandwidth size, then a matching rule is added according to the external network IP information, the matched IP data packet is placed in the newly added queue, and the queue adjusts the speed of the sent data packet according to the bandwidth information, so that the function of limiting the external network bandwidth of the virtual machine is finally achieved.
The bandwidth rules support priority, wherein one rule can only match one queue;
the external network interface comprises a plurality of external network IPs and supports the establishment of a bandwidth queue for each external network IP.
The method and the device can solve the problem of bandwidth limitation of accessing the external network by the virtual machine in the cloud platform through NAT mapping on the virtual route, can support one external network interface to have a plurality of external network IPs and limit the bandwidth of the plurality of external network IPs, and have accurate and reliable bandwidth limitation.
Drawings
The invention is further described below with reference to the accompanying drawings:
FIG. 1 is a flow chart of the present invention.
Detailed Description
the flow chart is shown in fig. 1, and the specific implementation process is as follows:
1. providing Reset interface to set bandwidth and storing in database
curl -i -X PUT http://20.251.36.21:9696/v2.0/floatingip_qoss/{e2978449-635f-4f64-b240-79dd61fb0153} -H″Content-Type:application/json″-H″X-Auth-Token:$TOKEN ID″-d′{″floatingip_qos″:{″max_rate″:2000}}′
Wherein e2978449-635f-4f64-b240-79dd61fb0153 is Id information represented by the floating IP, and max _ rate is 2000 kbits ps
The information stored in the database is:
src _ ip: 20.251.36.104 outer network IP address, max _ rate maximum bandwidth rate of 2000 kbits ps, router _ id of b90a765b-d4ee-4ca9-aee8-79387537a3a7, and floating IP port information of e2978449-635f-4f64-b240-79dd61fb0153.
the specific Server service is provided by the WSGI program of python, the connected database is Mysql, and Sqlalchemy is used for driving connection
2. sending a message to a bandwidth limiting Agent, the bandwidth limiting Agent obtaining bandwidth information
The main content of the bandwidth information is as follows:
Specifically, communication is realized through a rabbitm-mq message middleware
3. Establishing bandwidth queues and matching rules on virtual routes according to bandwidth information
(1) obtaining a network namespace for use by the route:
qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d
network interface on the network namespace used by floating IP: qg-1444681f-45
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d ip addr show
29:qg-1444681f-45:<BROADCAST,MULTICAST,UP,LOWER_UP>
mtu 1500 qdisc htb state UNKNOWN
………………………………………………………………………….
inet 20.251.36.104/32 brd 20.251.36.104 scope global qg-1444681f-45
valid_lft forever preferred_lft forever
……………………………
If the bandwidth setting is performed for the first time, it is performed as follows.
(2) clearing unclassifiable qdisc information on interface
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d tc qdisc del dev qg-1444681f-45 root
(3) establishing non-classifiable qdisc information on an interface, wherein the sub-class can borrow bandwidth based on an htb algorithm (hierarchical token bucket algorithm)
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d tc qdisc add dev qg-1444681f-45 root handle 1:htb
(4) Build the first root class under the root
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d tc class add dev qg-1444681f-45 parent 1:classid 1:1 htb rate 100mbit ceil 100mbit
(5) Establishing subclasses and leaf nodes of the subclasses, and setting bandwidth limitation
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d tc class add dev parent 1:1 classid 1:10 htb rate 2000kbit ceil 2000kbit
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d tc qdisc add dev qg-1444681f-45 parent 1:10 sfq perturb 10
(6) Add flow rules
ip netns exec qrouter-388d58c3-dcd7-467c-a887-7531f9b35d7d tc filter add dev qg-1444681f-45 protocol ip parent 1:u32 match ip src 20.251.36.104flowid 1:10
4. The virtual machine accesses the external network to complete the bandwidth limitation
the virtual machine accesses the external network by using NAT mapping on the route, the IP of the virtual machine is 12.12.12.14, and the IP of the external network after mapping is 20.251.36.104, as shown in the following (1):
(1) virtual machine IP
root@host-12-12-12-14~]#ip addr show
……………………………..
2:eth0:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether fa:16:3e:3c:02:c4 brd ff:ff:ff:ff:ff:ff
inet 12.12.12.14/24 brd 12.12.12.255 scope global dynamic eth0
………………..
(2) testing the bandwidth of the external network by iperf
The external network bandwidth (downlink bandwidth) is tested by an iperf tool, wherein 20.251.36.13 is a Server end of the iperf, a virtual machine is a client of the iperf, the iperf client commands iperf3-c 20.251.36.13, and the downlink bandwidth after the test is 1.91Mbits/sec (1910 kbits/sec).

Claims (2)

1. A virtual machine extranet bandwidth limiting method of a cloud platform is characterized by comprising the following steps:
(1) Saving the limited IP and bandwidth parameter information into a database by providing a Reset interface;
(2) Informing a bandwidth limiting Agent to acquire the latest bandwidth information, and acquiring the latest bandwidth information in a database by the bandwidth limiting Agent;
(3) The bandwidth limiting Agent establishes a bandwidth queue on an interface where an external network IP is positioned in the virtual router, and adds an external network IP address filtering rule to the queue;
(4) when the virtual machine accesses the external network, the matching rule plays a role in limiting the bandwidth of the external network;
The Reset interface provides an interface by a network service and supports the input of a parameter JSON format;
the network service also provides database access and persists bandwidth and IP information into the database;
After the database is updated, the network service sends a message to a bandwidth limiting Agent, and the message is sent through a message route;
After receiving a bandwidth limiting message routing message, the bandwidth limiting Agent acquires the latest bandwidth information from a network server in a message routing form, wherein the bandwidth limiting information comprises a virtual route id, an external network IP and bandwidth information;
the bandwidth limiting Agent acquires an external network interface on a network name space where the virtual machine route is located according to the virtual route id, and updates the bandwidth on the interface;
the bandwidth updating comprises the steps of firstly checking whether the external network IP bandwidth rule exists, and if so, updating a bandwidth queue matched in the rule; otherwise, a new bandwidth queue is established on the external network interface according to the bandwidth size, then a matching rule is added according to the external network IP information, the matched IP data packet is placed in the newly added queue, and the queue adjusts the speed of the sent data packet according to the bandwidth information, so that the function of limiting the external network bandwidth of the virtual machine is finally achieved.
2. The virtual machine extranet bandwidth limiting method of claim 1, characterized by: the bandwidth rules support priority, wherein one rule can only match one queue;
the external network interface comprises a plurality of external network IPs and supports the establishment of a bandwidth queue for each external network IP.
CN201510982130.4A 2015-12-22 2015-12-22 Virtual machine external mesh bandwidth limiting method for cloud platform Active CN105471765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510982130.4A CN105471765B (en) 2015-12-22 2015-12-22 Virtual machine external mesh bandwidth limiting method for cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510982130.4A CN105471765B (en) 2015-12-22 2015-12-22 Virtual machine external mesh bandwidth limiting method for cloud platform

Publications (2)

Publication Number Publication Date
CN105471765A CN105471765A (en) 2016-04-06
CN105471765B true CN105471765B (en) 2019-12-10

Family

ID=55609055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510982130.4A Active CN105471765B (en) 2015-12-22 2015-12-22 Virtual machine external mesh bandwidth limiting method for cloud platform

Country Status (1)

Country Link
CN (1) CN105471765B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915387B (en) * 2016-05-31 2019-04-30 新浪网技术(中国)有限公司 The outer net bandwidth speed limiting method, apparatus and system of cloud host under a kind of IaaS cloud platform
CN105978825A (en) * 2016-07-15 2016-09-28 国云科技股份有限公司 Cloud platform access entrance bandwidth sharing method
CN106487590B (en) * 2016-10-20 2019-05-21 国云科技股份有限公司 A method of batch virtual machine port speed constraint is realized based on virtual network
CN111010347A (en) * 2019-11-30 2020-04-14 北京浪潮数据技术有限公司 Network flow control method and related device of cloud platform

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634235A (en) * 2013-11-01 2014-03-12 国云科技股份有限公司 Method for limiting speed of network interface of virtual machine

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8804523B2 (en) * 2012-06-21 2014-08-12 Microsoft Corporation Ensuring predictable and quantifiable networking performance
WO2014117008A1 (en) * 2013-01-25 2014-07-31 Huawei Technologies Co., Ltd. Joint compress and forward relaying system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634235A (en) * 2013-11-01 2014-03-12 国云科技股份有限公司 Method for limiting speed of network interface of virtual machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
可编程虚拟路由器关键技术与原型系统;罗腊咏等;《计算机学报》;20130715;全文 *

Also Published As

Publication number Publication date
CN105471765A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
ES2746351T3 (en) Method and apparatus for identifying application information in network traffic
CN105471765B (en) Virtual machine external mesh bandwidth limiting method for cloud platform
EP3709573A1 (en) Satisfying service level agreement metrics for unknown applications
CN105491123B (en) Communication means and device between container
US8862865B2 (en) Rebooting infiniband clusters
US8958294B2 (en) Assigning identifiers to mobile devices according to their data service requirements
US10484233B2 (en) Implementing provider edge with hybrid packet processing appliance
US9455888B2 (en) Application topology based on network traffic
US20140365634A1 (en) Programmable Network Analytics Processing via an Inspect/Apply-Action Applied to Physical and Virtual Entities
CN102098272B (en) Protocol identification method, device and system
US10439901B2 (en) Messaging queue spinning engine
CN108777629B (en) Modification method, device and equipment of processing rule
CN108471629A (en) The control method of business service quality, equipment and system in transmission network
CN110474960B (en) Method and device for service deployment in virtual network
EP3113539A1 (en) Load balancing user plane traffic in a telecommunication network
WO2017101815A1 (en) Message processing method, device and system
CN115834708A (en) Load balancing method, device, equipment and computer readable storage medium
CN114006829A (en) Synthesizing detection parameters based on historical data
CN114025000B (en) Method, device, equipment and storage medium for establishing network access relationship
CN107786448B (en) Method and device for establishing forwarding path of service flow
CN112910793A (en) Method for connection multiplexing in seven-layer load balancing and load balancer
US20130097228A1 (en) Network storage system, data manipulation method in network storage system, storage device and computer program product for controlling client device
US20210281656A1 (en) Applying application-based policy rules using a programmable application cache
US20150212834A1 (en) Interoperation method of newtork device performed by computing device including cloud operating system in could environment
US9992073B2 (en) Network status measuring system and a method for measuring status of a network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Applicant after: G-Cloud Technology Co., Ltd.

Address before: 523808 Guangdong province Dongguan City Songshan Lake Science and Technology Industrial Park Building No. 14 Keyuan pine

Applicant before: G-Cloud Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant