# Example: PPP Interfaces Hierarchical Policy Configuration

Figure 18 shows the following example:

- Two dual-stack PPP user sessions are configured over the same VLAN interface.
- Each PPP session corresponds to a dynamic user.
- Each PPP user can send a combined IPv4 and IPv6 video traffic with a maximum rate of 1 Mbps.
- One of the subscribers, PPP user1, can send a default maximum rate of 3 Mbps combined IPv4/IPv6 session traffic, whereas the other subscriber, PPP user2, can send a default maximum rate of 5 Mbps combined IPv4/IPv6 session traffic.
- I1 and I3 are interfaces where IPv4 policies are attached.
- I2 and I4 are interfaces where IPv6 policies are attached.
- PPP 1 is the PPP session of dynamic subscriber 1. I1 and I2 belong to this subscriber.
- PPP 2 is the PPP session of dynamic subscriber 2. I3 and I4 belong to this subscriber.
- vlan denotes the VLAN interface over which subscribers are configured.

This example uses the following:

- At I1 and I3:
  - Classified Video Flow. VIDEO_RATE, Committed Rate: 1 Mbps
  - Peak Rate: 0 Mbps
  - Committed Action: transmit unconditional
  - Conformed Action: drop
  - Exceeded Action: drop
- At I2 and I4:
  - Classified Video Flow. VIDEO_RATE, Committed Rate: 1 Mbps
  - Peak Rate: 0 Mbps
  - Committed Action: transmit unconditional
  - Conformed Action: drop
  - Exceeded Action: drop

All classified video flow policers over each PPP interface feed into a single policer with the following configuration:

- At I1 and I3:
  - All Flows. SESSION_RATE, Committed Rate: 3 Mbps
  - Peak Rate: 0 Mbps
  - Committed Action: transmit conditional
  - Conformed Action: drop
  - Exceeded Action: drop
  - At I2 and I4:
    - All Flows. SESSION_RATE, Committed Rate: 5Mbps
    - Peak Rate: 0 Mbps
    - Committed Action: transmit conditional
    - Conformed Action: drop
    - Exceeded Action: drop

  Figure 18: Interface Stack for Hierarchical Policy Configuration

1. Create a hierarchical policy parameter list for PPP interfaces.
   host1(config)#policy-parameter P1_PPP hierarchical host1(config-policy-parameter)#exit
2. Create a reference rate parameter to be used in external parent groups associated with PPP sessions.
   host1(config)#policy-parameter sessionRlpRate reference-rate host1(config-policy-parameter)#reference-rate 3000000 host1(config-policy-parameter)#exit
3. Create an aggregate session rate-limit (using reference-rate) that can be shared between IPv4 and IPv6 interfaces of each PPP session. Create an external parent group to hold this rate-limit.
   host(config)#rate-limit-profile SESSION_AGG two-rate hierarchical host(config-rate-limit-profile)#committed-rate sessionRlpRate percent 100 host(config-rate-limit-profile)#committed-action transmit conditional host(config-rate-limit-profile)#exit
   host(config)#parent-group EPG_SESSION host(config-parent-group)#rate-limit-profile SESSION_AGG host(config-parent-group)#exit
4. Create an aggregate video rate-limit that can be shared between IPv4 and IPv6 interfaces of each PPP session. Create an external parent group to hold this rate-limit.
   host(config)#rate-limit-profile VIDEO_AGG two-rate hierarchical host(config-rate-limit-profile)#committed-rate 1000000 host(config-rate-limit-profile)#committed-action transmit unconditional host(config-rate-limit-profile)#exit
   host(config)#parent-group EPG_VIDEO host1(config-parent-group)#next-parent EPG_SESSION parameter P1_PPP host(config-parent-group)#rate-limit-profile VIDEO_AGG host(config-parent-group)#exit
5. Create IPv4/ IPv6 policy-lists to be attached to all PPP sessions.
   host(config)#ip policy-list IP_POL1 host(config-policy-list)#classifier-group VIDEO_CLACL_V4 external parent-group EPG_VIDEO parameter P1_PPP host(config-policy-list-classifier-group)#forward host(config-policy-list-classifier-group)#exit host(config-policy-list)#classifier-group * external parent-group EPG_SESSION parameter P1_PPP host(config-policy-list-classifier-group)#forward host(config-policy-list-classifier-group)#exit host(config-policy-list)#exit
   host(config)#ipv6 policy-list IP_POL2 host(config-policy-list)#classifier-group VIDEO_CLACL_V6 external parent-group EPG_VIDEO parameter P1_PPP host(config-policy-list-classifier-group)#forward host(config-policy-list-classifier-group)#exit host(config-policy-list)#classifier-group * external parent-group EPG_SESSION parameter P1_PPP host(config-policy-list-classifier-group)#forward host(config-policy-list-classifier-group)#exit host(config-policy-list)#exit
6. Specify the policy parameter and attachments through the profile.
   host(config)#profile PPPOE_PROF1 host(config-profile)#ip policy-parameter hierarchical P1_PPP ppp-interface host(config-profile)#ip policy input IP_POL1 sta enabled merge host(config-profile)#ipv6 policy-parameter hierarchical P1_PPP ppp-interface host(config-profile)#ipv6 policy input IP_POL2 sta enabled merge host(config-profile)#exit
7. Use another profile for the second subscriber to specify a different session rate of 5 Mbps by overriding the default rate of 3 Mbps , and specify the policy parameter through the profile.
   host(config)#profile PPPOE_PROF2 host(config-profile)#ip policy-parameter hierarchical P1_PPP ppp-interface host(config-profile)#ip policy input IP_POL1 sta enabled merge host(config-profile)#ipv6 policy-parameter hierarchical P1_PPP ppp-interface host(config-profile)#ipv6 policy input IP_POL2 sta enabled merge host(config-profile)#ip policy-parameter reference-rate sessionRlpRate 5000000 host(config-profile)#ipv6 policy-parameter reference-rate sessionRlpRate 5000000 host(config-profile)#exit
8. Configure the VLAN, PPPoE, and PPP encapsulation and specify unique profile to use for each PPP user.
   host(config)#interface gig 2/1/0.1 host(config-interface)#vlan id 1 host(config-interface)#encapsulation pppoe host(config)#interface gig 2/1/0.1.1 host(config-interface)#encapsulation ppp host(config-interface)#profile PPPOE_PROF1 host(config)#interface gig 2/1/0.1.2 host(config-interface)#encapsulation ppp host(config-interface)#profile PPPOE_PROF2 host(config-interface)#exit

| Note: You can optionally specify an aggregation node for a policy parameter during its definition in Global Configuration mode. This example configures parameters at the interface level. However, you can also configure these same settings at the global level, without defining them at the interface or profile level. This feature supports both these methods of configurations.