[go: up one dir, main page]

CN109257290A - router and flow control method - Google Patents

router and flow control method Download PDF

Info

Publication number
CN109257290A
CN109257290A CN201710569471.8A CN201710569471A CN109257290A CN 109257290 A CN109257290 A CN 109257290A CN 201710569471 A CN201710569471 A CN 201710569471A CN 109257290 A CN109257290 A CN 109257290A
Authority
CN
China
Prior art keywords
network
flow control
package
connection
speed limit
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.)
Withdrawn
Application number
CN201710569471.8A
Other languages
Chinese (zh)
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.)
Synology Inc
Original Assignee
Synology Inc
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 Synology Inc filed Critical Synology Inc
Priority to CN201710569471.8A priority Critical patent/CN109257290A/en
Publication of CN109257290A publication Critical patent/CN109257290A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

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

Abstract

A router and a flow control method are provided, the router is provided with a network transmission interface, a first controller and a second controller. The network transport interface receives a first packet associated with a connection and at least one second packet following the first packet. The first controller analyzes the first packet to obtain at least one protocol layer parameter of the connection, and determines the uplink speed limit information and the downlink speed limit information of the connection according to the protocol layer parameter. And the second controller implements flow control on the second packet according to the uplink speed limit information and the downlink speed limit information.

Description

