IP Library › Granted Patent US 8,576,841
Granted Patent B2
US 8,576,841 · App. 13/174,437 · Granted Nov 5, 2013

Hybrid port range encoding

Inventors: Balamurugan Ramaraj (San Jose, CA); Gopi Krishna (Union City, CA); Ananda Sathyanarayana (Santa Clara, CA); Apurva Mehta (Cupertino, CA); Murtuza Attarwala (San Francisco, CA)
Assignee: Juniper Networks, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,576,841
App. No.
13/174,437
Granted
Nov 5, 2013
Kind
B2
Abstract

In general, techniques are described for encoding port ranges. In one example, a method includes generating an encoded value that represents a specified port range including a first element storing an identifier that identifies a frequently occurring port range stored in an associative data structure of most frequently occurring port ranges, a second element storing an index that represents a dynamically-learned port range specifying at least a part of the specified port range, the dynamically-learned port range represented in a tree-structure of dynamically-learned port ranges and identified by the index, and applying, by a forwarding plane of the computing device, one or more filters associated with the encoded value to a packet that specifies a port included in the specified port range.

Claims (83)

1. A method comprising:

generating, by a computing device, an encoded value that represents a specified port range comprising:

a first element storing an identifier that identifies a frequently occurring port range stored in an associative data structure of most frequently occurring port ranges,

a second element storing an index that represents a dynamically-learned port range specifying at least a part of the specified port range, the dynamically-learned port range represented in a tree-structure of dynamically-learned port ranges and identified by the index;

receiving, by the computing device, a packet that indicates a port value;

generating, by the computing device, a query value based at least on the port value;

selecting, by the computing device, one or more filters using a content-addressable data structure that indicates an association between the encoded value and the one or more filters, wherein the encoded value matches the query value; and

applying, by a forwarding plane of the computing device, the one or more filters associated with the encoded value to the packet that indicates the port.

2. The method of claim 1 , further comprising:

determining, by the computing device, a port range specified by a filter; and

querying, by the computing device, the associative data structure of most frequently occurring port ranges to determine if the specified port range is included in the associative data structure of most frequently occurring port ranges.

3. The method of claim 2 , wherein if the specified port range is included in the associative data structure of most frequently occurring port ranges, generating the encoded value to store the identifier that identifies the frequently occurring port range in the first element of the encoded value.

4. The method of claim 2 , wherein if the specified port range does not match the most frequently occurring port range, storing one or more dynamically-learned port ranges in the tree data structure to represent the port range specified by the filter, wherein the dynamically-learned port ranges are uniquely represented by one or more indexes; and

generating the encoded value to store the one or more indexes in the second element of the encoded value.

5. The method of claim 4 , further comprising:

determining, by the computing device, the specified port range overlaps with at least one dynamically-learned port range in the tree-structure of dynamically-learned port ranges; and

splitting, by the computing device, the at least one dynamically-learned port range into multiple dynamically-learned port ranges in the tree-structure of dynamically-learned port ranges, wherein at least one of the multiple dynamically-learned port ranges represents the specified port range and wherein each of the multiple dynamically-learned port ranges not representing the specified port range represents a subset of the at least one dynamically-learned port range in the tree-structure of dynamically-learned port ranges.

6. The method of claim 1 , wherein if the specified port range comprises a single port value,

storing, by the computing device, the single port value in a third element of the encoded value.

7. The method of claim 1 , wherein generating the query value based at least on the port value further comprises:

selecting, by the computing device, the port value of the packet; and

storing, by the computing device, the port value in the query value.

8. The method of claim 1 , wherein generating the query value based at least on the port value further comprises:

selecting, by the computing device, the port value of the packet;

comparing, by the computing device, the port value to one or more port ranges of the associative data structure that stores most frequently occurring port ranges;

selecting, by the computing device, one or more frequently occurring port range identifiers associated with one or more port ranges of the associative data structure that include the port value; and

storing, by the computing device, the one or more frequently occurring port range identifiers in the query value.

9. The method of claim 1 , wherein generating the query value based on at least the port value further comprises:

selecting, by the computing device, the port value of the packet;

comparing, by the computing device, the port value to one or more port ranges of tree-structure of dynamically-learned port ranges;

selecting, by the computing device, a dynamically-learned port range index associated with a dynamically-learned port range of the tree-structure of dynamically-learned port ranges that include the port value; and

storing, by the computing device, the dynamically-learned port range index in the query value.

10. The method of claim 1 , further comprising:

generating, by the computing device, a mask, wherein the mask comprises data indicating if the first element stores the identifier that identifies a frequently occurring port range or the second element stores the index that represents the dynamically-learned port range specifying at least a part of the specified port range; and

storing, by the computing device, the mask and the encoded value in a content addressable data structure.

11. The method of claim 1 , further comprising:

determining, by the computing device, a group of most frequently occurring port ranges based at least on one or more packet flows;

