# Hierarchical Aggregation Nodes

An internal parent group configured within a policy defines a hierarchical aggregation node template. An attachment of this policy creates an aggregation node for each internal parent group in a policy. Aggregation nodes are scoped within a single attachment and cannot be shared beyond a single attachment. An aggregation node stores a single rate-limit instance and statistics for this rate-limit. Aggregate nodes can be shared between two or more classified flows within a single attachment using the classifier group and parent group association.

Rate-limit aggregation nodes extend beyond a single attachment so classified flows across two or more attachments can reference the same aggregation node to share a single rate-limit instance. You can use external parent groups and policy parameters for sharing aggregate nodes across policy attachments. Each external parent group reference in a policy is accompanied by a parameter that is resolved during the attachment of the policy to an interface. An external rate-limit aggregation node can be defined by the 4-tuple (slot, direction, external parent group name, parameter value). The slot is the logical number of the line module location and the direction can be ingress or egress at the line module.

When you use hierarchical aggregation nodes, be aware of the following:

- VR/VRF—The hierarchical aggregate nodes based on external parent groups are not virtual router sensitive. The configuration allows interfaces from different virtual routers to have the same parameter name to value mapping, in which case both interfaces could share the same aggregate node created by an external parent group.
- Direction of Traffic—Hierarchical aggregate nodes are direction sensitive. The configuration does not allow input and output traffic at an interface to share the same rate-limit instance. Even when the input and output policy attachments refer to the same external parent group and parameter value, two separate aggregate nodes are created for each direction.
- Line Module—You should use hierarchical aggregate nodes. Rate limits cannot be shared across different line modules or service modules. Even when you configure the same parameter name to the same value for an external parent group, different rate-limit instances are instantiated if the interfaces are on different line modules.