Router and flow control methods
Technical field
Present application relates generally to the flow control technique of router, in particular to a kind of router frame with dual controller The task of flow control is optionally offloaded to submaster controller by structure, master controller.
Background technique
It, generally can be by net since the service efficiency and data transmission efficiency of network is contemplated in the planning for setting up network Network is divided into Wide Area Network and Local Area Network, and router is then the important angle for playing bridge joint Wide Area Network and Local Area Network Color mainly provides the function of routing with transfer, determines the transmission path that package is passed through from source terminal to destination, this mistake Journey is known as routing, in addition, package is transferred to output port appropriate from input port in router interior, this process then claims To transfer.The routing and transfer function provided by router, any dress being whether located in Wide Area Network or Local Area Network Set the data transmission that can be smoothly completed between device and device.
With the fast development of network application, the keyholed back plate demand of data transmission is increasingly increased, then in addition to routing with It transfers except function, many routers have also been additionally provided the function of flow control.In general, flow control is for network Flow is managed, especially limit network flow bandwidth usage amount, with reduce package Loss Rate, reduce package delay, with And/or avoid the generation of choking.
For example, the connection of data transmission includes the transmission of uplink Yu downlink both direction, therefore, in tradition Need to receive the speed-limiting messages that uplink and downlink could be obtained after the package of both direction in the practice, thus to the data of the connection Flow control is implemented in transmission.However, uplink package is with downlink package and non-exhibiting is uniformly distributed during data transmission, Often there was only the package of single direction in some time section, other direction can just be received by resulting in the need for waiting for a period of time Package, and can not all implement flow control within the time that this section waits.
Summary of the invention
To solve the above-mentioned problems, the purpose of the application is to propose a kind of router architectures with dual controller to realize The method of flow control, specifically, master controller can just obtain two-way speed-limiting messages according to the package of single direction, and nothing It needs to wait for receiving the package of other direction, the task of package processing can be offloaded to secondary control including implementing flow control Device processed, to reduce the burden of master controller and promote the transmission efficiency of router.
This application provides a kind of routers, including network transport interface, the first controller and second controller.On State network transport interface to receive association to the first package of a connection and connect above-mentioned first package one or more the Two packages.Above-mentioned first controller obtains at least one agreement layer parameter of above-mentioned connection to parse above-mentioned first package, with And the uplink speed-limiting messages and downlink speed-limiting messages of above-mentioned connection are determined according to above-mentioned agreement layer parameter.Above-mentioned second controller To implement flow control to above-mentioned second package according to above-mentioned uplink speed-limiting messages and above-mentioned downlink speed-limiting messages (traffic control)。
Present invention also provides a kind of flow control methods, suitable for the routing including the first controller and second controller Device.Above-mentioned flow control methods are the following steps are included: receiving association to the first package of a connection and connecting above-mentioned first envelope One or more second packages of packet;Above-mentioned first package is parsed by above-mentioned first controller to obtain at least the one of above-mentioned connection association Given layer parameter;The uplink speed-limiting messages and downlink of above-mentioned connection are determined according to above-mentioned agreement layer parameter by above-mentioned first controller Speed-limiting messages;And by above-mentioned second controller according to above-mentioned uplink speed-limiting messages and above-mentioned downlink speed-limiting messages to above-mentioned Two packages implement flow control.
Preferably, above-mentioned uplink speed-limiting messages upstream service quality identification according to corresponding to above-mentioned agreement layer parameter Code is determined that above-mentioned downlink speed-limiting messages downstream service quality identification code according to corresponding to above-mentioned agreement layer parameter is determined.
In an embodiment, above-mentioned transport layer parameters are associated with to OSI (Open System Interconnection Reference Model, open system Interconnect Reference Model) the 3rd layer of the network architecture, and the network convention including source terminal The network convention address of the address and destination (Internet Protocol, IP).
In another embodiment, above-mentioned agreement layer parameter is associated with to the 2nd layer of the OSI network architecture, and the matchmaker including source terminal The MAC addresses of the address and destination body access control (Media Access Control, MAC).
In another embodiment, above-mentioned agreement layer parameter is associated with to the 7th layer of the OSI network architecture, and is known including application program Other code.
Below in conjunction with the drawings and specific embodiments, the present invention will be described in detail, but not as a limitation of the invention.
Detailed description of the invention
Fig. 1 network environment architecture diagram according to one embodiment of the application;
The system architecture schematic diagram of Fig. 2 router 10 according to one embodiment of the application;
Fig. 3 shows the schematic diagram of the OSI network architecture;
Fig. 4 shows that package shows in transmission and the parsing operation of received 7 agreement layer of the OSI network architecture related in the process It is intended to;
The flow chart of Fig. 5 flow control methods according to one embodiment of the application;
The operation chart of Fig. 6 flow control according to one embodiment of the application;
The operation chart of Fig. 7 flow control according to another embodiment of the application.
Wherein, appended drawing reference
100 network environments
10 routers
20 Wide Area Networks
21~23 network communication devices
30 Local Area Networks
31~33 user's devices
11 communication devices
12 master controllers
13 storage devices
14 network subsystems
14-1 submaster controller
14-2 storage device
610,710 network subsystem module
611,711 network subsystem database
620,720 network subsystem drive module
621,721 strengthen connection management module
630,730 network stack module
631 traffic classification modules
632,731 connection record database
740 resident program modules
S510~S540 number of steps
6a~6d, 7a~7e number of steps
Specific embodiment
What this section was described be implement the application preferred mode, it is therefore intended that illustrate spirit herein rather than to The protection scope for limiting the application, when it will be appreciated that using words such as "comprising", " comprising " in this manual, be to There are specific technical characteristic, numerical value, method and step, operation processing, element and/or components for expression, but are not precluded and can add Upper more technical characteristics, numerical value, method and step, operation processing, element, component or above any combination.
Fig. 1 network environment architecture diagram according to one embodiment of the application.Network environment 100 includes router 10, wide Domain network (Wide Area Network, WAN) 20 and Local Area Network (Local Area Network, LAN) 30, wherein Router 10 is set between Wide Area Network 20 and Local Area Network 30.
Wide Area Network 20 can be by telecommunication network, optical fiber (Optical) network or Asymmetrical Digital Subscriber Line Network composed by (Asymmetric Digital Subscriber Line, ADSL) network etc., and can be described as outer net or public affairs Net usually bridges biggish physical extent, and in general, the range that outer net or public network are covered can be from tens kilometers to thousands of Kilometer, and multiple areas, city or country can be connected by world-wide web (Internet), form international far-end network.
Wide Area Network 20 may include multi-section network communication device 21~23, and each of network communication device 21~23 can be Notebook computer, network storage servomechanism (Network Attached Storage, NAS), work station, is watched desktop computer Take device, smartphone or tablet computer.For example, any one of network communication device 21~23 can be servomechanism, to Various service/application is provided, such as: E-mail receiver/send service, movement push away the service of broadcasting, web service, community application service (such as Facebook), Web Video Service (such as Youtube) or news in brief transmitting-receiving service.
Local Area Network 30 can be by second too net, Wireless Fidelity (Wireless Fidelity, WiFi) network, twisted pair Network composed by (Twisted Pair) network or coaxial cable (Coaxial cable) network etc., and can be described as Intranet, It usually covers regional area, such as: certain floor in office or building.
It may include multi-section user device 31~33 in Local Area Network 30, each of user's device 31~33 can be pen Note type computer, desktop computer, smartphone, tablet computer, network storage servomechanism, work station or servomechanism etc. have The consumer electronic device of networking function.
Router 10 is mainly responsible for bridge joint Wide Area Network 20 and Local Area Network 30, and particularly, router 10 provides envelope Wrap processing function, such as: routing, transfer and/or flow control function, realize network communication device 21~23 with Data transmission between user's device 31~33.
In an embodiment, flow control can be for particular network agreement address (Internet Protocol, IP), specific The package of the medium plan address (Media Access Control, MAC) or application-specific carries out speed limit.
The system architecture schematic diagram of Fig. 2 router 10 according to one embodiment of the application.Router 10 includes network Coffret 11, master controller 12, storage device 13 and network subsystem (Network Subsystem, NSS) 14.
Network transport interface 11 is to provide the network communication device 21~23 being connected on Wide Area Network 20 and region User's device 31~33 on network 30.Network transport interface 11 can follow an at least particular communication technology to provide wired or nothing Line network connection, such as: second too network technology, adopting wireless fidelity technology, global system for mobile communications (Global System for Mobile communications, GSM) technology, Universal Packet Wireless Service (General Packet Radio Service, GPRS) technology, global enhanced data transmit (Enhanced Data rates for Global Evolution, EDGE) skill Art, wide band code division multiplexing access (Wideband Code Division Multiple Access, WCDMA) technology, demal are more It is more that work accesses -2000 (Code Division Multiple Access 2000, CDMA-2000) technologies, Time Division Synchronous CDMA Work access (Time Division-Synchronous Code Division Multiple Access, TD-SCDMA) technology, Global intercommunication microwave access (Worldwide Interoperability for Microwave Access, WiMAX) technology, Long term evolution (Long Term Evolution, LTE) technology or timesharing long term evolution (Time-Division LTE, TD- LTE) technology etc..
In an embodiment, network transport interface 11 may include second too network interface card to provide the connection function of cable network Energy.In another embodiment, network transport interface 11 may include wireless transceiver, and specifically, wireless transceiver may include fundamental frequency (baseband) device, radio frequency (Radio Frequency, RF) device and antenna, wherein fundamental frequency device is to execute base Audio signalprocessing, including Analog-digital Converter (analog to digital conversion, ADC)/digital-to-analogue conversion (digital to analog conversion, DAC), gain (gain) adjustment, modulation and solution modulation and coding/decoding Deng;Radio-frequency unit is converted to fundamental frequency signal to receive rf wireless signal, and by rf wireless signal to transfer to fundamental frequency device It is further processed, or receives fundamental frequency signal from fundamental frequency device, and fundamental frequency signal is converted into rf wireless signal to pass through antenna It is transmitted.For example, radio-frequency unit may include frequency mixer (mixer) so that fundamental frequency signal to be multiplied by used in wireless technology Concussion carrier wave in radio frequency, wherein the radio frequency can be long evolving system/long term evolution consolidation system/timesharing long term evolution system 2.4 gigahertz (GHZ)s used in used 900 megahertzs, 2100 megahertzs or 2.6 gigahertz (GHZ)s (GHz) or adopting wireless fidelity technology of uniting or 5 Jis Conspicuous or other frequency ranges, end is depending on used wireless technology.
Master controller 12 can be general processor, central processing unit (Central Processing Unit, CPU), micro- place Manage device (Micro Control Unit, MCU), application processor (Application Processor, AP) or digital signal Processor (Digital Signal Processor, DSP) etc., may include various circuit logic, to provide data processing And the running of the function, control network transport interface 11 of operation is to provide network connection, number is read or stored from storage device 13 Accordingly and/or procedure code and provide to the function of the routing of package, transfer and/or flow control.In addition, master controller The running of 12 also controllable network subsystems 14 is to accelerate the processing to package (to imply that the processing task unloading to package (offload) network subsystem 14 is arrived).
In particular, master controller 12 is to coordinated control network coffret 11, storage device 13 and network subsystem 14 running, to execute the flow control methods of the application.In an embodiment, master controller 12 can also be read from storage device 13 Procedure code is to execute operating system and one or more application programs, and wherein operating system may include various resident program (daemon), such as: network flow management (Next Traffic Management, NTM) resident program.
Storage device 13 is the computer readable memory medium of non-transient (non-transitory), to store from solution Data needed for analysing the obtained agreement layer parameter of package, flow control (such as: speed-limiting messages) and it is computer-readable Instruction or procedure code, comprising: application program, operating system and/or communications protocol (such as: open system interconnection (OSI) refers to mould 7 agreements are layered each in type (Open System Interconnection Reference Model, hereinafter referred to as OSI) Kind agreement) procedure code.
In an embodiment, storage device 13 can be double data rate synchronous dynamic random-access memory body (Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM), with Double Date Rate Characteristic, that is to say, that data transmission bauds is twice of system clock, therefore is deposited at random in transmission efficiency better than traditional Take memory body.In another embodiment, storage device 13 can for quick flashing (flash) memory body, cache (cache) memory body or its Any combination of the memory body of his type or other storage media (such as: hard disk, CD).
Network subsystem 14 is referred to alternatively as hardware acceleration engine again, to substitute master controller 12 provide package routing, The function of transfer and/or flow control.Network subsystem 14 includes submaster controller 14-1 and storage device 14-2, wherein Submaster controller 14-1 can be microprocessor, application processor or digital signal processor etc., may include various circuit logic, To provide data processing and operation function, control network transport interface 11 running with provide network connection, from storage fill It sets 14-2 reading or storing data and/or procedure code and executes master controller 12 and unload the package processing task (packet to come It includes: routing, transfer and/or flow control to package).
Those skilled in the art are when it is understood that the circuit logic in master controller 12 and submaster controller 14-1 usually may include Multiple transistors provide required function and operation to control the running of the circuit logic.Further, transistor Specific structure and its between connection relationship be usually determined by compiler, such as: buffer transfer language (Register Transfer Language, RTL) compiler can be operated by processor, will similar compositional language code command file (script) it is compiled into form needed for being suitable for designing or manufacturing the circuit logic.
Storage device 14-2 is non-transient computer-readable storage medium, to store routing, transfer and/or stream The instruction of data (such as: speed-limiting messages) needed for amount control and storage readable in computer or procedure code, comprising: communication association The procedure code of fixed (such as: some or all of 7 agreement layerings in the OSI network architecture).
In an embodiment, storage device 14-2 can for close-coupled memory body (Tightly-Coupled Memory, TCM), the characteristic that zero access and low power consumption are possessed compared to conventional memory body structure, is typically coupled to submaster controller 14-1 Kernel, provide the function of data quick to improve the efficiency of submaster controller 14-1.In another embodiment, storage device 14-2 can For flash memory, cache memory or other kinds of memory body.
When it will be appreciated that element shown in Fig. 2 only to provide the example of an explanation, not to limit the guarantor of the application Protect range.For example, router 10 can also further comprise: display screen is (such as: liquid crystal display (Liquid Crystal Display, LCD), light emitting diode indicator (Liquid Crystal Display, LCD) or electric paper display (Electronic Paper Display, EPD) etc.) and/or input/output unit is (such as: one or more buttons, keyboard, mouse Mark, Contact plate, video lens, microphone or loudspeaker) etc..
Fig. 3 shows the schematic diagram of the OSI network architecture.The OSI network architecture can be divided into 7 layerings, and every layer respectively can be to package Different disposal is carried out to reach specific function or demand.In the transmission process of package, in order to enable data smoothly in network Data must could be sent to correct destination by the encapsulation of layer upon layer by upper transmission, each package.
It goes out assuming that an application program needs to transmit data, then transmission end can be at transport layer (Transport layer) It is middle be added some transfer protocols (such as: transmission control agreement (Transmission Control Protocol, TCP), user Data element is reached an agreement on (User Datagram Protocol, UDP) or network-control message agreement (Internet Control Message Protocol, ICMP)) information at gauge outfit (header), answered with ensuring that package can be sent to purpose appropriate Use program.
Then, in the treatment process of network layer (Network layer), the network convention address of source terminal can be added The information of the network convention address of (Internet Protocol, IP) and destination, to ensure that package can be sent to correctly Purpose.
Then, the medium plan of source terminal and destination can be added in datalink layer connection (Data Link layer) Address (Media Access Control, MAC), in this layer of correct source for indicating package and destination device.Medium access Control address is a unique identification symbol, and in simple terms, each MAC addresses correspond on network only The one of one throws the net card, if a device has multiple network interface cards, the Ka Douhui that often throws the net has a different medium plan Address.
Finally, package to be converted into the transmission of physical network (such as: second too net) by physical layer (Physical layer) Format, to ensure that data can be transmitted in various physical medias.
Fig. 4 shows that package shows in transmission and the parsing operation of received 7 agreement layer of the OSI network architecture related in the process It is intended to.When router receives external package, it is necessary to which parsing in layer just can know that the information of this package, and needle To flow control, if it is to be understood that this package is which MAC addresses to be just at least resolved to the 2nd from present The header of layer, if it is to be understood that this package is which network convention address to be just at least resolved to the 3rd layer of mark from present Head.MAC addresses or network convention address of the router by parsing acquirement can differentiate that this current package is Which place sends from which device or network.
In addition, router can be parsed out application program in the treatment process of application layer (Application layer) Identification code (such as: Facebook, Youtube, BBS), to learn this current package is which application program carried for multiplying Data.
The flow chart of Fig. 5 flow control methods according to one embodiment of the application.In this embodiment, flow control side Method be suitable for dual controller framework router, such as: router 10, and optionally by master controller or submaster controller Lai It is responsible for executing the task of package processing.
Firstly, router receive association to the first package of a connection and connect above-mentioned first package one or more the Two packages (step S510) then parse above-mentioned first package by master controller to obtain at least the one of above-mentioned connection agreement layer ginseng Number (step S520).
In an embodiment, above-mentioned agreement layer parameter can be master controller when being resolved to the 2nd layer of the OSI network architecture, The MAC addresses of acquired source terminal and destination.
In another embodiment, above-mentioned agreement layer parameter can be master controller and be resolved to the 3rd layer of the OSI network architecture When, the network convention address of acquired source terminal and destination.
In another embodiment, above-mentioned agreement layer parameter can be master controller and be resolved to the 7th layer of the OSI network architecture When, acquired application program identification code.
Then, the uplink speed-limiting messages and once of above-mentioned connection are determined according to above-mentioned agreement layer parameter by master controller Row speed-limiting messages (step S530).Above-mentioned uplink speed-limiting messages are to indicate that a uplink bandwidth limits, above-mentioned downlink speed-limiting messages To indicate downlink frequency tolerance system.
In an embodiment, uplink speed-limiting messages can a upstream service quality identification code institute according to corresponding to agreement layer parameter It determines, downlink speed-limiting messages can be determined according to a downlink service quality identification code corresponding to layer parameter of reaching an agreement on.For example, Service quality identification code QoS_ID (5) represents uplink bandwidth and is limited to 5MB per second (Megabyte, megabit tuple), and services Quality Identification code QoS_ID (10) represent downlink frequency tolerance be made as 10MB per second.
Later, by submaster controller according to above-mentioned uplink speed-limiting messages and above-mentioned downlink speed-limiting messages to above-mentioned second package Implement flow control (step S540), process terminates.
In one or more embodiments, " connection " can refer to that two devices pass through the shape of network exchange information State.Network can refer to various means of communications or communication standard herein.When two devices (such as: user's device 32 and network Communication device 22) exchange information when, represent connection and have been established or establishing, and the exchange of information can be by one by one Package carries out.In some embodiments, above-mentioned " connection " may also mean that local end device (such as: user's device 32) A certain network service that the server device of some application program (such as: browser) and outer net that are run provides (such as: Community website) between information exchange, and the exchange of this information is carried out by package.One or more embodiments of the application It is to provide a kind of network subsystem using in router for certain types of " connection " progress flow control, and can also Package transmission speed is accelerated to reduce the technology of the load of master controller 12 again.
The operation chart of Fig. 6 flow control according to one embodiment of the application.In this embodiment, it is related to flow control The system architecture of system operation includes: network subsystem module 610, network subsystem driving (driver) module 620 and network Stack module 630, wherein each module can be the software module of procedure code institute construction, (such as: master controller 12 or pair by controller Controller 14-1) it is loaded into and executes with the flow control methods of realization the application in flow control operation.Particularly, network Subsystem drive module 620 and network stack module 630 as performed by master controller 12, and network subsystem module 610 by Performed by submaster controller 14-1.
In addition, from the point of view of with the execution face of operating system, network subsystem module 610, network subsystem driving 620 and Network stack module 630 is located at the core space (kernel space) of operating system.
Network subsystem module 610 further includes network subsystem database 611, is executing stream to store network subsystem Required speed-limiting messages when amount control.In an embodiment, network subsystem database 611 is storable in storage device 14-2.
Network subsystem drive module 620 further include strengthen connection management (Enhanced Connection Manager, ECM) module 621 are accelerated the processing to package by network subsystem module 610 to determine whether to, after making the connection Continuous package can directly be handled by network subsystem module 610, and the purpose of also achievable flow control.
Network stack module 630 further includes that traffic classification (Traffic Classifier, TC) module 631 and connection are recorded Record (Connection Track, CT) database 632.Traffic classification module 631 is to judge the type of package and determine package Whether speed limit is needed.Connection record database 632 is to store speed-limiting messages.In an embodiment, connection record database 632 can It is stored in storage device 13.
As shown in fig. 6, the 1st package of a connection can be sub from network according to standard routes (path indicated with fine line) System module 610 up enter network subsystem drive module 620, be then delivered to network stack module 630, at this to package into The parsing layer by layer of the row OSI network architecture, and parsing the agreement layer parameter obtained can be stored in connection record database 632 (step 6a).
In an embodiment, when layer parameter of reaching an agreement on can be the 2nd layer for being resolved to the OSI network architecture, acquired source terminal With the MAC addresses of destination.
In another embodiment, when layer parameter of reaching an agreement on can be the 3rd layer for being resolved to the OSI network architecture, acquired source The network convention address at end and destination.
Then, traffic classification module 631 can be sentenced according to agreement layer parameter and the traffic control rule of user's setting Whether this connection of breaking needs speed limit, if so, will traffic control rule write-in connection record data corresponding to agreement layer parameter Library 632 (step 6b).
In an embodiment, uplink and downstream service quality identification code can be used to record and indicate traffic control rule. For example, the package that user can preset particular network agreement to be directed to address carries out speed limit, including source terminal Network convention address corresponding to speed-limiting messages and destination network convention address corresponding to speed-limiting messages, it is as follows Shown in table 1.
IP QoS_ID Bandwidth limitation
Downlink Source terminal: IP (A) 5 5MB/s
Uplink Destination: IP (B) 10 10MB/s
Table 1.
Alternatively, the package that user can preset specific medium access control to be directed to address carries out speed limit, wherein wrapping Corresponding to the MAC addresses for including speed-limiting messages corresponding to the MAC addresses of source terminal and destination Speed-limiting messages, shown in following table 2.
MAC QoS_ID Bandwidth limitation
Downlink Source terminal: MAC (X) 15 15MB/s
Uplink Destination: MAC (Y) Default Router maximum transmission rate
Table 2.
Then, package is sent to network subsystem driving mould after the completion of the encapsulation of the gauge outfit of package by network stack module 630 Block 620 inquires the envelope to connection record database 632 according to the agreement layer parameter of the package from reinforcing connection management module 621 The traffic control rule (step 6c) of packet, for example, strengthening connection management module 621 can be according to the source in agreement layer parameter End is inquired to obtain corresponding uplink and downlink speed-limiting messages with the network convention address of destination or MAC addresses. Then agreement layer parameter and speed-limiting messages are stored to network subsystem database 611 (step 6d).
Later, the operation that network subsystem module 610 routes package and transfer according to general procedure, and according to Agreement layer parameter and traffic control rule in network subsystem database 611 directly carry out flow to the subsequent package of the connection Control (path indicated with heavy line), without package to be up sent to network subsystem drive module 620 and network heap Folded module 630 goes to handle.
In order to facilitate understanding, further illustrated with system architecture shown in fig. 6.Assuming that user will be directed to oneself The network convention address 192.168.1.10 of device sets speed limit, and the speed limit of upload is 1MB/s, the speed limit of downloading is 2MB/s, These speed-limiting messages can be noted down in traffic classification module 631.When there is a package to enter traffic classification module 631, this can be parsed Package judges the envelope according to the network convention address of source terminal and destination in agreement layer parameter to obtain agreement layer parameter Whether packet needs speed limit.If the network convention address of source terminal is consistent with the network convention address of oneself device, this can be set The speed limit that connection uploads is 1MB/s, and the speed limit of downloading is 2MB/s, and this speed-limiting messages is stored to connection and notes down database 632.Then, strengthen connection management module 621 access connection record database 632, according to agreement layer parameter in source terminal with The network convention address of destination or MAC addresses are inquired to obtain corresponding uplink and downlink speed-limiting messages, then In speed-limiting messages write-in network subsystem database 611, make the subsequent package of the connection can be straight by network subsystem module 610 Connect processing, and the purpose of also achievable flow control.
The operation chart of Fig. 7 flow control according to another embodiment of the application.In this embodiment, it is related to flow The system architecture of control operation includes: network subsystem module 710, network subsystem drive module 720, network stack module 730 and resident program module 740, wherein each module can be the software module of procedure code institute construction, (such as: main by controller Controller 12 or submaster controller 14-1) it is loaded into and executes with the flow control methods of realization the application in flow control operation. Particularly, network subsystem drive module 720, network stack module 730 and resident program module 740 are by master controller Performed by 12, and network subsystem module 710 is as performed by submaster controller 14-1.
In addition, from the point of view of with the execution face of operating system, network subsystem module 710, network subsystem driving 720 and Network stack module 730 is located at the core space of operating system, and the user that resident program module 740 is located at operating system is empty Between (user space).
Network subsystem module 710 further includes network subsystem database 711, is executing stream to store network subsystem Required speed-limiting messages when amount control.In an embodiment, network subsystem database 711 is storable in storage device 14-2.
Network subsystem drive module 720 further includes strengthening connection management module 721, to determine whether to by network System module 710 accelerates the processing to package, makes the subsequent package of the connection can be direct by network subsystem module 710 Reason, and the purpose of also achievable flow control.
Network stack module 730 further includes connection record database 731, to store speed-limiting messages.In an embodiment, even It connects record database 731 and is storable in storage device 13.
The 7th layer of the parsing that there is resident program module 740 ability to carry out the OSI network architecture, to recognize different application journey The package of sequence.Particularly, resident program module 740 further includes the open function library 741 nDPI and the open function library 742 TC. The open function library 741 nDPI is one open and extendible go deep into preamble detection (Deep packet inspection, DPI) letter Formula library, it is main that the function of filtering packets is provided, check package whether meet specification agreement or whether be virus, spam, Or invasion, or package is checked for collection of statistical data;And the open function library 742 TC is flow control (Traffic Control, TC) function library, the main packet scheduling device that sets is with every flow control operation, comprising: package priorization processing, stream Buret system (traffic shaping), bandwidth limitation and service quality control etc..
As shown in fig. 7, one connection top n (1≤N) package can according to standard routes (with fine line indicate path) from Network subsystem module 710 up enters network subsystem drive module 720, is then delivered to network stack module 730, right at this Package carries out the parsing layer by layer of the OSI network architecture, to obtain agreement layer parameter, such as: the network convention of source terminal and destination Address and source terminal and the port message of destination breath etc., and connection discipline can be stored in by parsing the agreement layer parameter obtained It records in database 731 (step 7a).
Then, package can be sent to resident program module 740, and be utilized by network flow management resident program therein Layer parameter is applied to obtain in agreement layer in the open function library 741 nDPI, comprising: application program identification code and regular label, so It is open function library 742 (step 7b) that application program identification code and regular label are passed into TC afterwards;When the open function library 742 TC is received To regular label its value be false (false), then it represents that the open function library 741 nDPI needs more packages that can just parse application Layer parameter;If its value of regular label is true (true), then it represents that parsed using layer parameter, and can start by network Subsystem module 710 accelerates processing package.In the case where the value of regular label is genuine situation, the open function library 742 TC can be according to answering Judge whether this connection needs speed limit with the traffic control rule that program identification code and user set, is answered if so, finding out Then the traffic control rule corresponding to program identification code is sent in the gauge outfit encapsulation process of package to network stack module 730 When, by traffic control rule corresponding to application program identification code and regular label write-in connection record 731 (step of database 7c)。
In an embodiment, uplink and downstream service quality identification code can be used to record and indicate traffic control rule. For example, user can preset application-specific to be directed to (such as: package Facebook) carries out speed limit, wherein Transmission and reception speed-limiting messages including the application program, shown in following table 3.
APP_ID QoS_ID Bandwidth limitation
Downlink (Rx) 1 4 4MB/s
Uplink (Tx) 1 3 3MB/s
Table 3.
In another embodiment, network flow management resident program be can be used in addition to the open function library 741 nDPI and TC are opened Other DPI engines except function library 742 are put to obtain in agreement layer and apply layer parameter.Such as: DPI engine can for example but not Be limited to some business program (such as PACE and NBAR) or open function library (such as open DPI, L7-filter, Libprotoident) etc..
Then, package is sent to network subsystem driving mould after the completion of the encapsulation of the gauge outfit of package by network stack module 730 Block 720 is inquired the flow of the package from reinforcing connection management module 721 according to application layer parameter to connection record database 731 Control regular (step 7d), for example, strengthening connection management module 721 can identify according to the application program in application layer parameter Code inquiry obtains corresponding uplink and downlink speed-limiting messages.It then will be using layer parameter, speed-limiting messages and regular label storage To network subsystem database 711 (step 7e).
Later, whether the value of 710 judgment rule label of network subsystem module is very, if so, according to general procedure pair The operation that package is routed and transferred, and layer parameter and flow control are applied according in network subsystem database 711 Rule directly carries out flow control (path indicated with heavy line) to the subsequent package of the connection, without up sending package It goes to handle to network subsystem drive module 720, network stack module 730 and resident program module 740., whereas if rule Then the value of label is false, then the operation for subsequent package not being routed and being transferred, subsequent package is still to walk top n shown in Fig. 7 The path of package.
In an embodiment, the value of N package number required when mainly regarding the open parsing of function library 741 of nDPI using layer parameter comes It determines, for example, N can be preset as 10, therefore, if can not judge the connection is which kind of application be associated in 10 packages Program, it is to be associated with unknown application program which, which will be determined,.For the connection for being associated with unknown application program, also Flow control operation process described in applicable 7th figure, for example, the exclusive application of unknown application setting can be directed to Program identification code and corresponding speed-limiting messages.
In order to facilitate understanding, further illustrated with system architecture shown in Fig. 7.Assuming that user will be directed to oneself The network convention address 192.168.1.10 of device and a certain community software application set speed limit, and the speed limit of upload is 1MB/s, the speed limit of downloading are 2MB/s, these speed-limiting messages, which can be noted down, notes down database 731 in connection.When a package enters The open function library 741 nDPI, the open function library 741 nDPI can attempt to parse the application layer parameter of above-mentioned package, however, such as Fruit, which also needs more packages just, can parse using layer parameter, then the value of regular label can be set as vacation by opening function library 741, and And regular label is sent to the open function library 742 TC, TC, which is deposited regular label to connection at open function library 742, notes down database 731.Then, reinforcing connection management module 721 access connection record database 731 will not be write if the value of regular label is vacation Entering in network subsystem database 711, subsequent package can still walk original path and handle to the open function library 741 nDPI, once It parses using layer parameter, the open function library 741 nDPI can be set as the value of regular label very, and regular label and application Layer parameter sends TC to and opens function library 742, and then the open function library 742 TC is divided according to application layer parameter and agreement layer parameter This connection is analysed, if to be that 192.168.1.10 and application program identification code are designated as above-mentioned for the source terminal network convention address of the connection Community software, then can determine this connection upload speed limit be 1MB/s, downloading speed limiting 2MB/s, and by speed-limiting messages and rule Label stores together to connection and notes down database 731.Then, strengthen the access connection record database of connection management module 721 731, it inquires to obtain according to the network convention address of source terminal and destination in agreement layer parameter or MAC addresses Corresponding uplink and downlink speed-limiting messages make the subsequent envelope of the connection in speed-limiting messages write-in network subsystem database 711 Packet can directly be handled by network subsystem module 710, and the purpose of also achievable flow control.
According to the embodiment of earlier figures 6~7, when it will be appreciated that the flow control methods of the application can be according to single The package in direction just obtains two-way speed-limiting messages, and two-way limit can just be got all the ready by having received without waiting for two-way package Fast information.Therefore, the task (including: flow control) that can execute package processing by submaster controller as early as possible, can not only reduce master The burden of controller, moreover it is possible to promote the transmission efficiency of router.
In comparison, the integrated scheme of other network stack modules and network subsystem on the market, in network stack mould Block is on the basis of network subsystem is then to connect, therefore, will inevitably to cause to have in integration on the basis of package It is entered and left.And in this application, single package can be passed through in network stack module, connect information needed with regard to obtaining, existed side by side Transfer to network subsystem to accelerate subsequent package to handle, it is evident that the flow control methods of the application are in execution efficiency And degree of integration etc. is better than the integrated scheme of existing network stack module and network subsystem.
The words such as " first ", " second " used in application claim be for modifying the element in claim, There is priority order between being not used to indicate, precedence relation or an element are prior to another element, or hold Chronological order when row method and step is only used to distinguish the element with same name.
Certainly, the application can also have other various embodiments, ripe without departing substantially from the application spirit and its essence Various corresponding changes and modifications, but these corresponding changes and change ought can be made according to the application by knowing those skilled in the art Shape all should belong to the protection scope of the application the attached claims.

