Cisco ASR 9000 Series Aggregation Services Router Broadband Network Gateway Command Reference, Release 5.1.x
Dynamic Template Commands
Downloads: This chapterpdf (PDF - 1.35MB) The complete bookPDF (PDF - 4.62MB) | Feedback

Dynamic Template Commands

Dynamic Template Commands

This module describes the Cisco IOS XR software commands used to configure the Dynamic Template commands for Broadband Network Gateway (BNG) on the Cisco ASR 9000 Series Router. For details regarding the related configurations, refer to the Cisco ASR 9000 Series Aggregation Services Router Broadband Network Gateway Configuration Guide.

dynamic-template

To group a set of configuration items that can be applied to a group of subscribers and to enter the dynamic-template configuration mode, use the dynamic-template command in the Global Configuration mode. To disable this feature and exit the dynamic-template configuration mode, use the no form of this command.

dynamic-template type { ipsubscriber name | ppp name | service name }

no dynamic-template

Syntax Description

type

Specifies the type of templates, for example, ppp or ipsubscriber or service.

name

Specifies the name of the dynamic template type.

ipsubscriber

Specifies the ipsubscriber dynamic template type.

ppp

Specifies the ppp dynamic template type.

service

Specifies the service dynamic template type.

Command Default

None

Command Modes

Global Configuration
mode

Command History

Release Modification

Release 4.2.0

This command was introduced.

Usage Guidelines

Use the dynamic-template command to enter dynamic template configuration mode.

Task ID

Task ID Operation

config-services

read, write

Examples

This is an example of configuring the dynamic-template command in the Global Configuration mode:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template
RP/0/RSP0/CPU0:router(config-dynamic-template)# 

Related Commands

Command

Description

dynamic-template type ppp

Enables the ppp dynamic template type.

dynamic-template type ipsubscriber

Enables the ipsubscriber dynamic template type.

dynamic-template type service

Enables the service dynamic template type.

dynamic-template type ipsubscriber

To group a set of configuration items that can be applied to a group of subscribers based on the ipsubscriber template type and to enter the dynamic-template configuration mode, use the dynamic-template type ipsubscriber command. To disable this feature and exit the dynamic-template configuration mode, use the no form of this command.

dynamic-template type ipsubscriber template-name

no dynamic-template type ipsubscriber template-name

Syntax Description

template-name

Specifies the dynamic template name.

Command Default

None

Command Modes

Dynamic template configuration mode

Command History

Release Modification

Release 4.2.0

This command was introduced.

Usage Guidelines

Use the dynamic-template command to enter dynamic template configuration mode.

Task ID

Task ID Operation

config-services

read, write

Examples

This is an example of configuring the dynamic-template type ipsubscriber command:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template
RP/0/RSP0/CPU0:router(config-dynamic-template)# type ipsubscriber ipsub1

Related Commands

Command

Description

dynamic-template

Enables the dynamic template configuration mode.

dynamic-template type ppp

Enables the ppp dynamic template type.

dynamic-template type service

Enables the service dynamic template type.

dynamic-template type ppp

To group a set of configuration items that can be applied to a group of subscribers based on the ppp template type and to enter the dynamic-template configuration mode, use the dynamic-template type ppp command. To disable this feature and exit the dynamic-template configuration mode, use the no form of this command.

dynamic-template type ppp template-name

no dynamic-template type ppp template-name

Syntax Description

template-name

Specifies the dynamic template name.

Command Default

None

Command Modes

Dynamic template configuration mode

Command History

Release Modification

Release 4.2.0

This command was introduced.

Usage Guidelines

Use the dynamic-template command to enter dynamic template configuration mode.

Task ID

Task ID Operation

config-services

read, write

Examples

This is an example of configuring the dynamic-template type ppp command:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template
RP/0/RSP0/CPU0:router(config-dynamic-template)# type ppp p1

Related Commands

Command

Description

dynamic-template

Enables the dynamic template configuration mode.

dynamic-template type ipsubscriber

Enables the ipsubscriber dynamic template type.

dynamic-template type service

Enables the service dynamic template type.

dynamic-template type service

To group a set of configuration items that can be applied to a group of subscribers based on the service template type and to enter the dynamic-template configuration mode, use the dynamic-template type service command. To disable this feature and exit the dynamic-template configuration mode, use the no form of this command.

dynamic-template type service template-name

no dynamic-template type service template-name

Syntax Description

template-name

Specifies the dynamic template name.

Command Default

None

Command Modes

Dynamic template configuration mode

Command History

Release Modification

Release 4.2.0

This command was introduced.

Usage Guidelines

Use the dynamic-template command to enter dynamic template configuration mode.

Task ID

Task ID Operation

config-services

read, write

Examples

This is an example of configuring the dynamic-template type service command:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template
RP/0/RSP0/CPU0:router(config-dynamic-template)# type service s1

