Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Dynamic Variables Overview

Variables constitute the dynamic component of a dynamic profile. You use variables in dynamic profiles as placeholders for dynamically obtained or dynamically generated values that the dynamic profiles use to configure subscriber interfaces and provision subscribers.

How Dynamic Variables Work

Dynamic variables are data placeholders that you define and place in dynamic profiles. When a particular event occurs on an interface (for example, a DHCP client accesses the interface), the dynamic profiles obtain data to fill these placeholders from one of three sources—the interface receiving an incoming client data packet, an externally configured server (for example, RADIUS), or a value associated with each user-configurable variable.

For your convenience, Junos OS provides predefined variables that you can use within a dynamic profile. Most of these variables relate to interface-specific data obtained directly from the interface that receives an incoming client data packets (for example, interface name, interface unit value, and so on). When a client accesses the interface, the router software extracts the necessary interface data, propagates this data to the dynamic profile, and then uses the dynamic profile to configure the interface for the accessing client.

You can define user-defined variables for individual dynamic profiles at the [dynamic-profiles profile-name variables] hierarchy level. At this hierarchy level, you create an association between a variable value (for example, $junos-igmp-version) that appears in the body of the dynamic profile and data associated with that call value that is managed in an externally configured server (for example, a RADIUS VSA managed on a RADIUS server) or defined as a value in the variables stanza. When an event occurs on an interface to trigger the instantiation of a dynamic profile for the interface, Junos OS obtains values for each variable from an external server (for example, from RADIUS authentication and authorization VSAs) during the subscriber authentication process. At run time, the variables are replaced by these actual values and are used to configure the subscriber interface.

Default Values for Predefined Variables

You can optionally configure default values for many predefined variables. The Junos OS uses the default value in the following cases:

  • When the external RADIUS server is not available

  • When the VSA returned by the RADIUS server does not contain a value for the predefined variable

Unique Identifier (UID) for Parameterized Filters

Parameterized filters use unique identifiers (UIDs) in dynamic profiles created for services. The generated UIDs enable you to identify and configure separate parameter values for filters with the same variable name. In addition, assigning a UID improves performance of the router.

For service profiles, you can request the generation of a UID for a user-defined variable by including the uid statement at the [dynamic-profiles profile-name variables variable-name] hierarchy level. You then reference the variable name in the filter.

To enable selection of a particular filter in a dynamic profile that contains multiple variables of the same parameter and criteria type, you must indicate that the variable refers to a UID. To configure, include the uid-reference statement at the [dynamic-profiles profile-name variables variable-name] hierarchy level. For example, if the variable $in-filter receives the value of “filter1” from RADIUS, the filter definition named $filter is used.