Claims
- 1. A method for resolving conflicts between rules for network services, comprising:
receiving a set of network service rules for network data traffic from multiple network services, wherein network service rules from different network services can possibly conflict; and resolving conflicts between network service rules in the set of network service rules by,
identifying conflicts between pairs of network service rules in the set of network service rules, determining a priority relationship between each pair of conflicting network service rules, and assigning priorities to network service rules in the set of network service rules in a manner consistent with the determined priority relationships, thereby allowing conflicts between network service rules to be subsequently resolved based on the assigned priorities.
- 2. The method of claim 1, further comprising processing an additional network service rule in an on-line manner by:
receiving the additional network service rule at run time; identifying any conflicts that may exist between the additional network service rule and existing rules in the set of network service rules; determining a priority relationship between the additional network service rule and any conflicting network service rules that may exist; assigning a priority to the additional network service rule; and reassigning priorities, if necessary, to existing network service rules in the set of network service rules.
- 3. The method of claim 1, wherein assigning the priorities to the network service rules involves:
generating a graph by,
creating a vertex for each network service rule in the set of network service rules, inserting a directed edge into the graph between vertices associated with each pair of conflicting network service rules, wherein the directed edge points from a vertex associated with a lower priority network service rule to a vertex associated with a higher priority network service rule in accordance the determined priority relationship between the pair of conflicting network service rules; and performing a topological sort on the graph; and assigning priorities to network service rules by,
traversing vertices of the graph in sorted order, and assigning priorities to network service rules associated with the vertices in a manner consistent with the determined priority relationships between pairs of conflicting network service rules.
- 4. The method of claim 3, wherein assigning priorities to network service rules involves:
assigning a priority of one to a network service rule, if the network service rule is associated with a vertex that has no directed edges pointing to other vertices; and if a network service rule is associated with a vertex that has one or more directed edges pointing to other vertices,
determining a maximum priority for network service rules associated with the other vertices, and assigning a priority of one plus the maximum priority to the network service rule.
- 5. The method of claim 1, further comprising installing a set of low-level flow rules produced from the prioritized network service rules into a flow enforcement device, which applies the set of flow rules to a packet flow received from a high-speed network connection;
whereby the network service rules from the multiple network services can be simultaneously applied to packet flow, instead of being separately applied by each network service.
- 6. The method of claim 1, wherein determining if a given pair of network service rules conflicts involves:
determining relationships between corresponding filter-fields in the given pair of network service rules; if all of the filter-fields are disjoint, determining that the given pair of network service rules does not conflict; and if at least one of the filter-field relationships is not disjoint,
determining that the given pair of network service rules does conflict, and determining a conflict relationship between the pair of conflicting network service rules by combining the filter-field relationships.
- 7. The method of claim 6, wherein determining a priority relationship between a given pair of conflicting network service rules involves considering a priority policy as well as the conflict relationship between the pair of conflicting network service rules.
- 8. The method of claim 1, wherein each of the network service rules specifies:
a filter that defines a class of packets in the packet flow; and an action that defines an operation to be applied to the class of packets.
- 9. The method of claim 8, wherein an operation defined by a network service rule can include, but is not limited to:
dropping a packet; gathering statistical information about the packet; controlling timer functions associated with the packet; modifying the packet; and passing the packet on.
- 10. The method of claim 1, wherein the multiple network services can include, but is not limited to:
a firewall service; a service level agreement monitoring service; a load balancing service; a transport matching service; a failover service; and a high availability service.
- 11. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for resolving conflicts between rules for network services, the method comprising:
receiving a set of network service rules for network data traffic from multiple network services, wherein network service rules from different network services can possibly conflict; and resolving conflicts between network service rules in the set of network service rules by,
identifying conflicts between pairs of network service rules in the set of network service rules, determining a priority relationship between each pair of conflicting network service rules, and assigning priorities to network service rules in the set of network service rules in a manner consistent with the determined priority relationships, thereby allowing conflicts between network service rules to be subsequently resolved based on the assigned priorities.
- 12. The computer-readable storage medium of claim 11, wherein the method further comprises processing an additional network service rule in an on-line manner by:
receiving the additional network service rule at run time; identifying any conflicts that may exist between the additional network service rule and existing rules in the set of network service rules; determining a priority relationship between the additional network service rule and any conflicting network service rules that may exist; assigning a priority to the additional network service rule; and reassigning priorities, if necessary, to existing network service rules in the set of network service rules.
- 13. The computer-readable storage medium of claim 11, wherein assigning the priorities to the network service rules involves:
generating a graph by,
creating a vertex for each network service rule in the set of network service rules, inserting a directed edge into the graph between vertices associated with each pair of conflicting network service rules, wherein the directed edge points from a vertex associated with a lower priority network service rule to a vertex associated with a higher priority network service rule in accordance the determined priority relationship between the pair of conflicting network service rules; and performing a topological sort on the graph; and assigning priorities to network service rules by,
traversing vertices of the graph in sorted order, and assigning priorities to network service rules associated with the vertices in a manner consistent with the determined priority relationships between pairs of conflicting network service rules.
- 14. The computer-readable storage medium of claim 13, wherein assigning priorities to network service rules involves:
assigning a priority of one to a network service rule, if the network service rule is associated with a vertex that has no directed edges pointing to other vertices; and if a network service rule is associated with a vertex that has one or more directed edges pointing to other vertices,
determining a maximum priority for network service rules associated with the other vertices, and assigning a priority of one plus the maximum priority to the network service rule.
- 15. The computer-readable storage medium of claim 11, wherein the method further comprises installing a set of low-level flow rules produced from the prioritized network service rules into a flow enforcement device, which applies the set of flow rules to a packet flow received from a high-speed network connection;
whereby the network service rules from the multiple network services can be simultaneously applied to packet flow, instead of being separately applied by each network service.
- 16. The computer-readable storage medium of claim 11, wherein determining if a given pair of network service rules conflicts involves:
determining relationships between corresponding filter-fields in the given pair of network service rules; if all of the filter-fields are disjoint, determining that the given pair of network service rules does not conflict; and if at least one of the filter-field relationships is not disjoint,
determining that the given pair of network service rules does conflict, and determining a conflict relationship between the pair of conflicting network service rules by combining the filter-field relationships.
- 17. The computer-readable storage medium of claim 16, wherein determining a priority relationship between a given pair of conflicting network service rules involves considering a priority policy as well as the conflict relationship between the pair of conflicting network service rules.
- 18. The computer-readable storage medium of claim 11, wherein each of the network service rules specifies:
a filter that defines a class of packets in the packet flow; and an action that defines an operation to be applied to the class of packets.
- 19. The computer-readable storage medium of claim 18, wherein an operation defined by a network service rule can include, but is not limited to:
dropping a packet; gathering statistical information about the packet; controlling timer functions associated with the packet; modifying the packet; and passing the packet on.
- 20. The computer-readable storage medium of claim 11, wherein the multiple network services can include, but is not limited to:
a firewall service; a service level agreement monitoring service; a load balancing service; a transport matching service; a failover service; and a high availability service.
- 21. An apparatus that resolves conflicts between rules for network services, comprising:
an input configured to receive a set of network service rules for network data traffic from multiple network services, wherein network service rules from different network services can possibly conflict; and a resolving mechanism that resolves conflicts between network service rules in the set of network service rules, wherein the resolving mechanism is configured to,
identify conflicts between pairs of network service rules in the set of network service rules, determine a priority relationship between each pair of conflicting network service rules, and to assign priorities to network service rules in the set of network service rules in a manner consistent with the determined priority relationships, thereby allowing conflicts between network service rules to be subsequently resolved based on the assigned priorities.
- 22. The apparatus claim 21, further comprising an on-line processing mechanism configured to:
receive an additional network service rule at run time; identify any conflicts that may exist between the additional network service rule and existing rules in the set of network service rules; determine a priority relationship between the additional network service rule and any conflicting network service rules that may exist; assign a priority to the additional network service rule; and to reassign priorities, if necessary, to existing network service rules in the set of network service rules.
- 23. The apparatus of claim 21, wherein while assigning the priorities to the network service rules, the resolving mechanism is configured to:
create a vertex in a graph for each network service rule in the set of network service rules, insert a directed edge into the graph between vertices associated with each pair of conflicting network service rules, wherein the directed edge points from a vertex associated with a lower priority network service rule to a vertex associated with a higher priority network service rule in accordance the determined priority relationship between the pair of conflicting network service rules; perform a topological sort on the graph; traverse vertices of the graph in sorted order, and to assign priorities to network service rules associated with the vertices in a manner consistent with the determined priority relationships between pairs of conflicting network service rules.
- 24. The apparatus of claim 23, wherein while assigning priorities to network service rules, the resolving mechanism is configured to:
assign a priority of one to a network service rule, if the network service rule is associated with a vertex that has no directed edges pointing to other vertices; and if a network service rule is associated with a vertex that has one or more directed edges pointing to other vertices, to
determine a maximum priority for network service rules associated with the other vertices, and to assign a priority of one plus the maximum priority to the network service rule.
- 25. The apparatus of claim 21, further comprising a flow enforcement mechanism configured to install a set of low-level flow rules produced from the prioritized network service rules into a flow enforcement device, which applies the set of flow rules to a packet flow received from a high-speed network connection;
whereby the network service rules from the multiple network services can be simultaneously applied to packet flow, instead of being separately applied by each network service.
- 26. The apparatus of claim 21, wherein while determining if a given pair of network service rules conflicts, the resolving mechanism is configured to:
determine relationships between corresponding filter-fields in the given pair of network service rules; if all of the filter-fields are disjoint, to determine that the given pair of network service rules does not conflict; and if at least one of the filter-field relationships is not disjoint, to
determine that the given pair of network service rules does conflict, and to determine a conflict relationship between the pair of conflicting network service rules by combining the filter-field relationships.
- 27. The apparatus of claim 26, wherein while determining a priority relationship between a given pair of conflicting network service rules, the resolving mechanism is configured to consider a priority policy as well as the conflict relationship between the pair of conflicting network service rules.
- 28. The apparatus of claim 21, wherein each of the network service rules specifies:
a filter that defines a class of packets in the packet flow; and an action that defines an operation to be applied to the class of packets.
- 29. The apparatus of claim 28, wherein an operation defined by a network service rule can include, but is not limited to:
dropping a packet; gathering statistical information about the packet; controlling timer functions associated with the packet; modifying the packet; and passing the packet on.
- 30. The apparatus of claim 21, wherein the multiple network services can include, but is not limited to:
a firewall service; a service level agreement monitoring service; a load balancing service; a transport matching service; a failover service; and a high availability service.
RELATED APPLICATION
[0001] The subject matter of this application is related to the subject matter in a co-pending non-provisional application by inventors Robert D. Bressler, Christoph L. Schuba and Michael F. Speer, entitled, “Method and Apparatus for Managing Packet Flows for Multiple Network Services,” having Ser. No. 10/329,016, and filing date 23 Dec. 2002 (Attorney Docket No. SUN-P9018-SPL).