Related Commands

Command

Description

dynamic-template

Enables the dynamic template configuration mode.

dynamic-template type ppp

Enables the ppp dynamic template type.

dynamic-template type ipsubscriber

Enables the ipsubscriber dynamic template type.

monitor-session (interface-dynamic-template-BNG)

To associate a traffic mirroring session with a specific interface, use the monitor-session command in interface configuration mode or dynamic-template configuration mode. To remove the association between a traffic mirroring session and an interface, use the no form of this command.

monitor-session session-name [ direction { rx-only | tx-only } ]

no monitor-session session-name [ direction { rx-only | tx-only } ]

Syntax Description

session-name

Name of the monitor session to configure.

direction

Specifies that traffic replication is in only one direction.

rx-only

Specifies that only ingress traffic is replicated.

tx-only

Specifies that only egress traffic is replicated.

Command Default

Replicates both ingress and egress traffic.

Command Modes

Interface configuration

Dynamic template configuration (for BNG)

Command History

Release

Modification

Release 3.9.1

This command was introduced.

Release 4.0.0

The acl and mirror first keywords were added.

Release 5.1

The support for this command under dynamic-template configuration mode was added for BNG.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Before you can associate a traffic mirroring session to a specific interface, you must define it using the monitor-session global configuration command. After the traffic mirroring session is defined, use the monitor-session interface configuration command or dynamic template configuration command to associate this session with a specific source interface. For BNG sessions, the subscriber is attached to the monitor session, only when the dynamic template is applied to the subscriber. When the session is associated, all specified traffic on the interface is then replicated to the destination location defined in the monitor session configuration.

The monitor-session interface configuration command also enters monitor session configuration mode for you to configure additional features of the mirroring session.

Task ID

Task ID

Operations

interface

read, write

config-services

read, write

Examples

This example shows how to enter monitor session configuration mode:

RP/0/RSP0/CPU0:router# configure 
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet0/0/0/11
RP/0/RSP0/CPU0:router(config-if)# l2transport 
RP/0/RSP0/CPU0:router(config-if-l2)# monitor-session mon1
RP/0/RSP0/CPU0:router(config-if-mon)#
   

This example shows how to configure monitor-session command in the dynamic-template configuration mode for BNG:

RP/0/RSP0/CPU0:router# configure 
RP/0/RSP0/CPU0:router(config)# dynamic-template type ppp ppp_template
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# monitor-session mon1 direction rx-only 
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# acl
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# mirror first 100

service-policy (BNG)

To associate a service-policy to the dynamic template, use the service-policy command in the dynamic template configuration mode. To disable this feature, use the no form of this command.

service-policy { input | output | type } service-policy_name [acct-stats] [ merge seq_num ]

no service-policy

Syntax Description

input

Configures an ingress service-policy.

output

Configures an egress service-policy.

type

Creates the service policy for policy-based routing (PBR).

service-policy_name

Name of the service policy.

acct-stats

(Optional) Enables service accounting.

merge

(Optional) Enables the policy to be merged.

seq_num

Sequence number of the policy. Range is from 0 to 255.

Command Default

None

Command Modes

Dynamic template configuration mode

Command History

Release Modification

Release 4.2.0

This command was introduced.

Release 4.3.0

Support was added for policy based routing.

Release 4.3.1

acct-stats and merge keywords were added to support service accounting and policy merge features.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Use the dynamic-template type ppp command to enter the ppp dynamic template type configuration mode.

Task ID

Task ID Operation

qos

read, write

Examples

This is an example of configuring the service-policy command in the dynamic template configuration mode:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template type ppp p1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# accounting aaa list default type session periodic-interval 60 dual-stack-delay 1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy input i1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy output o1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy type pbr pbr_policy

This example shows how to enable service accounting feature in the dynamic template configuration mode using service-policy command:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template type service s1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# accounting aaa list l1 type service periodic-interval 500
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# ipv4 access-group ACL1 
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy input QoS1 acct-stats
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy output QoS2 acct-stats

This example shows how to merge policy maps using service-policy command in the dynamic template configuration mode:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template type service MyService
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy input i1 merge 20
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# service-policy output o1 merge 30

Related Commands

Command

Description

dynamic-template

Enables the dynamic template configuration mode.

dynamic-template type ppp

Enables the ppp dynamic template type.

dynamic-template type ipsubscriber

Enables the ipsubscriber dynamic template type.

accounting aaa list type service

Configures service accounting feature.

test radius coa activate

To enable Traffic Mirroring, also known as Switch Port Analyzer (SPAN), on a BNG subscriber interface, use the test radius coa activate command in EXEC mode. To disable SPAN, use the deactivate form of this command.

test radius coa activate service name acct-ses-id id

test radius coa deactivate service name acct-ses-id id

Syntax Description

service

Specifies the service to be activated or de-activated.

name

Name of the service, which is same as the dynamic-template name.