storing, by the computing device, the group of most frequently occurring port ranges in the associative data structure of most frequently occurring port ranges;

determining, by the computing device, an observed port range in a second packet flow occurs more frequently than at least one of the most frequently occurring port ranges in the associative data structure; and

replacing, by the computing device, the at least one of the most frequently occurring port ranges in the associative data structure with the observed port range.

12. A network device comprising:

an encoding module that:

generates an encoded value that represents a specified port range comprising:

a first element storing an identifier that identifies a frequently occurring port range stored in an associative data structure of most frequently occurring port ranges,

a second element storing an index that represents a dynamically-learned port range specifying at least a part of the specified port range, the dynamically-learned port range represented in a tree-structure of dynamically-learned port ranges and identified by the index;

a forwarding plane that receives a packet that indicates a port value;

wherein the encoding module:

generates a query value based at least on the port value;

selects one or more filters using a content-addressable data structure that indicates an association between the encoded value and the one or more filters, wherein the encoded value matches the query value; and

wherein the forwarding plane applies the one or more filters associated with the encoded value to the packet that indicates the port.

13. The network device of claim 12 ,

wherein the encoding module determines a port range specified by a filter; and

wherein the encoding module queries the associative data structure of most frequently occurring port ranges to determine if the specified port range is included in the associative data structure of most frequently occurring port ranges.

14. The network device of claim 12 ,

wherein if the specified port range is included in the associative data structure of most frequently occurring port ranges, the encoding module generates the encoded value to store the identifier that identifies the frequently occurring port range in the first element of the encoded value.

15. The network device of claim 12 ,

wherein if the specified port range does not match the most frequently occurring port range, the encoding module stores one or more dynamically-learned port ranges in the tree data structure to represent the port range specified by the filter, wherein the dynamically-learned port ranges are uniquely represented by one or more indexes; and generating the encoded value to store the one or more indexes in the second element of the encoded value.

16. The network device of claim 15 ,

wherein the encoding module determines the specified port range overlaps with at least one dynamically-learned port range in the tree-structure of dynamically-learned port ranges; and

wherein the encoding module splits the at least one dynamically-learned port range into multiple dynamically-learned port ranges in the tree-structure of dynamically-learned port ranges, wherein at least one of the multiple dynamically-learned port ranges represents the specified port range and wherein each of the multiple dynamically-learned port ranges not representing the specified port range represents a subset of the at least one dynamically-learned port range in the tree-structure of dynamically-learned port ranges.

17. The network device of claim 12 ,

wherein if the specified port range comprises a single port value, the encoding module stores the single port value in a third element of the encoded value.

18. The network device of claim 12 ,

wherein the encoding module selects the port value of the packet; and

wherein the encoding module stores the port value in the query value.

19. The network device of claim 12 ,

wherein the encoding module selects the port value of the packet;

wherein the encoding module compares the port value to one or more port ranges of the associative data structure that stores most frequently occurring port ranges;

wherein the encoding module selects one or more frequently occurring port range identifiers associated with one or more port ranges of the associative data structure that include the port value; and

wherein the encoding module stores the one or more frequently occurring port range identifiers in the query value.

20. The network device of claim 12 ,

wherein the encoding module selects the port value of the packet;

wherein the encoding module compares the port value to one or more port ranges of tree-structure of dynamically-learned port ranges;

wherein the encoding module selects a dynamically-learned port range index associated with a dynamically-learned port range of the tree-structure of dynamically-learned port ranges that include the port value; and

wherein the encoding module stores the dynamically-learned port range index in the query value.

21. The network device of claim 12 ,

wherein the encoding module generates a mask, wherein the mask comprises data indicating if the first element stores the identifier that identifies a frequently occurring port range or the second element stores the index that represents the dynamically-learned port range specifying at least a part of the specified port range; and

wherein the encoding module stores the mask and the encoded value in a content addressable data structure.

22. The network device of claim 12 ,

wherein the encoding module determines a group of most frequently occurring port ranges based at least on one or more packet flows;

wherein the encoding module stores the group of most frequently occurring port ranges in the associative data structure of most frequently occurring port ranges;

wherein the encoding module determines an observed port range in a second packet flow occurs more frequently than at least one of the most frequently occurring port ranges in the associative data structure; and

wherein the encoding module replaces the at least one of the most frequently occurring port ranges in the associative data structure with the observed port range.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 22, 2011
From: KRISHNA, GOPI; SATHYANARAYANA, ANANDA; MEHTA, APURVA; ATTARWALA, MURTUZA
To: JUNIPER NETWORKS, INC.
Reel/Frame 026786/0687 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 30, 2011
From: RAMARAJ, BALAMURUGAN; KRISHNA, GOPI
To: JUNIPER NETWORKS, INC.
Reel/Frame 026532/0720 →
Continuity (1)
Related Publication 20130003727A1 · Jan 3, 2013