Variables constitute the dynamic component of a dynamic profile. You use variables in dynamic profiles as placeholders for dynamically obtained information that the dynamic profiles use to configure subscriber interfaces.
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 possible sources—the interface receiving an incoming client data packet, an externally configured server (for example, RADIUS), an internal default value associated with each user-configurable variable.
For your convenience, JUNOS provides several 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 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 call 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 default value in the variables stanza. When an event occurs on an interface to trigger the instantiation of a dynamic profile for the interface, the JUNOS router software obtains values for each variable from an external server (for example, from RADIUS authentication and authorization VSAs) during the subscriber authentication process or from the default value if he external server is not available or does not contain a value for the variable to use. At run time, the variables are replaced by these actual values and are used to configure the subscriber interface.
![]() |
Note: Most variables have a default value already configured in the JUNOS router software. The purpose of these defaults is to ensure that the dynamic profile contains a valid value if one is not created and assigned during dynamic profile configuration. However, we strongly recommend that you specifically define variables instead and not rely on the existence of an internal JUNOS default. |
JUNOS software contains several predefined variables. The dynamic profile obtains and replaces data for these variables from an incoming client data packet. You can specify these variables in the body of a dynamic profile without first having to define the variables at the [dynamic-profiles profile-name variables] hierarchy level. Table 17 provides a list of predefined variables, their descriptions, and where in the JUNOS hierarchy you can configure them.
Table 17: JUNOS Predefined Internal Variables and Definitions
JUNOS software enables you to configure variables at the [dynamic-profiles profile-name variables] hierarchy level and associate those variables with supported RADIUS VSAs. The dynamic profile obtains and replaces data for these variables 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 (obtained from default information on the router or from the RADIUS server) and are used to configure the subscriber interface.
For a complete list of supported RADIUS VSAs for which you can create variable associations, see RADIUS Attributes and Juniper Networks VSAs Supported by the AAA Service Framework.
You can also configure the user-defined variables with a default value. The default value provides a standalone configuration for the associated statement or a backup for the statement configuration if the RADIUS server is inaccessible or the VSA attribute does not contain a value.