Dynamic Variables Overview
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.
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 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 Predefined Internal Variables
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 1 provides a list
of predefined variables, their descriptions, and where in the JUNOS
hierarchy you can configure them.
Table 1: JUNOS Predefined Internal
Variables and Definitions
| Variable | Definition |
| Subscriber Interfaces — Static VLAN Interfaces |
|
$junos-interface-ifd-name
|
Name of the dynamic interface to which the subscriber access
client connects. Its primary use is in creating single or multiple
subscribers on a statically created interface. You specify this variable
at the [dynamic-profiles profile-name interfaces] hierarchy level.
|
|
$junos-underlying-interface-unit
|
Unit number for the underlying interface. It specifies the use
of the underlying interface for the subscriber. You specify this variable
at the [dynamic-profiles profile-name interfaces $junos-interface-ifd-name] hierarchy for the unit statement.
|
| Subscriber Interfaces — Dynamic IP Demux Interfaces |
|
$junos-interface-unit
|
Creates a unit number for a dynamic demux interface. DHCP supplies
this information when the subscriber logs in. You specify this variable
at the [dynamic-profiles profile-name interfaces
demux0] hierarchy level for the unit statement.
|
|
$junos-subscriber-ip-address
|
IP address of the subscriber. You specify this variable at the [dynamic-profiles profile-name interfaces demux0 unit family inet demux-source] hierarchy level.
|
|
$junos-underlying-interface
|
Creates a logical underlying interface for a dynamic demux interface.
DHCP supplies this information when the subscriber logs in. You specify
this variable at the [dynamic profiles profile-name interfaces demux0 unit "$junos-interface-unit" demux-options] hierarchy level for the underlying-interface statement.
When configured, the underlying interface is used to determine
the $junos-underlying-interface, $junos-underlying-interface-unit, and $junos-ifd-name variables. For example, if the receiving
logical interface is ge-0/0/0.1, the $junos-underlying-interface variable is set to ge-0/0/0 and the $junos-underlying-interface-unit variable is set to 1.
|
| Dynamic Protocols |
|
$junos-interface-name
|
Name of the dynamic interface to which the subscriber access
client connects. Its use is in dynamically enabling IGMP on the subscriber
interface. You specify this variable at the [dynamic-profiles profile-name protocols igmp] hierarchy level for
the interface statement.
The interface name is derived from concatenating the $junos-interface-ifd-name and the $junos-underlying-interface-unit variables obtained when a subscriber is created dynamically at the [dynamic-profiles profile-name interfaces] hierarchy level.
|
| Dynamic CoS — RADIUS-obtained Scheduler-Map
Name and Traffic-Shaping Parameters |
|
$junos-cos-scheduler-map
|
Scheduler-map name configured in a traffic-control profile in
a dynamic profile for used for subscriber access. The JUNOS software
obtains this information from the RADIUS server when a subscriber
authenticates over the static or dynamic subscriber interface to which
the dynamic profile is attached.
You reference this variable in the scheduler-map statement
at the [edit dynamic-profiles profile-name class-of-service traffic-control-profiles profile-name] hierarchy level.
NOTE: The scheduler map can be defined dynamically
(at the [edit dynamic-profiles profile-name class-of-service scheduler-maps] hierarchy level) or statically
(at the [edit class-of-service scheduler-maps] hierarchy
level).
|
|
$junos-cos-shaping-rate
|
Shaping rate configured in a traffic-control profile in a dynamic
profile for subscriber access. The JUNOS software obtains this information
from the RADIUS server when a subscriber authenticates over the static
or dynamic subscriber interface to which the dynamic profile is attached.
You reference this variable in the shaping-rate statement
at the [edit dynamic-profiles profile-name class-of-service traffic-control-profiles profile-name] hierarchy level.
|
|
$junos-cos-guaranteed-rate
|
Guaranteed rate configured in a traffic-control profile in a
dynamic profile for subscriber access. The JUNOS software obtains
this information from the RADIUS server when a subscriber authenticates
over the static or dynamic subscriber interface to which the dynamic
profile is attached.
You reference this variable in the guaranteed-rate statement
at the [edit dynamic-profiles profile-name class-of-service traffic-control-profiles profile-name] hierarchy level.
|
|
$junos-cos-delay-buffer-rate
|
Delay-buffer rate configured in a traffic-control profile in
a dynamic profile for subscriber access. The JUNOS software obtains
this information from the RADIUS server when a subscriber authenticates
over the static or dynamic subscriber interface to which the dynamic
profile is attached.
You reference this variable in the delay-buffer-rate statement at the [edit dynamic-profiles profile-name class-of-service traffic-control-profiles profile-name] hierarchy level.
|
| Dynamic CoS — RADIUS-obtained Scheduler Name
and Parameters |
|
$junos-cos-scheduler
|
Name of a scheduler configured in a dynamic profile for subscriber
access. The JUNOS software obtains this information from the RADIUS
server when a subscriber authenticates over the static or dynamic
subscriber interface to which the dynamic profile is attached.
You reference this variable at the [edit dynamic-profiles profile-name class-of-service schedulers] hierarchy
level.
|
|
$junos-cos-scheduler-tx
|
Transmit rate specified for a scheduler configured in a dynamic
profile for subscriber access. The JUNOS software obtains this information
from the RADIUS server when a subscriber authenticates over the static
or dynamic subscriber interface to which the dynamic profile is attached.
You reference this variable in the transmit-rate statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name] hierarchy level.
|
|
$junos-cos-scheduler-bs
|
Buffer size as a percentage of total buffer, specified for a
scheduler configured in a dynamic profile for subscriber access. The
JUNOS software obtains this information from the RADIUS server when
a subscriber authenticates over the static or dynamic subscriber interface
to which the dynamic profile is attached.
You reference this variable in the buffer-size statement
with the percent option at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name] hierarchy level.
|
|
$junos-cos-scheduler-pri
|
Packet-scheduling priority value specified for a scheduler configured
in a dynamic profile for subscriber access. The JUNOS software obtains
this information from the RADIUS server when a subscriber authenticates
over the static or dynamic subscriber interface to which the dynamic
profile is attached.
You reference this variable in the priority statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name] hierarchy level.
|
|
$junos-cos-scheduler- dropfile-low
|
Name of the drop profile for random early detection (RED) for
loss-priority level low specified for a scheduler configured
in a dynamic profile for subscriber access. The JUNOS software obtains
this information from the RADIUS server when a subscriber authenticates
over the static or dynamic subscriber interface to which the dynamic
profile is attached.
You reference this variable in the drop-profile statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name drop-profile-map
loss-priority low protocol any] hierarchy level.
NOTE: The drop profile must be configured statically
(at the [edit class-of-service drop-profiles] hierarchy level)
for loss-priority low.
|
|
$junos-cos-scheduler- dropfile-medium-low
|
Name of the drop profile for random early detection (RED) for
loss-priority level medium-low specified for a scheduler
configured in a dynamic profile for subscriber access. The JUNOS software
obtains this information from the RADIUS server when a subscriber
authenticates over the static or dynamic subscriber interface to which
the dynamic profile is attached.
You reference this variable in the drop-profile statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name drop-profile-map
loss-priority medium-low protocol any] hierarchy level.
NOTE: The drop profile must be configured statically
(at the [edit class-of-service drop-profiles] hierarchy level).
|
|
$junos-cos-scheduler- dropfile-medium-high
|
Name of the drop profile for random early detection (RED) for
loss-priority level medium-high specified for a scheduler
configured in a dynamic profile for subscriber access. The JUNOS software
obtains this information from the RADIUS server when a subscriber
authenticates over the static or dynamic subscriber interface to which
the dynamic profile is attached.
You reference this variable in the drop-profile statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name drop-profile-map
loss-priority medium-high protocol any] hierarchy level.
NOTE: The drop profile must be configured statically
(at the [edit class-of-service drop-profiles] hierarchy level).
|
|
$junos-cos-scheduler-dropfile-high
|
Name of the drop profile for random early detection (RED) for
loss-priority level high specified for a scheduler configured
in a dynamic profile for subscriber access. The JUNOS software obtains
this information from the RADIUS server when a subscriber authenticates
over the static or dynamic subscriber interface to which the dynamic
profile is attached.
You reference this variable in the drop-profile statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name drop-profile-map
loss-priority high protocol any] hierarchy level.
NOTE: The drop profile must be configured statically
(at the [edit class-of-service drop-profiles] hierarchy level).
|
|
$junos-cos-scheduler-dropfile-any
|
Name of the drop profile for random early detection (RED) for
loss-priority level any specified for a scheduler configured
in a dynamic profile for subscriber access. The JUNOS software obtains
this information from the RADIUS server when a subscriber authenticates
over the static or dynamic subscriber interface to which the dynamic
profile is attached.
You reference this variable in the drop-profile statement
at the [edit dynamic-profiles profile-name class-of-service schedulers scheduler-name drop-profile-map
loss-priority any protocol any] hierarchy level.
NOTE: The drop profile must be configured statically
(at the [edit class-of-service drop-profiles] hierarchy level).
|
User-Defined Variables
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.