US20120147892A1 - Analysis of network packets using a generated hash code - Google Patents
Analysis of network packets using a generated hash code Download PDFInfo
- Publication number
- US20120147892A1 US20120147892A1 US13/325,597 US201113325597A US2012147892A1 US 20120147892 A1 US20120147892 A1 US 20120147892A1 US 201113325597 A US201113325597 A US 201113325597A US 2012147892 A1 US2012147892 A1 US 2012147892A1
- Authority
- US
- United States
- Prior art keywords
- bytes
- hash code
- packet
- network processor
- network
- 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.)
- Abandoned
Links
- 238000000034 method Methods 0.000 claims abstract description 12
- 230000000873 masking effect Effects 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 4
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 6
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 229910052710 silicon Inorganic materials 0.000 description 3
- 239000010703 silicon Substances 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Definitions
- This disclosure relates generally to analysis of network packets and, more specifically, to analysis of network packets using a generated hash code.
- a typical network packet includes a packet header that has a defined number of bytes. Analysis of a packet header has typically been required in order to assign a network packet to an appropriate packet flow (i.e., an appropriate receive or transmit queue). As analysis of an entire packet header may be time consuming, hash codes (which are usually short compared to entire packet headers) of packet headers have been utilized to reduce analysis time. Reducing the time required to identify a packet flow is even more desirable when multiple packet headers (i.e., a packet header of a lower layer network packet and a packet header of an upper layer network packet) have to be analyzed to identify a packet flow. In general, hash codes may have different lengths depending on processing requirements and, as such, flexibility in calculating hash functions is usually desirable. The usability of a hash code depends on the entropy of the generated hash code. In general, hash codes with higher entropy have higher information content and, as such, more accurately identify a packet flow of a network packet.
- hash functions have typically been defined by two parameters: the way in which the hash key is assembled; and the properties of the hash function.
- flexibility in hash key assembly may be better achieved in software implementations of hashers, while flexible hash functions usually involve some form of configurable hardware hasher implementation.
- configurable hardware hash functions have silicon area limitations due to the configuration logic implementing the base hashing elements, which are typically implemented with exclusive OR (XOR) gates. The limitations appear to be especially significant when a hasher is used for identifying packet flows on very high-speed interfaces (e.g., 10 Gbps or more), mainly due to very short packet periodicity (e.g., 67.2 ns or less).
- a technique for analyzing network packets includes receiving, by a network processor, a network packet having a packet header including address and control information. A set of bytes are extracted, using the network processor, from the packet header and a set of input bits for generating a hash code are derived, using the network processor, from the set of bytes. Finally, the hash code is generated using the input bits.
- FIG. 1 is a diagram of a relevant portion of an exemplary hasher of a network processor configured according to various aspects of the present disclosure.
- FIG. 2 is a diagram of content of an output register of a packet parser (which includes a set of bytes extracted from a network packet header) of the hasher of FIG. 1 .
- the present invention may be embodied as a method, system, device, or computer program product. Accordingly, the present invention may take the form of an embodiment including hardware, an embodiment including software (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a circuit, module, or system.
- the present invention may, for example, take the form of a computer program product on a computer-usable storage medium having computer-usable program code, e.g., in the form of one or more design files, embodied in the medium.
- the computer-usable or computer-readable storage medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, a portable compact disc read-only memory (CD-ROM), an optical storage device, or a magnetic storage device.
- the term “coupled” includes a direct electrical connection between elements or blocks and an indirect electrical connection between elements or blocks achieved using one or more intervening elements or blocks.
- a network processor for generating a hash code for analyzing network packets is configured to provide flexibility for the use of different length hash codes.
- the network processor is configured for rapid computation of a hash code and corresponding identification of packet flows.
- a packet header of a network packet includes address and control information that is received by a network processor. The network processor extracts a set of bytes from the packet header and derives (from the set of bytes) a set of input bits for generating a hash code.
- the network processor includes a packet parser and a hash code generator.
- the packet parser is configured to: receive a network packet having a packet header (including address and control information), extract a set of bytes from the packet header; and derive from the set of bytes a set of input bits for generating a hash code.
- the hash code generator is configured to generate a hash code using the input bits.
- the hash code generator implements a single hash generating function that generates the hash code based on the input bits extracted from the bytes. Accordingly, without modifying the hash generating function, a resulting hash code can be adapted by selecting different bytes from a packet header. This facilitates generating a hash code having a high entropy, as input bits from the selected bytes usually have a high entropy.
- the selection of bytes depends on the usage of a network processor within a network structure. For example, at a network destination, a destination address may be identical for certain network protocols. In this case, the destination address of the packet header does not usually provide useful information for determining the flow of the network packet, i.e., the entropy of the information is low. In contrast, in a network processor in an intermediate point of a network connection (e.g., a relay station), a source address and a destination address of a network packet are meaningful and can be used for hash code generation.
- An implementation in a network processor or a system for analyzing packets can be achieved by implementing a single hash code generator in silicon, so that only a relatively small silicon area is occupied for hash code generation. The flexibility in selecting the bytes can be easily implemented with relatively low computational effort, such that network packets can be adequately processed even when high data rates are required.
- extracting a set of bytes from the packet header includes extracting bytes from a packet header transported within a network packet. For example, when transmission control protocol (TCP) packets are transported in Internet protocol (IP) packets the packet headers of both packets are utilized to generate a hash code. In this manner, the bytes can be selected from a bigger set of bytes.
- a set of bytes extracted from a packet header may include one or more of: an Internet protocol (IP) source address; a transmission control protocol (TCP) source port; an multi-protocol label switching (MPLS) label; an IP destination address; a TCP destination port; a reserved area; and protocol information.
- IP Internet protocol
- TCP transmission control protocol
- MPLS multi-protocol label switching
- the extracted bytes identify the destination and the source of network packets and provide further header information (where the importance of each field depends on the kind of network device in which the network processor is used).
- IPv4 Internet Protocol version 4
- IPv6 Internet Protocol version 6
- extracting the IP source address and/or the IP destination address may include compressing the IP source address and/or the IP destination address. For example, when IP addresses are relatively long and the number of input bits of a hash code generating algorithm is relatively small, compression is desirable. Further details regarding compression of IPv6 addresses is available in U.S. patent application Ser. No. ______ (Attorney Docket No. FR920100059US1) entitled “COMPACTED BINARY IDENTIFIER GENERATION.”
- a set of input bits is derived from a set of bytes.
- the set of input bits are then used to generate a hash code.
- the bytes for forming the input bits are ordered from most meaningful to least meaningful.
- the entropy of the input bits decreases from one side of the input bits to the other. This facilitates classifying the bits derived from the bytes according to their importance so that properties of the hash code generation can be taken into account when arranging the input bits.
- deriving (from the set of bytes) a set of input bits for generating a hash code includes eliminating non-significant bits from the bytes.
- non-specified bits do not have valuable information (i.e., their entropy is zero) for determining the flow of network packets and, as such, non-specified bits may be omitted in creating a hash code.
- non-specified bits may be omitted using bit shifting, which requires minimal computational effort.
- non-specified bits may be set or maintained at 0, so that the non-specified bit have no effect in the cascade of XOR gates in a hasher combinatorial cone.
- a hash code is generated with the most meaningful bits arranged on one side of the hash code.
- the entropy of the hash code decreases from one side of the hash code to the other.
- an entire generated hash code or a reduced number of bits from the generated hash code may be used to identify a flow for a network packet.
- a single hash code generator can be used for different purposes.
- input bits can be arranged in a particular manner, e.g., according to their entropy, so that the input bits can be processed (by the hash code generator) according to their importance.
- input bits and output bits of a hash code generator are both arranged with the most important bits towards one side of the code.
- a packet header 1 of a network packet is passed to the network processor.
- the network processor includes a packet parser 2 and a hash code generator (hasher combinatorial cone) 3 coupled to parser 2 .
- Parser 2 includes a parser unit 4 , a bit masking unit 14 , and an output register 5 .
- Parser unit 4 is configured to extract bytes from packet header 1 . The bytes are predefined and depend on the use of the network processor.
- a packet header included in output register 5 may be, for example, a packet header for an IP packet that includes a TCP packet.
- extracted bytes may correspond to an IP source address (IP SA) 6 , a TCP source port (TCP SP) 7 , a multi-protocol label switching (MPLS) label 8 , 11 , an IP destination address (IP DA) 9 , a TCP destination port (TCP DP) 10 , a reserved area 12 , and a protocol byte (Prot) 13 .
- IP SA IP source address
- TCP SP TCP source port
- MPLS multi-protocol label switching
- IP DA IP destination address
- TCP DP TCP destination port
- reserved area 12 a reserved area 12
- Prot protocol byte
- the bytes are passed from parser unit 4 to bit masking unit 14 , which assembles meaningful bits from the bytes as input bits for hash code generator 3 .
- the MPLS label (MPLS label 8 , MPLS label 11 , and reserved area 12 ,) includes twenty-four bits (four spare bits and twenty used bits).
- Bit masking unit 14 may, for example, replace the four meaningless (spare) bits with ‘0’ and assemble the input bits accordingly.
- parser unit 4 arranges the bytes extracted from packet header 1 according to their importance. For example, the bytes may be arranged as shown in FIG.
- hash code generator 3 is configured to receive one-hundred twenty-eight input bits, as provided in output register 5 .
- hash code generator 3 implements a hash function that is a classical combinatorial cone of logic based on XOR gates that combines all 128-bits (i.e., the input bits) of output register 5 to produce a resulting 32-bit hash value.
- hash code generator 3 is implemented to provide the most meaningful output bits on the left side of the hash code, as indicated by the triangular form of hash code generator 3 . Arrangement of the output bits is based on the respective arrangement of the input bits according to their importance. As such, the hash code can be (entirely or partially) utilized starting from the side of the most important bits to correctly identify a flow of a network packet. As mentioned above, depending on the circumstances, different pieces of information may have higher entropy for calculating the hash code. Accordingly, different scenarios can be implemented for assembling the input bits to hash code generator 3 Flexibility for key assembly is achieved through a distribution bus 15 , which is provided as part of parser unit 4 .
- Distribution bus 15 arranges bytes from packet header 1 (that are extracted within parser unit 4 ) for further processing.
- distribution bus 15 is implemented as a pico-coded finite state machine (FSM).
- FSM pico-coded finite state machine
- Distribution bus 15 facilitates assembling raw keys with any combinations of bytes extracted (by packet parser 2 ) from packet header 1 .
- information available for key construction may include various scenarios, e.g., a 5-tuple format, a 3-tuple format, a 2-tuple format, a multiprotocol label switching (MPLS) 1 format, an MPLS 2 format, and a tunnelled IP-in-IP packet format.
- scenarios e.g., a 5-tuple format, a 3-tuple format, a 2-tuple format, a multiprotocol label switching (MPLS) 1 format, an MPLS 2 format, and a tunnelled IP-in-IP packet format.
- MPLS multiprotocol label switching
- bit masking unit 14 and output register 5 are implemented inside parser 2 . It should be appreciated, however, that the functions provided by bit masking unit 14 and output register 5 can be provided independent, i.e., outside parser 2 .
- a network processor has been disclosed herein that advantageously analyzes network packets using a generated hash code to determine packet flow.
- each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A technique for analyzing network packets includes receiving, by a network processor, a network packet having a packet header including address and control information. A set of bytes are extracted, using the network processor, from the packet header and a set of input bits for generating a hash code are derived, using the network processor, from the set of bytes. Finally, the hash code is generated using the input bits.
Description
- The present application is related to the following commonly assigned patent applications: U.S. patent application Ser. No. ______ (Attorney Docket No. FR920100059US1), entitled “COMPACTED BINARY IDENTIFIER GENERATION” by Claude Basso et al.; and U.S. patent application Ser. No. ______ (Attorney Docket No. FR920100061US1), entitled “BIDIRECTIONAL PACKET FLOW TRANSFORMATION” by Claude Basso et al., all of which were filed on even data herewith and are incorporated herein by reference in their entirety for all purposes.
- This application claims priority to European Patent Application No. EP10306405, entitled “METHOD FOR GENERATING A HASH CODE IN A NETWORK PROCESSOR, ” filed Dec. 14, 2010, the disclosure of which is hereby incorporated herein by reference in its entirety.
- 1. Field
- This disclosure relates generally to analysis of network packets and, more specifically, to analysis of network packets using a generated hash code.
- 2. Related Art
- A typical network packet includes a packet header that has a defined number of bytes. Analysis of a packet header has typically been required in order to assign a network packet to an appropriate packet flow (i.e., an appropriate receive or transmit queue). As analysis of an entire packet header may be time consuming, hash codes (which are usually short compared to entire packet headers) of packet headers have been utilized to reduce analysis time. Reducing the time required to identify a packet flow is even more desirable when multiple packet headers (i.e., a packet header of a lower layer network packet and a packet header of an upper layer network packet) have to be analyzed to identify a packet flow. In general, hash codes may have different lengths depending on processing requirements and, as such, flexibility in calculating hash functions is usually desirable. The usability of a hash code depends on the entropy of the generated hash code. In general, hash codes with higher entropy have higher information content and, as such, more accurately identify a packet flow of a network packet.
- The flexibility of hash functions have typically been defined by two parameters: the way in which the hash key is assembled; and the properties of the hash function. Several trade-offs are often made to implement flexible hashers by playing on variations of the two properties. In general, flexibility in hash key assembly may be better achieved in software implementations of hashers, while flexible hash functions usually involve some form of configurable hardware hasher implementation. Each aspect of hasher flexibility typically comes with limitations. For example, software key assemblies have performance limitations when complex patterns are required to build the hash key (in particular, when the key assembly is done at bit-level granularity). As another example, configurable hardware hash functions have silicon area limitations due to the configuration logic implementing the base hashing elements, which are typically implemented with exclusive OR (XOR) gates. The limitations appear to be especially significant when a hasher is used for identifying packet flows on very high-speed interfaces (e.g., 10 Gbps or more), mainly due to very short packet periodicity (e.g., 67.2 ns or less).
- According to one aspect of the present disclosure, a technique for analyzing network packets includes receiving, by a network processor, a network packet having a packet header including address and control information. A set of bytes are extracted, using the network processor, from the packet header and a set of input bits for generating a hash code are derived, using the network processor, from the set of bytes. Finally, the hash code is generated using the input bits.
- The present invention is illustrated by way of example and is not intended to be limited by the accompanying figures, in which like references indicate similar elements. Elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale.
-
FIG. 1 is a diagram of a relevant portion of an exemplary hasher of a network processor configured according to various aspects of the present disclosure. -
FIG. 2 is a diagram of content of an output register of a packet parser (which includes a set of bytes extracted from a network packet header) of the hasher ofFIG. 1 . - As will be appreciated by one of ordinary skill in the art, the present invention may be embodied as a method, system, device, or computer program product. Accordingly, the present invention may take the form of an embodiment including hardware, an embodiment including software (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a circuit, module, or system. The present invention may, for example, take the form of a computer program product on a computer-usable storage medium having computer-usable program code, e.g., in the form of one or more design files, embodied in the medium.
- Any suitable computer-usable or computer-readable storage medium may be utilized. The computer-usable or computer-readable storage medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, a portable compact disc read-only memory (CD-ROM), an optical storage device, or a magnetic storage device. As used herein the term “coupled” includes a direct electrical connection between elements or blocks and an indirect electrical connection between elements or blocks achieved using one or more intervening elements or blocks.
- According to various aspects of the present disclosure, a network processor for generating a hash code for analyzing network packets is configured to provide flexibility for the use of different length hash codes. In one or more embodiments, the network processor is configured for rapid computation of a hash code and corresponding identification of packet flows. According to the present disclosure, a packet header of a network packet includes address and control information that is received by a network processor. The network processor extracts a set of bytes from the packet header and derives (from the set of bytes) a set of input bits for generating a hash code.
- In various embodiments, the network processor includes a packet parser and a hash code generator. The packet parser is configured to: receive a network packet having a packet header (including address and control information), extract a set of bytes from the packet header; and derive from the set of bytes a set of input bits for generating a hash code. The hash code generator is configured to generate a hash code using the input bits. In general, the hash code generator implements a single hash generating function that generates the hash code based on the input bits extracted from the bytes. Accordingly, without modifying the hash generating function, a resulting hash code can be adapted by selecting different bytes from a packet header. This facilitates generating a hash code having a high entropy, as input bits from the selected bytes usually have a high entropy.
- The selection of bytes depends on the usage of a network processor within a network structure. For example, at a network destination, a destination address may be identical for certain network protocols. In this case, the destination address of the packet header does not usually provide useful information for determining the flow of the network packet, i.e., the entropy of the information is low. In contrast, in a network processor in an intermediate point of a network connection (e.g., a relay station), a source address and a destination address of a network packet are meaningful and can be used for hash code generation. An implementation in a network processor or a system for analyzing packets can be achieved by implementing a single hash code generator in silicon, so that only a relatively small silicon area is occupied for hash code generation. The flexibility in selecting the bytes can be easily implemented with relatively low computational effort, such that network packets can be adequately processed even when high data rates are required.
- According to one or more embodiments, extracting a set of bytes from the packet header includes extracting bytes from a packet header transported within a network packet. For example, when transmission control protocol (TCP) packets are transported in Internet protocol (IP) packets the packet headers of both packets are utilized to generate a hash code. In this manner, the bytes can be selected from a bigger set of bytes. In another embodiment, a set of bytes extracted from a packet header may include one or more of: an Internet protocol (IP) source address; a transmission control protocol (TCP) source port; an multi-protocol label switching (MPLS) label; an IP destination address; a TCP destination port; a reserved area; and protocol information. In general, the extracted bytes identify the destination and the source of network packets and provide further header information (where the importance of each field depends on the kind of network device in which the network processor is used).
- In the event that some of the packet header bytes are not meaningful, other packet header bytes that are meaningful can be used. Bytes from IP packet headers may include bytes from packet headers that conform to Internet Protocol version 4 (IPv4) or Internet Protocol version (IPv6), depending on which network protocol is implemented. According to one or more embodiments, extracting the IP source address and/or the IP destination address may include compressing the IP source address and/or the IP destination address. For example, when IP addresses are relatively long and the number of input bits of a hash code generating algorithm is relatively small, compression is desirable. Further details regarding compression of IPv6 addresses is available in U.S. patent application Ser. No. ______ (Attorney Docket No. FR920100059US1) entitled “COMPACTED BINARY IDENTIFIER GENERATION.”
- In one or more embodiments, a set of input bits is derived from a set of bytes. The set of input bits are then used to generate a hash code. In at least one embodiment, the bytes for forming the input bits are ordered from most meaningful to least meaningful. In this case, the entropy of the input bits decreases from one side of the input bits to the other. This facilitates classifying the bits derived from the bytes according to their importance so that properties of the hash code generation can be taken into account when arranging the input bits. According to one or more embodiments, deriving (from the set of bytes) a set of input bits for generating a hash code includes eliminating non-significant bits from the bytes.
- Depending on the protocols used, bytes from the packet header may only include a certain number of meaningful bits by definition. In this case, the remaining non-meaningful bits of a byte may be filled with predefined values. It should be appreciated that non-specified bits do not have valuable information (i.e., their entropy is zero) for determining the flow of network packets and, as such, non-specified bits may be omitted in creating a hash code. For example, non-specified bits may be omitted using bit shifting, which requires minimal computational effort. Alternatively, non-specified bits may be set or maintained at 0, so that the non-specified bit have no effect in the cascade of XOR gates in a hasher combinatorial cone.
- In at least one embodiment, a hash code is generated with the most meaningful bits arranged on one side of the hash code. In this embodiment, the entropy of the hash code decreases from one side of the hash code to the other. In this case, an entire generated hash code or a reduced number of bits from the generated hash code may be used to identify a flow for a network packet. As the most meaningful bits can be readily selected from a hash code, a single hash code generator can be used for different purposes. In one or more embodiments, input bits can be arranged in a particular manner, e.g., according to their entropy, so that the input bits can be processed (by the hash code generator) according to their importance. In one or more embodiments, input bits and output bits of a hash code generator are both arranged with the most important bits towards one side of the code.
- Referring to
FIG. 1 , relevant components of a hasher (of a network processor) that are used to generate a hash code are illustrated. Apacket header 1 of a network packet is passed to the network processor. The network processor includes apacket parser 2 and a hash code generator (hasher combinatorial cone) 3 coupled toparser 2.Parser 2 includes aparser unit 4, abit masking unit 14, and anoutput register 5.Parser unit 4 is configured to extract bytes frompacket header 1. The bytes are predefined and depend on the use of the network processor. With reference toFIG. 2 , a packet header included inoutput register 5 may be, for example, a packet header for an IP packet that includes a TCP packet. In this case, extracted bytes may correspond to an IP source address (IP SA) 6, a TCP source port (TCP SP) 7, a multi-protocol label switching (MPLS) 8, 11, an IP destination address (IP DA) 9, a TCP destination port (TCP DP) 10, a reservedlabel area 12, and a protocol byte (Prot) 13. - The bytes are passed from
parser unit 4 to bit maskingunit 14, which assembles meaningful bits from the bytes as input bits forhash code generator 3. The MPLS label (MPLS label 8,MPLS label 11, and reservedarea 12,) includes twenty-four bits (four spare bits and twenty used bits).Bit masking unit 14 may, for example, replace the four meaningless (spare) bits with ‘0’ and assemble the input bits accordingly. In one or more embodiments,parser unit 4 arranges the bytes extracted frompacket header 1 according to their importance. For example, the bytes may be arranged as shown inFIG. 2 starting withIP source address 6 and followed byTCP source port 7,MPLS label 8,IP destination address 9,TCP destination port 10,MPLS label 11, reservedarea 12, andprotocol byte 13. In one or more embodiments,hash code generator 3 is configured to receive one-hundred twenty-eight input bits, as provided inoutput register 5. In various embodiments,hash code generator 3 implements a hash function that is a classical combinatorial cone of logic based on XOR gates that combines all 128-bits (i.e., the input bits) ofoutput register 5 to produce a resulting 32-bit hash value. - In at least one embodiment,
hash code generator 3 is implemented to provide the most meaningful output bits on the left side of the hash code, as indicated by the triangular form ofhash code generator 3. Arrangement of the output bits is based on the respective arrangement of the input bits according to their importance. As such, the hash code can be (entirely or partially) utilized starting from the side of the most important bits to correctly identify a flow of a network packet. As mentioned above, depending on the circumstances, different pieces of information may have higher entropy for calculating the hash code. Accordingly, different scenarios can be implemented for assembling the input bits to hashcode generator 3 Flexibility for key assembly is achieved through adistribution bus 15, which is provided as part ofparser unit 4.Distribution bus 15 arranges bytes from packet header 1 (that are extracted within parser unit 4) for further processing. In one or more embodiments,distribution bus 15 is implemented as a pico-coded finite state machine (FSM).Distribution bus 15 facilitates assembling raw keys with any combinations of bytes extracted (by packet parser 2) frompacket header 1. - For example, information available for key construction may include various scenarios, e.g., a 5-tuple format, a 3-tuple format, a 2-tuple format, a multiprotocol label switching (MPLS) 1 format, an
MPLS 2 format, and a tunnelled IP-in-IP packet format. The designation and sizes of the various scenario are illustrated in the tables below: -
-
SA Source Address 4 Bytes SP Source Port 2 Bytes DA Destination Address 4 Bytes DP Destination Port 2 Bytes Proto Protocol 1 Byte -
-
DA Destination Address 4 Bytes DP Destination Port 2 Bytes Proto Protocol 1 Byte -
-
DP Destination Port 2 Bytes Proto Protocol 1 Byte -
-
Label 2.5 Bytes SA Source Address 4 Bytes SP Source Port 2 Bytes DA Destination Address 4 Bytes DP Destination Port 2 Bytes Proto Protocol 1 Byte -
-
Label 2.5 Bytes
Tunnelled IP-in-IP packets -
SA (1) Inner packet Source Address 4 Bytes SP (1) Inner packet Source Port 2 Bytes DA (1) Inner packet Destination Address 4 Bytes DP (1) Inner packet Destination Port 2 Bytes Proto (1) Inner packet Protocol 1 Byte SA (2) Outer packet Source Address 4 Bytes DA (2) Outer packet Destination Address 4 Bytes - In the disclosed embodiments,
bit masking unit 14 and output register 5 are implemented insideparser 2. It should be appreciated, however, that the functions provided bybit masking unit 14 and output register 5 can be provided independent, i.e., outsideparser 2. - Accordingly, a network processor has been disclosed herein that advantageously analyzes network packets using a generated hash code to determine packet flow.
- The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
- The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” (and similar terms, such as includes, including, has, having, etc.) are open-ended when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
- The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below, if any, are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
- Having thus described the invention of the present application in detail and by reference to preferred embodiments thereof, it will be apparent that modifications and variations are possible without departing from the scope of the invention defined in the appended claims.
Claims (20)
1. A method for analyzing network packets, comprising:
receiving, using a network processor, a network packet having a packet header including address and control information;
extracting, using the network processor, a set of bytes from the packet header, wherein the set of bytes is selected based on usage of the network processor within a network structure;
deriving, using the network processor, from the set of bytes a set of input bits for generating a hash code; and
generating, using the network processor, the hash code using the input bits.
2. The method of claim 1 , wherein the extracting, using the network processor, a set of bytes from the packet header includes extracting bytes from a packet header transported within the network packet.
3. The method of claim 1 , wherein the extracting, using the network processor, a set of bytes from the packet header includes extracting an IP source address and an IP destination address from the packet header.
4. The method of claim 3 , wherein the extracting an IP source address and an IP destination address from the packet header includes compressing the IP source address and the IP destination address.
5. The method of claim 1 , wherein the deriving, using the network processor, from the set of bytes a set of input bits for generating a hash code includes ordering the bytes for forming the input bits from most meaningful to least meaningful.
6. The method of claim 1 , wherein the deriving, using the network processor, from the set of bytes a set of input bits for generating a hash code includes replacing meaningless bits in the bytes.
7. The method of claim 1 , wherein the generating, using the network processor, a hash code using the input bits includes generating a hash code with most meaningful bits arranged on one side of the hash code.
8. A network processor for analyzing network packets, comprising:
a packet parser, wherein the packet parser is configured to:
receive a network packet having a packet header that includes address and control information;
extract a set of bytes from the packet header, wherein the set of bytes is selected based on usage of the network processor within a network structure; and
derive from the set of bytes a set of input bits for generating a hash code; and
a hash code generator coupled to the packet parser, wherein the hash code generator is configured to generate the hash code using the input bits.
9. The network processor of claim 8 , wherein the packet header is transported within the network packet.
10. The network processor of claim 8 , wherein the packet parser is further configured to extract an IP source address and an IP destination address from the packet header.
11. The network processor of claim 10 , wherein the network processor is further configured to compress the IP source address and the IP destination address.
12. The network processor of claim 8 , wherein packet parser is further configured to order the bytes for forming the input bits from most meaningful to less meaningful.
13. The network processor of claim 8 , wherein the packet parser is further configured to replace meaningless bits in the bytes.
14. The network processor of claim 8 , wherein the hash code generator generates the hash code with most meaningful bits arranged on one side of the hash code.
15. A network processor for analyzing network packets, comprising:
a packet parser including a bit masking unit for replacing meaningless bits, wherein the packet parser is configured to:
receive a network packet having a packet header that includes address and control information;
extract a set of bytes from the packet header, wherein the set of bytes is selected based on usage of the network processor within a network structure; and
derive from the set of bytes a set of input bits for generating a hash code, wherein the input bits include at least one replaced meaningless bit; and
a hash code generator coupled to the packet parser, wherein the hash code generator is configured to generate the hash code using the input bits, and wherein the packet header is transported within the network packet.
16. The network processor of claim 15 , wherein the packet parser is further configured to extract an IP source address and an IP destination address from the packet header.
17. The network processor of claim 16 , wherein the network processor is further configured to compress the IP source address and the IP destination address.
18. The network processor of claim 15 , wherein packet parser is further configured to order the bytes for forming the input bits from most meaningful to least meaningful.
19. The network processor of claim 15 , wherein the packet parser is further configured to replace the at least one replaced meaningless bit in the bytes.
20. The network processor of claim 15 , wherein the hash code generator generates the hash code with most meaningful bits arranged on one side of the hash code.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US13/687,248 US9178814B2 (en) | 2010-12-14 | 2012-11-28 | Analysis of network packets using a generated hash code |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP10306405 | 2010-12-14 | ||
| EP10306405 | 2010-12-14 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US13/687,248 Continuation US9178814B2 (en) | 2010-12-14 | 2012-11-28 | Analysis of network packets using a generated hash code |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| US20120147892A1 true US20120147892A1 (en) | 2012-06-14 |
Family
ID=46199345
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US13/325,597 Abandoned US20120147892A1 (en) | 2010-12-14 | 2011-12-14 | Analysis of network packets using a generated hash code |
| US13/687,248 Expired - Fee Related US9178814B2 (en) | 2010-12-14 | 2012-11-28 | Analysis of network packets using a generated hash code |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US13/687,248 Expired - Fee Related US9178814B2 (en) | 2010-12-14 | 2012-11-28 | Analysis of network packets using a generated hash code |
Country Status (1)
| Country | Link |
|---|---|
| US (2) | US20120147892A1 (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140280825A1 (en) * | 2013-03-14 | 2014-09-18 | International Business Machines Corporation | Identifying network flows under network address translation |
| US20150281082A1 (en) * | 2014-03-31 | 2015-10-01 | Nicira, Inc. | Performing a finishing operation to improve the quality of a resulting hash |
| WO2015092725A3 (en) * | 2013-12-18 | 2015-11-12 | Marvell Israel (M.I.S.L) Ltd. | Increasing packet process rate in a network device |
| US9276853B2 (en) | 2012-04-10 | 2016-03-01 | Viavi Solutions Inc. | Hashing of network packet flows for efficient searching |
| US9473373B2 (en) | 2012-04-04 | 2016-10-18 | Viavi Solutions, Inc. | Method and system for storing packet flows |
| US9853942B2 (en) * | 2011-02-16 | 2017-12-26 | Fortinet, Inc. | Load balancing among a cluster of firewall security devices |
| US10186879B2 (en) | 2014-01-31 | 2019-01-22 | Steffes Corporation | Energy storage device power consumption management |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6096084B2 (en) * | 2013-08-27 | 2017-03-15 | 日本電信電話株式会社 | Traffic scanning apparatus and method |
| US10015096B1 (en) | 2016-06-20 | 2018-07-03 | Amazon Technologies, Inc. | Congestion avoidance in multipath routed flows |
| US10069734B1 (en) | 2016-08-09 | 2018-09-04 | Amazon Technologies, Inc. | Congestion avoidance in multipath routed flows using virtual output queue statistics |
| US10097467B1 (en) | 2016-08-11 | 2018-10-09 | Amazon Technologies, Inc. | Load balancing for multipath groups routed flows by re-associating routes to multipath groups |
| US10116567B1 (en) | 2016-08-11 | 2018-10-30 | Amazon Technologies, Inc. | Load balancing for multipath group routed flows by re-routing the congested route |
| US10009275B1 (en) | 2016-11-15 | 2018-06-26 | Amazon Technologies, Inc. | Uniform route distribution for a forwarding table |
| CN117675712A (en) * | 2022-08-24 | 2024-03-08 | 瑞昱半导体股份有限公司 | Network control method and network card |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080013541A1 (en) * | 2002-06-13 | 2008-01-17 | International Business Machines Corpration | Selective header field dispatch in a network processing system |
| US20080219176A1 (en) * | 2004-02-17 | 2008-09-11 | Yusuke Yamada | Transmission Device |
| US20090080452A1 (en) * | 2007-09-21 | 2009-03-26 | Ra Yong Wook | Packet processing apparatus and method codex |
| US20110206064A1 (en) * | 2010-02-19 | 2011-08-25 | Intrusion Inc. | High speed network data extractor |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100384180C (en) | 1999-06-30 | 2008-04-23 | 倾向探测公司 | Method and apparatus for monitoring network traffic |
| US7669234B2 (en) | 2002-12-31 | 2010-02-23 | Broadcom Corporation | Data processing hash algorithm and policy management |
| JP2010515945A (en) | 2007-01-11 | 2010-05-13 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Tracking a copy of the implementation |
| US8438381B2 (en) | 2007-03-16 | 2013-05-07 | Telefonaktiebolaget Lm Ericsson (Publ) | Securing IP traffic |
| US7990973B2 (en) | 2008-08-13 | 2011-08-02 | Alcatel-Lucent Usa Inc. | Hash functions for applications such as network address lookup |
| US8619782B2 (en) | 2010-12-14 | 2013-12-31 | International Business Machines Corporation | Bidirectional packet flow transformation |
-
2011
- 2011-12-14 US US13/325,597 patent/US20120147892A1/en not_active Abandoned
-
2012
- 2012-11-28 US US13/687,248 patent/US9178814B2/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080013541A1 (en) * | 2002-06-13 | 2008-01-17 | International Business Machines Corpration | Selective header field dispatch in a network processing system |
| US20080219176A1 (en) * | 2004-02-17 | 2008-09-11 | Yusuke Yamada | Transmission Device |
| US20090080452A1 (en) * | 2007-09-21 | 2009-03-26 | Ra Yong Wook | Packet processing apparatus and method codex |
| US20110206064A1 (en) * | 2010-02-19 | 2011-08-25 | Intrusion Inc. | High speed network data extractor |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9853942B2 (en) * | 2011-02-16 | 2017-12-26 | Fortinet, Inc. | Load balancing among a cluster of firewall security devices |
| US9473373B2 (en) | 2012-04-04 | 2016-10-18 | Viavi Solutions, Inc. | Method and system for storing packet flows |
| US9276853B2 (en) | 2012-04-10 | 2016-03-01 | Viavi Solutions Inc. | Hashing of network packet flows for efficient searching |
| US20140280825A1 (en) * | 2013-03-14 | 2014-09-18 | International Business Machines Corporation | Identifying network flows under network address translation |
| US9800542B2 (en) * | 2013-03-14 | 2017-10-24 | International Business Machines Corporation | Identifying network flows under network address translation |
| US20140280839A1 (en) * | 2013-03-14 | 2014-09-18 | International Business Machines Corporation | Identifying network flows under network address translation |
| US10097510B2 (en) * | 2013-03-14 | 2018-10-09 | International Business Machines Corporation | Identifying network flows under network address translation |
| WO2015092725A3 (en) * | 2013-12-18 | 2015-11-12 | Marvell Israel (M.I.S.L) Ltd. | Increasing packet process rate in a network device |
| CN105993150A (en) * | 2013-12-18 | 2016-10-05 | 马维尔以色列(M.I.S.L.)有限公司 | Increase packet processing rate in network equipment |
| US9813336B2 (en) | 2013-12-18 | 2017-11-07 | Marvell Israel (M.I.S.L) Ltd. | Device and method for increasing packet processing rate in a network device |
| US9923813B2 (en) | 2013-12-18 | 2018-03-20 | Marvell World Trade Ltd. | Increasing packet processing rate in a network device |
| US10186879B2 (en) | 2014-01-31 | 2019-01-22 | Steffes Corporation | Energy storage device power consumption management |
| US20150281082A1 (en) * | 2014-03-31 | 2015-10-01 | Nicira, Inc. | Performing a finishing operation to improve the quality of a resulting hash |
| US10193806B2 (en) * | 2014-03-31 | 2019-01-29 | Nicira, Inc. | Performing a finishing operation to improve the quality of a resulting hash |
Also Published As
| Publication number | Publication date |
|---|---|
| US20130156036A1 (en) | 2013-06-20 |
| US9178814B2 (en) | 2015-11-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9178814B2 (en) | Analysis of network packets using a generated hash code | |
| US12375588B2 (en) | Generation of descriptive data for packet fields | |
| CN103415836B (en) | The network processing unit of expedited data Packet analyzing and method | |
| US7187694B1 (en) | Generic packet parser | |
| US20220060414A1 (en) | Method for generating segment list, method for forwarding packet, device, and system in srv6 network | |
| US8619782B2 (en) | Bidirectional packet flow transformation | |
| JP6590546B2 (en) | Method and apparatus for forming hash input from packet contents | |
| WO2020087400A1 (en) | Header parsing apparatus and method | |
| CN111181857B (en) | A message processing method and device, storage medium, and optical network terminal | |
| US20250365353A1 (en) | Method of using unit vectors to allow expansion and collapse of header layers within packets for enabling flexible modifications and an apparatus thereof | |
| JP6594671B2 (en) | Method and apparatus for changing a packet to a general-purpose format and enabling a programmable change | |
| US9473601B2 (en) | Method of representing a generic format header using continuous bytes and an apparatus thereof | |
| JP6590545B2 (en) | Method and apparatus for extracting data from packets | |
| CN105282137B (en) | Method and apparatus for splitting a packet into layers for modification and then splicing the layers | |
| US9497294B2 (en) | Method of using a unique packet identifier to identify structure of a packet and an apparatus thereof | |
| US9490939B2 (en) | Apparatus and method for calculating transmission control protocol checksum | |
| US10003676B2 (en) | Method and apparatus for generating parallel lookup requests utilizing a super key | |
| US11968119B1 (en) | Service Function Chaining using uSID in SRv6 | |
| US9531848B2 (en) | Method of using generic modification instructions to enable flexible modifications of packets and an apparatus thereof | |
| JP7764540B2 (en) | Virtual forwarding device, method of operation thereof and computer-readable storage medium | |
| CN113242180B (en) | Message forwarding method, device, equipment, readable storage medium and program product | |
| WO2024081408A1 (en) | SERVICE FUNCTION CHAINING USING uSID IN SRv6 | |
| JP2006173693A (en) | Packet communication method and system and apparatus therefor | |
| JPWO2016103568A1 (en) | Packet processing apparatus, method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AS | Assignment |
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:BASSO, CLAUDE;CALVIGNAC, JEAN L;VAIDHYANATHAN, NATARAJAN;AND OTHERS;SIGNING DATES FROM 20111130 TO 20111213;REEL/FRAME:027380/0810 |
|
| STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |