CN1482774A - Method for classifying data stream by using the fouth level port number mask - Google Patents
Method for classifying data stream by using the fouth level port number mask Download PDFInfo
- Publication number
- CN1482774A CN1482774A CNA021423113A CN02142311A CN1482774A CN 1482774 A CN1482774 A CN 1482774A CN A021423113 A CNA021423113 A CN A021423113A CN 02142311 A CN02142311 A CN 02142311A CN 1482774 A CN1482774 A CN 1482774A
- Authority
- CN
- China
- Prior art keywords
- value
- port numbers
- layers
- mask
- port number
- 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.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the field of communication which comprises, presetting a port number mask value an and a port number value B, performing AND operation using the port number mask value A with the port number value B, obtaining a compassion value C, using the layer 4 port number value in the data message D need to by categorized to perform AND operation with the preset port number mask value A, obtaining an intermediate procedure value E, if E equals C, then classify the data message D into the category of meeting conditions, otherwise classify the data message D into the category of not meeting conditions. The invention realizes simple operation and balanced loading.
Description
Technical field
The invention belongs to data communication technology field, particularly the method that data stream is classified.
Background technology
The one group of data message of certain point of will flowing through in the data communication network reduces a data flow.And what rule to determine that this class data message is a specific data stream according to, that class data message is the specific data flow of another one, will use the notion of traffic classification.In data communication field, often need classify, so that support for other application provide (as: data filter, service quality, tactful route etc.) to data stream.
Existing method for classifying data stream mainly is to carry out according to own some contained information in the data message.As using 2 layers (data link layers), 3 layers (network layer), 4 layers of (transport layer) information separately or comprehensively.If the port number information that 4 layers of information spinner that use are 4 layers, and carry out in the implementation of traffic classification several mode classifications below main the use according to 4 layers of port number information existing:
1 equates with the designated ends slogan: for example setting TCP (transmission control protocol, Transfer ControlProtocol) source port number, to equal 56 data flow be a class, and other data flow is a class.
2, greater than the designated ends slogan: for example setting tcp source port number is a class greater than 56 data flow, and other data flow is a class.
3, less than the designated ends slogan: for example setting tcp source port number is a class less than 56 data flow, and other data flow is a class.
4, between two port numbers of appointment: for example set tcp source port number greater than 56, and be a class less than 80 data flow, other data flow is a class.
5 and the designated ends slogan unequal: for example setting tcp source port, number to be not equal to 56 data flow be a class, and other data flow is a class.
Existing these 5 kinds of methods all are to classify according to the numerical value of port numbers, and the also this point following problems that can bring some to use just:
Fig. 1 is the service system schematic diagram that needs carry out traffic classification.Suppose that in Fig. 1 device A is responsible for the application data stream that enters this service system with various, be distributed to server A 1 and A2 handles, and require data volume that A1 and A2 handle about equally according to 4 layers destination slogans.According to above-mentioned existing 5 kinds of methods, it is very difficult doing like this.Because in current IP network, no matter be TCP or UDP (User Datagram Protoco (UDP), User Datagram Protocol) they each generally acknowledges that the port numbers of service all is defined as less than 1024, but and the reality range of distribution of port numbers is between 0 to 65535.The inequality of this port numbers is distributed, and makes actual data stream also can't on average occur according to the numerical values recited of port numbers.
Certainly the data flow that enters this service system is added up, find the method that to classify according to port numbers numerical value according to statistical analysis again, but make realization method complexity like this.
Summary of the invention
The objective of the invention is for overcoming the weak point of prior art, propose a kind ofly to use four layers port numbers mask value to carry out method to the data traffic classification, the user can be according to the information in 4 layers the port numbers, data stream is classified, it is simple to have method, can realize other advantages of application such as load balancing on this basis.
The port numbers mask that a kind of use of the proposition that the present invention proposes is four layers carries out the method to the data traffic classification, may further comprise the steps:
1) preestablishes four layers of port numbers mask value A and one four layers port numbers value B;
2) carry out and operation with port numbers value B with port numbers mask value A, draw a comparison value C;
3) with 4 layers of port numbers value among the data message D that need classify, carry out and operation, draw a pilot process value E with predefined port numbers mask value A;
4) if E and C are equal, then data message D are classified as a qualified class, otherwise it is classified as a not class of sign condition;
The said the 2nd) step and the 3rd) order in step can be exchanged.
The said port numbers value of the present invention B can adopt the value of 16 bits being represented by the form of 2 systems;
Said mask value A can form by get one or more bit value arbitrarily from the value of said 16 bits.
4 layers of port numbers value among the said data message D can adopt the value of 16 bits being represented by the form of 2 systems.
The principle of the method for the invention is described as follows:
The data of handling in data processing all are to represent with the form of 2 systems, and port numbers can be expressed as 2 bytes, i.e. the expression mode of 16 bits.Port numbers as the FTP among the TCP (file transfer protocol (FTP), File Transfer Protocol) service is 21, is expressed as 0000000000010101 (is 0x0015 with hexadecimal representation) with 2 systems.
Because each numeral in binary system have only 0 or 1 these two kinds may, so can suppose that it is (can certainly think port numbers 1 bit or other position bit 0 and 1 probability occurs and equate) arbitrarily that equates that 0 and 1 probability appears in significant bits (0 bit) in the port information of various data messages.So just can be port numbers 0 bit 1 the class that is divided into, port numbers 0 bit be 0 be divided into another kind ofly, therefore in the problem that solves Fig. 1, just can draw two class data volumes data flow about equally easily.This method is carried out traffic classification according to 4 layers of port numbers mask exactly.
Characteristics of the present invention:
1) the present invention proposes a kind of new 4 layers of port number information of utilizing and carry out the method for data flow classification, and make method of operation simpler when application such as solution load balancing, theory is more readily understood.
2) the present invention not only can classify according to the numerical value behind a certain bit mask, and can classify according to the numerical value behind certain several bit mask, and does not require that these several bits are continuous, but the selection operation when having enriched data flow classification.
Description of drawings
Fig. 1 is the service system schematic diagram that needs carry out data flow classification.
Fig. 2 is the FB(flow block) of the inventive method.
Embodiment
The proposition that the present invention proposes is a kind of to be used four layers port numbers mask to carry out method to the data traffic classification to reach embodiment in conjunction with the accompanying drawings and be described in detail as follows:
Method of the present invention may further comprise the steps as shown in Figure 2:
1) preestablishes four layers of port numbers mask value A and one four layers port numbers value B;
2) carry out and operation with port numbers value B with port numbers mask value A, draw a comparison value C;
3) with 4 layers of port numbers value among the data message D that need classify, carry out and operation, draw a pilot process value E with predefined port numbers mask value A;
4) if E and C are equal, then data message D are classified as a qualified class, otherwise it is classified as a not class of sign condition;
The above-mentioned the 2nd) step and the 3rd) order that goes on foot can be exchanged.
Embodiment 1, and implementation step is as follows:
1) sets port mask value A=0x0001 (hexadecimal), ports-settings value B=0x0000 (hexadecimal) earlier.
2) with A and B with draw comparison value C=0x0000 (hexadecimal).
3) have this moment a message D (the corresponding four layer port numbers of supposition among the D are hexadecimal 0x0017) need carry out traffic classification, with D (0x0017) and A (0x0001) with draw pilot process value E=0x0001 (hexadecimal).
4) because E (0x0001) is not equal to C (0x0000), so message D is classified as an ineligible class.
3 ') another one message F (the corresponding four layer port numbers of supposition among the F are hexadecimal 0x0038) need carry out traffic classification.With F (0x0038) and A (0x0001) with draw pilot process value E=0x0000.
4 ') because E (0x0000) equals C (0x0000), so message F can be classified as a qualified class.
Embodiment 2, implementation step are as follows:
1) preestablishes port mask value A=0x000D (hexadecimal then is 0000000000001101 with binary representation, and mask is discontinuous), ports-settings value B=0x000B (hexadecimal).
2) with A and B with draw comparison value C=0x0009 (hexadecimal).
3) there is this moment a message D (the corresponding four layers of port numbers among the supposition D are hexadecimal 0x0017) need carry out traffic classification.With D and A with draw pilot process value E=0x0005 (hexadecimal).
4) because E (0x0005) is not equal to C (0x0009), so message D is classified as an ineligible class.
3 ') another one message F (the corresponding four layer port numbers of supposition among the F are hexadecimal 0x001B) need carry out traffic classification, with 0x001B and A with draw pilot process value E=0x000B.
4 ') because E (0x000B) equals C (0x000B), so message F is classified as a qualified class.
Claims (4)
1, a kind ofly use four layers port numbers mask to carry out method, may further comprise the steps the data traffic classification:
1) preestablishes four layers of port numbers mask value A and one four layers port numbers value B;
2) carry out and operation with port numbers value B with port numbers mask value A, draw a comparison value C;
3) with 4 layers of port numbers value among the data message D that need classify, carry out and operation, draw a pilot process value E with predefined port numbers mask value A;
4) if E and C are equal, then data message D are classified as a qualified class, otherwise it is classified as a not class of sign condition;
The said the 2nd) step and the 3rd) order in step can be exchanged.
2, the port numbers mask of four layers of uses as claimed in claim 1 carries out the method to the data traffic classification, it is characterized in that said port value B can adopt 16 bit values being represented by the form of 2 systems.
3, the port numbers mask of four layers of uses as claimed in claim 2 carries out the method to the data traffic classification, it is characterized in that said mask value A can form by get one or more bit value arbitrarily from the value of said 16 bits.
4, the port numbers mask of four layers of uses as claimed in claim 1 carries out the method to the data traffic classification, it is characterized in that 4 layers of port numbers value among the said data message D can adopt the value of 16 bits being represented by the form of 2 systems.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB021423113A CN100373887C (en) | 2002-09-13 | 2002-09-13 | Method for classifying data stream by using the fouth level port number mask |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB021423113A CN100373887C (en) | 2002-09-13 | 2002-09-13 | Method for classifying data stream by using the fouth level port number mask |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1482774A true CN1482774A (en) | 2004-03-17 |
CN100373887C CN100373887C (en) | 2008-03-05 |
Family
ID=34147999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB021423113A Expired - Fee Related CN100373887C (en) | 2002-09-13 | 2002-09-13 | Method for classifying data stream by using the fouth level port number mask |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100373887C (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103780435A (en) * | 2014-02-18 | 2014-05-07 | 迈普通信技术股份有限公司 | Method and system for classifying data streams with port number masks |
CN101714948B (en) * | 2009-10-27 | 2016-03-30 | 清华大学 | A kind of sorting technique of net bag of multiple domain and device |
WO2019079969A1 (en) * | 2017-10-24 | 2019-05-02 | Interdigital Ce Patent Holdings | Cable modem interface mask based virtual local area network mapping |
CN110401602A (en) * | 2019-07-23 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of flow table of the network port determines method and apparatus |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1154980A (en) * | 1997-07-30 | 1999-02-26 | Seiwa Electric Mfg Co Ltd | Electromagnetic wave shielding gasket and its manufacture |
CA2326246C (en) * | 1999-12-23 | 2005-04-05 | Nortel Networks Limited | Methods and systems for internet protocol (ip) network surveillance |
CN1138384C (en) * | 2001-01-21 | 2004-02-11 | 普邦科技股份有限公司 | Inquiry device and method for network equipoment |
-
2002
- 2002-09-13 CN CNB021423113A patent/CN100373887C/en not_active Expired - Fee Related
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101714948B (en) * | 2009-10-27 | 2016-03-30 | 清华大学 | A kind of sorting technique of net bag of multiple domain and device |
CN103780435A (en) * | 2014-02-18 | 2014-05-07 | 迈普通信技术股份有限公司 | Method and system for classifying data streams with port number masks |
CN103780435B (en) * | 2014-02-18 | 2017-09-26 | 迈普通信技术股份有限公司 | The method and system classified using port numbers mask to data stream |
WO2019079969A1 (en) * | 2017-10-24 | 2019-05-02 | Interdigital Ce Patent Holdings | Cable modem interface mask based virtual local area network mapping |
CN111386681A (en) * | 2017-10-24 | 2020-07-07 | 交互数字Ce专利控股公司 | Virtual local area network mapping based on cable modem interface mask |
US11251984B2 (en) | 2017-10-24 | 2022-02-15 | Interdigital Ce Patent Holdings | Cable modem interface mask based virtual local area network mapping |
CN111386681B (en) * | 2017-10-24 | 2022-04-29 | 交互数字Ce专利控股公司 | Virtual local area network mapping based on cable modem interface mask |
CN110401602A (en) * | 2019-07-23 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of flow table of the network port determines method and apparatus |
CN110401602B (en) * | 2019-07-23 | 2022-07-12 | 苏州浪潮智能科技有限公司 | Flow table determining method and device for network port |
Also Published As
Publication number | Publication date |
---|---|
CN100373887C (en) | 2008-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1305274C (en) | Method and device for processing packet | |
CN1287570C (en) | High speed filtering and stream dividing method for keeping connection features | |
US7499419B2 (en) | Scalable IP-services enabled multicast forwarding with efficient resource utilization | |
CN1146192C (en) | Ethernet exchange chip output queue management and dispatching method and device | |
CN100561937C (en) | A kind of method and device of realizing network flow load sharing | |
CN1809021A (en) | Ethernet link converging method | |
CN1757220A (en) | Apparatus and method for detecting tiny fragment attacks | |
WO2021143911A1 (en) | Communication method and apparatus | |
CN100534052C (en) | Network message processing using inverse pattern matching | |
CN108462707A (en) | A kind of mobile application recognition methods based on deep learning sequence analysis | |
CN1777148A (en) | Routing table next-hop IP address to MAC address analytic method | |
CN113627502A (en) | Network encryption traffic classification method | |
CN1677982A (en) | Individually programmable most significant bits of virtual LAN ID | |
CN1669289A (en) | Parser for parsing data packet | |
CN1917667A (en) | System for processing numbers and processing method in service of sending grouped short message | |
CN1716867A (en) | Data flow statistic method and device | |
CN1302645C (en) | Method for realizing average flow bearing by bound ports of network processor system | |
CN103780435A (en) | Method and system for classifying data streams with port number masks | |
CN1482774A (en) | Method for classifying data stream by using the fouth level port number mask | |
CN101052011A (en) | MPLS label distribution method, system and device | |
CN1852241A (en) | Flow classification device and base station adopting same | |
CN1643874A (en) | Scheduling using quantum and deficit values | |
CN1265583C (en) | Business resource distribution method | |
CN1744725A (en) | Method for memorying data flow in single-board | |
CN1540936A (en) | Method for controlling priority for transmitting message based on virtual local area 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 | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080305 Termination date: 20150913 |
|
EXPY | Termination of patent right or utility model |