Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Using Python Expressions in a Subscriber Reference Expression

    You can compose Python expressions from one or more of the fields in Table 1 for the definition of a subscriber reference expression of a fragment service. You enter these expressions with the expression option of the services scope name service name aggregate fragment or edit services global service name aggregate fragment statement.

    Table 1: Fields Used in Python Expressions for Aggregate Services

    Field

    Description

    substitution.<xyz>

    Value of the parameter <xyz>.

    Substitutions are acquired by means of the regular acquisition path for service sessions.

    The names of parameters are restricted to valid Python identifiers, such as ‘ALPHA/” _” *(ALPHA/ DIGIT/” _” )’, with the exception of keywords, such as for, if, while, return, and, or, not, def, class, try, exceptFor the full list of Python keywords, see https://docs.python.org/2/library/.

    loginType

    The type of subscriber session, one of the following:

    • ASSIGNEDIP—An assigned IP login is triggered when an application accesses a subscriber object for an assigned IP subscriber that is not currently loaded into memory.
    • AUTHINTF—An authenticated interface login is triggered when an interface responds to authentication, such as authentication for a PPP session.
    • INTF—An interface login is triggered when an interface comes up and the interface classifier script determines that the SAE should manage that interface, unless the interface comes up as a result of an authenticated PPP session.
    • ADDR—An address login is triggered when the DHCP server in the router running JunosE Software provides a token IP address.
    • AUTHADDR—An authenticated address login is triggered when the DHCP server in the router running JunosE Software provides a public IP address.
    • PORTAL—A portal login is triggered when the portal API is invoked by a JSP webpage to login a subscriber.

    loginName

    Login name provided by a subscriber

    userName

    Username portion of the loginName

    domainName

    Domain name portion of the loginName

    serviceBundle

    Content of the vendor-specific RADIUS attribute for service bundle

    radiusClass

    RADIUS class used for authorization

    virtualRouterName

    Name of virtual router in the format vrname@hostname

    interfaceName

    Name of the interface

    ifAlias

    Description of the interface configured on the router

    ifDesc

    Alternate name for the interface. This is the name used by the Simple Network Management Protocol (SNMP).

    On a router running JunosE Software, the format of the description is:

    ip<slot>/<port>.<subinterface>

    On a router running Junos OS, ifDesc is the same as interfaceName.

    interfaceType

    Type of the interface. The values could be IP for IPv4; IPV6 for IPv6; IP,IPV6 for dual-stack interface.

    nasPortId

    Port identifier of an interface, including the interface name and additional layer 2 information (for example, fastEthernet 3/1)

    macAddress

    Text representation of the MAC address for the DHCP subscriber (for example. 00:11:22:33:44:55)

    retailerDn

    Distinguished name of the retailer

    nasIp

    Network access server IP address of the router

    dhcp

    DHCP options. See Classification Scripts Overview.

    primaryUserName

    PPP or DHCP username. This name does not change when the subscriber logs in through a portal.

    framedIpv6Prefix

    Configures a condition that uses the IPv6 address prefix.

    framedIpv6Prefix is available for JunosE (COPS-PR), Junos OS (JSRC), as well as AAA (COA).

    delegatedIpv6Prefix

    Delegated IPv6 prefix for the subscriber.

    Using the delegatedIpv6Prefix attribute, the NAS can receive a set of IPv6 prefixes that are delegated to subscribers. An IPv6 subscriber can be identified through multiple prefixes by using the delegatedIpv6Prefix attribute with the framedIpv6Prefix attribute.

    delegatedIpv6Prefix is available for Junos OS (JSRC), AAA (COA), and DHCPv6 subscribers on the JunosE router.

    Modified: 2016-12-29