Claims (10)

1.一种路由器,其特征在于,包括:1. A router, characterized in that, comprising: 接收关联至一连接的第一封包以及接续上述第一封包的一或多个第二封包的网络传输接口;a network transport interface for receiving a first packet associated with a connection and one or more second packets following the first packet; 解析上述第一封包以取得上述连接的至少一协定层参数的第一控制器,且上述第一控制器根据上述协定层参数决定上述连接的上行限速信息以及下行限速信息;以及a first controller that parses the first packet to obtain at least one protocol layer parameter of the connection, and the first controller determines the uplink speed limit information and the downlink speed limit information of the connection according to the protocol layer parameter; and 根据上述上行限速信息以及上述下行限速信息对上述第二封包实施流量控制的第二控制器。A second controller that performs flow control on the second packet according to the uplink rate limit information and the downlink rate limit information. 2.根据权利要求1所述的路由器,其特征在于,上述上行限速信息根据上述协定层参数所对应的上行服务质量识别码所决定,上述下行限速信息根据上述协定层参数所对应的下行服务质量识别码所决定。2 . The router according to claim 1 , wherein the uplink speed limit information is determined according to an uplink quality of service identifier corresponding to the protocol layer parameter, and the downlink speed limit information is determined according to the downlink speed limit corresponding to the protocol layer parameter. 3 . Determined by the quality of service identifier. 3.根据权利要求1所述的路由器,其特征在于,上述协定层参数关联至OSI网络架构的第3层,且包括来源端的网络协定地址与目的端的网络协定地址。3 . The router of claim 1 , wherein the protocol layer parameters are associated with layer 3 of the OSI network architecture, and include the network protocol address of the source end and the network protocol address of the destination end. 4 . 4.根据权利要求1所述的路由器,其特征在于,上述协定层参数关联至OSI网络架构的第2层,且包括来源端的媒体存取控制地址与目的端的媒体存取控制地址。4 . The router of claim 1 , wherein the protocol layer parameters are associated with layer 2 of the OSI network architecture, and include a source media access control address and a destination media access control address. 5 . 5.根据权利要求1所述的路由器,其特征在于,上述协定层参数关联至OSI网络架构的第7层,且包括应用程序识别码。5 . The router of claim 1 , wherein the protocol layer parameters are associated with layer 7 of the OSI network architecture and include an application identifier. 6 . 6.一种流量控制方法,适用于包括第一控制器与第二控制器的路由器,其特征在于,包括:6. A flow control method, applicable to a router comprising a first controller and a second controller, comprising: 接收关联至一连接的第一封包以及接续上述第一封包的一或多个第二封包;receiving a first packet associated with a connection and one or more second packets following the first packet; 由上述第一控制器解析上述第一封包以取得上述连接的至少一协定层参数;Parsing the first packet by the first controller to obtain at least one protocol layer parameter of the connection; 由上述第一控制器根据上述协定层参数决定上述连接的上行限速信息以及下行限速信息;以及The first controller determines the uplink speed limit information and the downlink speed limit information of the connection according to the protocol layer parameters; and 由上述第二控制器根据上述上行限速信息以及上述下行限速信息对上述第二封包实施流量控制。The second controller performs flow control on the second packet according to the uplink speed limit information and the downlink speed limit information. 7.根据权利要求6所述的流量控制方法,其特征在于,上述上行限速信息根据上述协定层参数所对应的上行服务质量识别码所决定,上述下行限速信息根据上述协定层参数所对应的下行服务质量识别码所决定。7 . The flow control method according to claim 6 , wherein the uplink speed limit information is determined according to an uplink quality of service identifier corresponding to the protocol layer parameter, and the downlink speed limit information is determined according to the protocol layer parameter. 8 . determined by the downlink quality of service identifier. 8.根据权利要求6所述的流量控制方法,其特征在于,上述传输层参数关联至OSI网络架构的第3层,且包括来源端的网络协定地址与目的端的网络协定地址。8 . The flow control method according to claim 6 , wherein the transport layer parameters are associated with the third layer of the OSI network architecture, and include the network protocol address of the source end and the network protocol address of the destination end. 9 . 9.根据权利要求6所述的流量控制方法,其特征在于,上述协定层参数关联至OSI网络架构的第2层,且包括来源端的媒体存取控制地址与目的端的媒体存取控制地址。9 . The flow control method of claim 6 , wherein the protocol layer parameters are associated with layer 2 of the OSI network architecture, and include a source MAC address and a destination MAC address. 10 . 10.根据权利要求6所述的流量控制方法,其特征在于,上述协定层参数关联至OSI网络架构的第7层,且包括应用程序识别码。10 . The flow control method of claim 6 , wherein the protocol layer parameters are associated with layer 7 of the OSI network architecture, and include an application identifier. 11 .
CN201710569471.8A 2017-07-13 2017-07-13 router and flow control method Withdrawn CN109257290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710569471.8A CN109257290A (en) 2017-07-13 2017-07-13 router and flow control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710569471.8A CN109257290A (en) 2017-07-13 2017-07-13 router and flow control method