acct-ses-id

Specifies the accounting session ID of the subscriber on which the template is to be activated or de-activated.

id

ID of the accounting session, in hexadecimal format .

Command Default

None

Command Modes

EXEC mode

Command History

Release Modification

Release 5.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Configure monitor sessions (using monitor-session command in Global Configuration mode) and configure source interface attachment to a monitor session (using dynamic templates), as a pre-requisite for executing test radius coa activate command.

Task ID

Task ID Operation

network

read, write

Examples

This example shows how to enable SPAN on BNG subscriber interface by associating a dynamic template with a specific subscriber :

RP/0/RSP0/CPU0:router# test radius coa activate acct-ses-id 0x00000001 service service1

This example shows how to disable SPAN on BNG subscriber interface by dis-associating a dynamic template with a specific subscriber :

RP/0/RSP0/CPU0:router# test radius coa deactivate acct-ses-id 0x00000001 service service1

Related Commands

Command

Description

monitor-session

Defines a traffic mirroring session and enters monitor session configuration mode.

monitor-session (interface-dynamic-template-BNG)

Associates a traffic mirroring session with a specific interface or dynamic template.

show monitor-session status

Displays status information about configured traffic mirroring sessions.

show monitor-session counters

Displays statistics regarding traffic mirroring sessions.

clear monitor-session counters

Clears the traffic mirroring session statistics.

timeout idle

To configure an idle timeout period for the IPoE and PPPoE subscriber sessions on BNG, use the timeout idle command in dynamic template type configuration mode. To disable this feature, use the no form of this command.

timeout idle seconds [ threshold rate ] [ traffic { both | inbound | outbound } ]

no timeout idle seconds [ threshold duration ] [ traffic { both | inbound | outbound } ]

Syntax Description

seconds

Idle timeout value for the subscriber sessions, in seconds.

The range is from 60 to 4320000.

threshold

Configures a threshold to track the duration of session idleness.

duration

Duration of threshold, in minute(s) per packet.

The range is from 1 to 10000. Default is 0.

Note   

This value should be less than the idle timeout value.

traffic

Considers the direction of traffic while deriving the duration of session idleness.

The default is inbound direction.

both

Considers inbound and outbound traffic while deriving the duration of session idleness.

inbound

Considers inbound traffic only while deriving the duration of session idleness.

outbound

Considers outbound traffic only while deriving the duration of session idleness.

Command Default

None

Command Modes

Dynamic template type configuration

Command History

Release Modification

Release 4.2.1

This command was introduced.

Release 5.1

The support for threshold and traffic keywords were added.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

In Cisco IOS XR software release 4.2.1, both the IPoE and PPPoE sessions are retained idle, when the idle timeout period expires. In Cisco IOS XR software release 4.2.3, only the IPoE sessions are terminated when the idle timeout period expires. Whereas, the PPPoE sessions are retained idle. From Cisco IOS XR software release 5.1.0 and later, both IPoE and PPPoE sessions are terminated on the expiry of the idle timeout period.

If packets sent or received by BNG, in the configured threshold interval is less than that threshold value, then that particular session is considered idle. For instance, if the threshold is configured as 2 packets/minute, and, if the number of packets received in every 2 minutes is only less than 2 (either 0 or 1), then that particular session is considered as idle. Whereas, if the number of packets received is 2 or above, then that session is considered as active.

By default, the sessions are disconnected if the threshold is not configured.

Task ID

Task ID Operation

config-services

read, write

Examples

This example shows how to configure an idle timeout of 200 seconds, with a threshold of 2 minutes/packet and considering inbound and outbound traffic for determining the duration of session idleness:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template type ppp ppp1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# timeout idle 200 threshold 2 traffic both

Related Commands

Command

Description

show subscriber feature accounting

Displays the feature accounting information of the subscriber.  

vrf (dynamic-template-BNG)

To set the vrf in which the interface operates, use the vrf command in the dynamic template type configuration mode. To disable the VRF, use the no form of this command.

vrf vrf-name

no vrf

Syntax Description

vrf_name

Specifies the name of the vrf.

Command Default

None

Command Modes

Dynamic template type configuration mode

Command History

Release Modification

Release 4.2.0

This command was introduced.

Usage Guidelines

Use the dynamic-template command to enter dynamic template configuration mode.

Task ID

Task ID Operation

config-services

read, write

Examples

This is an example of configuring the vrf command in the dynamic template type configuration mode:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# dynamic-template
RP/0/RSP0/CPU0:router(config-dynamic-template)# type service s1
RP/0/RSP0/CPU0:router(config-dynamic-template-type)# vrf vrf1

Related Commands

Command

Description

dynamic-template

Enables the dynamic template configuration mode.

dynamic-template type ppp

Enables the ppp dynamic template type.

dynamic-template type ipsubscriber

Enables the ipsubscriber dynamic template type.