# Example: Arbitrary Interface Groups Hierarchical Policy Configuration

In this example, there are four terminated sessions and their corresponding IP interfaces are I1, I2, I3, and I4. Figure 14 shows the following:

- Sessions I1 and I2 are for the same subscriber: I1 carries only voice traffic and I2 carries all other traffic for this subscriber
- Sessions I3 and I4 are for another subscriber.
- Voice traffic has a contracted minimum of 64 Kbps, but the combined voice and other traffic for each subscriber has a contracted maximum of 1 Mbps.
- Interfaces I1-I4 are interfaces where you can attach policies.

  Figure 14: Interface Stack for Arbitrary Interface Groups

This example uses the following:

- At I1 and I3:
  - VOICE_RATE, Committed Rate: 64 Kbps
  - Peak Rate: 0 Mbps
  - Committed Action: transmit unconditional
  - Conformed Action: drop
  - Exceeded Action: drop
- At I2 and I4:
  - No policer configured
  - I1 and I2 feed into a single policer with the following configuration: AGG, Committed Rate: 1 Mbps, Peak Rate: 0 Mbps, Committed Action: transmit, Conformed Action: drop, Exceeded Action: drop

    Figure 15: Arbitrary Interface Groups Configuration

1. Create an aggregate rate limit that can be shared across multiple interfaces. Create an external parent group to hold this rate limit.
   host1(config)#rate-limit-profile AGG two-rate hierarchical host1(config-rate-limit-profile)#committed-rate 1000000 host1(config-rate-limit-profile)#committed-action transmit final host1(config-rate-limit-profile)#exit
   host1(config)#parent-group EPG1 host1(config-parent-group)#rate-limit-profile AGG host1(config-parent-group)#exit
2. Create a policy list to be attached to all voice sessions.
   host1(config)#rate-limit-profile VOICE_RATE two-rate hierarchical host1(config-rate-limit-profile)#committed-rate 64000 host1(config-rate-limit-profile)#committed-action transmit unconditional host1(config-rate-limit-profile)#exit
   host1(config)#policy-parameter A hierarchical host1(config-policy-parameter)#exit
   host1(config)#ip policy-list IP_POL1 host1(config-policy-list)#classifier-group * external parent-group EPG1
   parameter A host1(config-policy-list-classifier-group)#rate-limit-profile VOICE_RATE host1(config-policy-list-classifier-group)#exit host1(config-policy-list)#exit
3. Create a policy list to attach to all other sessions.
   host1(config)#ip policy-list IP_POL2 host1(config-policy-list)#classifier-group * external parent-group EPG1
   parameter A host1(config-policy-list-classifier-group)#forward host1(config-policy-list-classifier-group)#exit host1(config-policy-list)#exit
4. Attach IP_POL1 to the voice session of first user and attach IP_POL2 to the other session for the same user. Specify the same ID for parameter A.
   host1(config)#interface fastEthernet 3/0.1 host1(config-interface)#vlan id 1 host1(config-interface)#exit
   host1(config)#interface ip 3/0.1.1 host1(config-interface)#ip policy-parameter hierarchical A 1 host1(config-interface)#ip policy input IP_POL1 statistics enable host1(config-interface)#exit
   host1(config)#interface fastEthernet 3/0.2 host1(config-interface)#vlan id 2 host1(config-interface)#exit
   host1(config)#interface ip 3/0.2.1 host1(config-interface)#ip policy-parameter hierarchical A 1 host1(config-interface)#ip policy input IP_POL2 statistics enable host1(config-interface)#exit
5. Attach IP_POL1 to the voice session of the second user and attach IP_POL2 to the other session for the same user. Specify a different ID for parameter A.
   host1(config)#interface ip 3/0.1.2 host1(config-interface)#ip policy-parameter hierarchical A 2 host1(config-interface)#ip policy input IP_POL1 statistics enable host1(config-interface)#exit
   host1(config)#interface ip 3/0.2.2 host1(config-interface)#ip policy-parameter hierarchical A 2 host1(config-interface)#ip policy input IP_POL2 statistics enable host1(config-interface)#exit