Publications (1)

Publication Number Publication Date
CN109257290A true CN109257290A (en) 2019-01-22

Family

ID=65050945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710569471.8A Withdrawn CN109257290A (en) 2017-07-13 2017-07-13 router and flow control method

Country Status (1)

Country Link
CN (1) CN109257290A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026585A (en) * 2006-07-27 2007-08-29 威盛电子股份有限公司 Method for managing bandwidth allocation of network devices
US7426181B1 (en) * 2004-03-26 2008-09-16 Packeteer, Inc. Slow-start adaptive mechanisms to improve efficiency of bandwidth allocation
CN101510842A (en) * 2002-06-10 2009-08-19 美商智慧财产权授权股份有限公司 Applying session services based on packet flows

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510842A (en) * 2002-06-10 2009-08-19 美商智慧财产权授权股份有限公司 Applying session services based on packet flows
US7426181B1 (en) * 2004-03-26 2008-09-16 Packeteer, Inc. Slow-start adaptive mechanisms to improve efficiency of bandwidth allocation
CN101026585A (en) * 2006-07-27 2007-08-29 威盛电子股份有限公司 Method for managing bandwidth allocation of network devices

Similar Documents

Publication Publication Date Title
CN103125141B (en) The polymerization of mobile broadband network interface
EP2941043A1 (en) Method, device, and system for multi-standard network convergence
CN103188042A (en) Matching method and matching accelerator of Internet protocol (IP) data package
EP2876972B1 (en) Air interface transmission method and relevant device and system
CN110099138A (en) A kind of method and system handling the DHCP data with VLAN TAG
US11706137B2 (en) Routers and methods for traffic management
WO2022057827A1 (en) Aggregation configuration method and apparatus, and terminal
CN113965918B (en) Service processing method, device and storage medium
US20180367453A1 (en) Routers and hybrid packet processing methods thereof
WO2018045521A1 (en) Method and device for transmitting signaling in wireless network
WO2025123775A1 (en) Data transmission method and device for digital optical fiber repeater, and electronic device
WO2025044082A1 (en) Data transmission method, device, and storage medium
CN109257290A (en) router and flow control method
CN115175242A (en) Communication method, network equipment and computer readable storage medium
CN101489259B (en) Data service handling method, system and access network
CN115842781B (en) Rule matching method and device and terminal equipment
CN108322390B (en) Router and traffic management method
CN114301831B (en) A service transmission method, device and storage medium
US11363561B2 (en) Method and apparatus for reporting information by terminal, and computer storage medium
CN118140465A (en) A communication method, device, network element, communication equipment and computer storage medium
US8681799B2 (en) Method for operating a communication device and communication device therefor
CN102972079A (en) Processing method and base station for transmitting voice over internet protocol based service data packet
TWI823362B (en) A communication method and device,storage medium and chip system
WO2020062240A1 (en) Information transmission method and apparatus, and communication device
EP4568380A1 (en) Method and apparatus for determining priority of logic channel, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190122

WW01 Invention patent application withdrawn after publication