IN THIS PAGE
Configuring Pseudo–RADIUS Authorization Server Properties (SRC CLI)
Configuring the NIC Proxy for the Pseudo-RADIUS Authorization Server (SRC CLI)
Extracting RADIUS Attributes with the Pseudo–RADIUS Authorization Server (SRC CLI)
Configuring the COA Script Service for MX Series Routers (SRC CLI)
Configuring Parameters for the Script Service for MX Series Routers (SRC CLI)
Managing Subscriber Sessions on MX Series Routers (SRC CLI)
The following topics provide procedures that allow you to manage subscriber sessions on MX Series routers with the SRC CLI:
Configuring External Subscriber Monitor (SRC CLI)
Use External Subscriber Monitor to log in and log out authorized subscribers and to provide interim updates for authorized subscribers.
To configure External Subscriber Monitor as a pseudo–RADIUS accounting server:
- From configuration mode, access the configuration statement
that configures the local properties. user@host# edit slot 0 external-subscriber-monitor
- Configure the local properties for External Subscriber
Monitor.
If you are configuring the pseudo–RADIUS authorization server, specify the include-mac-address and include-interface-name options when configuring External Subscriber Monitor so that the MAC address and interface name attributes are included in the event notifications sent to the SAE.
[edit slot 0 external-subscriber-monitor]user@host# set ?For more information about configuring External Subscriber Monitor, see Configuring External Subscriber Monitor (SRC CLI).
Configuring Pseudo–RADIUS Authorization Server Properties (SRC CLI)
Tasks to configure the pseudo–RADIUS authorization server are:
Configuring the Pseudo–RADIUS Authorization Server (SRC CLI)
Configuring the Directory Connection Properties for the Subscriber Data
Configuring Directory Connection Properties for the Cached DHCP Profiles
Configuring the Pseudo–RADIUS Authorization Server (SRC CLI)
Use the following configuration statements to configure the pseudo–RADIUS authorization server:
To configure the pseudo–RADIUS authorization server:
- From configuration mode, access the configuration statement
that configures the pseudo–RADIUS authorization server. user@host# edit slot 0 external-subscriber-monitor radius-authorization
- Specify the listening port for RADIUS requests. [edit slot 0 external-subscriber-monitor radius-authorization]user@host# set port port
- (Optional) Specify the host address to bind to the pseudo–RADIUS
authorization server. Absence (or deletion) of this attribute means
binding it to a wildcard (*) address. [edit slot 0 external-subscriber-monitor radius-authorization]user@host# set local-address local-address
- (Optional) Specify whether to query the SAE for the number
of active subscribers for a given interface. If set to true, the response
to the RADIUS access request depends on the comparison between the
number of active subscriber sessions and the lease limit for the interface.
If the number of active subscriber sessions is less than the lease
limit, the response is the RADIUS access accept message without the
lease limit RADIUS attribute; otherwise, the response is the RADIUS
access accept message where the subscriber is not assigned an address.
If set to false, the response is the RADIUS access accept message
with the lease limit RADIUS attribute. If the lease limit RADIUS vendor-specific
attribute is returned, the MX Series router verifies the lease limit. [edit slot 0 external-subscriber-monitor radius-authorization]user@host# set check-lease-limit-with-sae
- (Optional) Specify whether to search for a cached DHCP
profile in the o=AuthCache directory based on the MAC address. If
set to true, you must configure a directory connection to the cached
DHCP profiles.
If set to true, the following conditions apply:
If a cached DHCP profile is found, the RADIUS response message includes the RADIUS attribute values for framed IP address, pool name, service bundle, and RADIUS class attributes that are present in the cached DHCP profile.
If the check-lease-limit-with-sae option is set to true and the number of active subscriber sessions is less than the lease limit, the RADIUS access accept message includes the cached DHCP profile.
If the check-lease-limit-with-sae option is set to false, the RADIUS response includes the lease limit.
If set to false, the RADIUS response message does not include the cached DHCP profile information.
[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set query-cached-dhcp-profile - (Optional) Specify the default lease limit for all interfaces.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set default-lease-limit default-lease-limit
- Specify the invalid pool name returned when the number
of active subscriber sessions exceeds the lease limit. [edit slot 0 external-subscriber-monitor radius-authorization]user@host# set invalid-pool-name invalid-pool-name
- (Optional) Specify the timeout of a cached authenticated
request.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set lease-time-limit lease-time-limit
- Specify the amount of time to wait before cleaning up
cached RADIUS access requests that have been accepted.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set cleanup-interval cleanup-interval
- Specify the maximum age of an unacknowledged RADIUS access
request cached in memory. We recommend a value slightly greater than
the RADIUS packets retry interval.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set maximum-age maximum-age
- Specify the minimum number of concurrent threads processing
RADIUS access messages subtasks.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set minimum-pool-size minimum-pool-size
- Specify the maximum number of unacknowledged RADIUS messages
to be received from the RADIUS server before it discards new messages.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set maximum-queue-length maximum-queue-length
- Specify the service type of the RADIUS packets that will
be forwarded.[edit slot 0 external-subscriber-monitor radius-authorization]user@host# set service-type service-type
- (Optional) Verify your configuration. [edit slot 0 external-subscriber-monitor radius-authorization]user@host# show
- Access the configuration statement that specifies the
trusted RADIUS clients. [edit slot 0 external-subscriber-monitor radius-authorization]user@host# edit client client-address[edit slot 0 external-subscriber-monitor radius-authorization client client-address]
- Specify the RADIUS shared secret for the client. [edit slot 0 external-subscriber-monitor radius-authorization client client-address]user@host# set secret secret
Configuring the Directory Connection Properties for the Subscriber Data
The subscriber data can be queried for information such as the interface’s lease limit.
Use the following statements to configure the directory connection to the directory in which the subscriber data is stored:
To configure directory connection properties:
- From configuration mode, access the configuration statement
that configures the directory connection.user@host# edit slot 0 external-subscriber-monitor radius-authorization ldap subscriber-data
- Specify the top-level directory DN.[edit slot 0 external-subscriber-monitor radius-authorization ldap subscriber-data]user@host# set base base
- Specify the subtree in the directory in which the subscriber
data is stored. [edit slot 0 external-subscriber-monitor radius-authorization ldap subscriber-data]user@host# set base-dn base-dn
- Access the configuration statement that configures the
directory connection properties.[edit slot 0 external-subscriber-monitor radius-authorization ldap subscriber-data]user@host# edit directory-connection
- Specify the directory connection properties for the subscriber
data.[edit slot 0 external-subscriber-monitor radius-authorization ldap subscriber-data directory-connection]user@host# set ?
- (Optional) Verify your configuration.[edit slot 0 external-subscriber-monitor radius-authorization ldap subscriber-data]user@host# show
Configuring Directory Connection Properties for the Cached DHCP Profiles
The DHCP profiles can be queried by MAC address for the RADIUS framed IP address for authorized subscribers or invalid pool name for unauthorized subscribers.
Use the following statements to configure the directory connection to the directory in which the cached DHCP profiles are stored:
To configure directory connection properties:
- From configuration mode, access the configuration statement
that configures the directory connection.user@host# edit slot 0 external-subscriber-monitor radius-authorization ldap cached-dhcp-profile
- Specify the top-level directory DN.[edit slot 0 external-subscriber-monitor radius-authorization ldap cached-dhcp-profile]user@host# set base base
- Specify the subtree in the directory in which the cached
DHCP profiles are stored. [edit slot 0 external-subscriber-monitor radius-authorization ldap cached-dhcp-profile]user@host# set base-dn base-dn
- Access the configuration statement that configures the
directory connection properties.[edit slot 0 external-subscriber-monitor radius-authorization ldap cached-dhcp-profile]user@host# edit directory-connection
- Specify the directory connection properties for the cached
DHCP profiles.[edit slot 0 external-subscriber-monitor radius-authorization ldap cached-dhcp-profile directory-connection]user@host# set ?
- (Optional) Verify your configuration.[edit slot 0 external-subscriber-monitor radius-authorization ldap cached-dhcp-profile]user@host# show
Configuring the NIC Proxy for the Pseudo-RADIUS Authorization Server (SRC CLI)
When the check-lease-limit-with-sae option is set to true, you must configure the NIC proxy so that the pseudo-RADIUS authorization server can find the SAE managing the interface and determine the number of subscriber sessions already established on the interface (that is, the number of leases on the interface). The NIC proxy must be configured for a NIC scenario that maps VRs to SAEs.
Tasks to configure the NIC proxy are:
Configuring Resolution Information for a NIC Proxy
Use the following configuration statements to configure the NIC proxy:
To configure resolution information for a NIC proxy:
- From configuration mode, access the configuration statement
that configures the NIC proxy configuration. In this sample procedure,
the NIC proxy called radius-authorization-nic is configured. user@host# edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic resolution
- Specify the resolution information for this NIC proxy.[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic resolution]user@host# set ?
For more information about configuring resolution information for a NIC proxy, see Configuring Resolution Information for a NIC Proxy (SRC CLI).
- (Optional) Verify your configuration. [edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic resolution]user@host# show
Changing the Configuration for the NIC Proxy Cache
You can modify cache properties for the NIC proxy to optimize the resolution performance for your network configuration and system resources. Typically, you can use the default settings for the cache properties. The configuration statements are available at the Advanced editing level.
Use the following configuration statements to change values for the NIC proxy cache:
To configure the cache for a NIC proxy:
- From configuration mode, access the configuration statement
that specifies the NIC proxy configuration. In this sample procedure,
the NIC proxy called radius-authorization-nic is configured. user@host# edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic cache
- Specify the cache properties for the NIC proxy. [edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic cache]user@host# set ?
For more information about configuring the cache for a NIC proxy, see Changing the Configuration for the NIC Proxy Cache (SRC CLI).
- (Optional) Verify your configuration.
[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic cache] user@host# show cache-size 10000; cache-cleanup-interval 15;
Configuring a NIC Proxy for NIC Replication
Typically, you configure NIC replication to keep the NIC highly available. You configure NIC host selection to specify the groups of NIC hosts to be contacted to resolve a request, and to define how the NIC proxy handles NIC hosts that the proxy is unable to contact. The configuration statements are available at the Normal editing level.
Use the following configuration statements to configure NIC host selection for a NIC proxy:
To configure a NIC proxy to use NIC replication:
- From configuration mode, access the configuration statement
that specifies the NIC proxy configuration. In this sample procedure,
the NIC proxy called radius-authorization-nic is configured. user@host# edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection
- (Optional) Configure NIC host selection for a NIC proxy.[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection]user@host# set ?
For more information about configuring NIC host selection for a NIC proxy, see Configuring a NIC Proxy for NIC Replication (SRC CLI).
- (Optional) Verify your configuration.
[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection] user@host# show groups ; selection-criteria roundRobin;
- Access the configuration statement that specifies the
NIC proxy configuration for blacklisting—the process of handling
nonresponsive NIC hosts. [edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection]user@host# edit blacklisting[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection blacklisting]
- (Optional) Configure blacklisting for a NIC proxy. [edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection blacklisting]user@host# set ?
For more information about configuring NIC host selection for a NIC proxy, see Configuring a NIC Proxy for NIC Replication (SRC CLI).
- (Optional) Verify your configuration.
[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection blacklisting]
user@host# show
[edit slot 0 external-subscriber-monitor nic-proxy-configuration radius-authorization-nic nic-host-selection blacklisting] user@host# show try-next-system-on-error; number-of-retries-before-blacklisting 3; blacklist-retry-interval 15;
Extracting RADIUS Attributes with the Pseudo–RADIUS Authorization Server (SRC CLI)
The pseudo–RADIUS authorization server extracts RADIUS attribute values from the MX Series router for which it receives access requests.
Tasks to configure the RADIUS attribute value extraction are:
Extracting Interface Name Attribute Values
The interface name value is the subscriber line interface. This value is extracted from the NAS-Port-ID attribute. The default settings for this configuration are sufficient for most applications.
Use the following configuration statements to extract the interface name value from the RADIUS access request:
To extract the interface name value:
- From configuration mode, access the configuration statement
that configures RADIUS attribute extraction for the interface name
value. user@host# edit slot 0 external-subscriber-monitor radius-attribute-extraction default interface-name
- (Optional) Specify the RADIUS attribute value format with
a regular expression. You can group regular expressions by enclosing
them in parentheses. The value for the interface is the part of the
NAS-Port-ID matched by the first group in your regular expression.
For more information about using regular expressions, see http://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html. [edit slot 0 external-subscriber-monitor radius-attribute-extraction default interface-name]user@host# set regular-expression [regular-expression...]
For example, to specify that the extracted interface name value is ge-0/0/3.0 from the NAS-Port attribute value of ge-0/0/3.0[:0-0]:
[edit slot 0 external-subscriber-monitor radius-attribute-extraction default interface-name]user@host# set regular-expression ([a-zA-Z0-9-/.]+)\\[:.*
Extracting Virtual Router Name Attribute Values
In most cases, the virtual router name value is in the format default@<NAS-ID attribute>. The default settings extract a virtual router name in this format. If your environment is different, you can configure a different format for the extracted value.
Use the following configuration statements to extract the virtual router name value from the RADIUS access request:
To extract the virtual router name value:
- From configuration mode, access the configuration statement
that configures RADIUS attribute extraction for the virtual router
name value. user@host# edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name
- Specify the RADIUS attribute identifier.[edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set id id
- (Optional) Specify whether the RADIUS attribute is a vendor-specific
attribute.[edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set vsa
- (Optional) Specify the RADIUS vendor-specific attribute
identifier. [edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set vsa-id vsa-id
- (Optional) Specify the RADIUS attribute value format with
a regular expression. You can group regular expressions by enclosing
them in parentheses. The value for the interface is the part of the
NAS-Port-ID matched by the first group in your regular expression.
For more information about using regular expressions, see http://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html. [edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set regular-expression [regular-expression...]
For example:
[edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set regular-expression ([a-zA-Z0-9-/.]+)\\[:.* - (Optional) Specify the value type of this RADIUS attribute.[edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set type (raw-byte | chars)
where:
raw-byte—Raw bytes
chars—Sequence of characters
- (Optional) Specify the prefix that is prepended to the
extracted RADIUS attribute value.[edit slot 0 external-subscriber-monitor radius-attribute-extraction default virtual-router-name]user@host# set prefix prefix
Enabling the Pseudo-RADIUS Authorization Server (SRC CLI)
To enable the pseudo–RADIUS authorization server, configure the pseudo-RADIUS authorization server and make sure the External Subscriber Monitor is running.
To start External Subscriber Monitor:
Disabling the Pseudo-RADIUS Authorization Server (SRC CLI)
To disable the pseudo–RADIUS authorization server, delete the pseudo–RADIUS authorization server configuration for External Subscriber Monitor from configuration mode.
Setting Up MX Series Routers in the SRC Network (SRC CLI)
To set up the MX Series router so that the router can be managed by the SAE:
- From configuration mode, access the configuration statement
that configures network devices. This sample procedure uses mx_device
as the name of the router.user@host# edit slot 0 shared network device mx_device
- Set the type of device to third-party. [edit shared network device mx_device]user@host# set device-type third-party
- From configuration mode, access the configuration statements
for virtual routers. For MX Series routers, use the name default for
the virtual router.[edit shared network device mx_device]user@host# edit virtual-router default
- Specify the addresses of SAEs that can manage this router. [edit shared network device mx_device virtual-router default]user@host# set sae-connection [sae-connection...]
Configuring the COA Script Service for MX Series Routers (SRC CLI)
To configure the script service for the MX Series router:
- Create a script service in the services global service
name hierarchy or the services scope name service name hierarchy.
For example:[edit]user@host# edit services global service cos-service
- Set the type to script.[edit services global service cos-service]user@host# set type script
- (Optional) Configure other properties as needed for your service.
- Configure the script properties.
Access the script hierarchy for the configured script service.
[edit services global service cos-service]user@host# edit scriptSpecify URL as the script type.
[edit services global service cos-service script]user@host# set script-type urlSpecify the name of the Java class that implements the script service.
[edit services global service cos-service script]user@host# set class-name net.juniper.smgt.scriptServices.coa.CoaServiceConfigure the URL of the script service or the path and filename of the service.
[edit services global service cos-service script]user@host# set file file:///opt/UMC/sae/lib/coa.jarIf you specify a file URL, you must copy the file to the C Series Controller. If you specify an ftp or http URL, the file can reside on a centralized server. You can find the coa.jar file in the application and SDK distribution on the Juniper Networks website at:
https://www.juniper.net/support/downloads/?p=src#sw
in the SDK+AppSupport+Demos+Samples.tar.gz archive file with the pathname:
AppSupport+Demos+Samples/SDK/scriptServices/coa/lib/coa.jar
- Verify the configuration.
[edit services global service cos-service script] user@host# show type script; status active; available; script { script-type url; class-name net.juniper.smgt.scriptServices.coa.CoaService; file file:///opt/UMC/sae/lib/coa.jar; }
- Configure the parameters for the script service.
See Configuring Parameters for the Script Service for MX Series Routers (SRC CLI).
Configuring Parameters for the Script Service for MX Series Routers (SRC CLI)
Provide parameter substitutions with the values that are in the service definitions for the script service.
Table 9 lists the parameters specified by the sample script service.
Table 9: Parameter Substitutions for MX Series Routers COA Services
Parameter Name | Description |
---|---|
dynClientIp | IP address of the device. |
dynClientPort | UDP port number of the device. |
dynServerIp | IP address of the C Series Controller. |
dynServerPort | UDP port number of the C Series Controller. |
dynSecret | Shared secret between RADIUS server and RADIUS client. |
dynRetry | Number of retries for sending RADIUS packets when no RADIUS response is received. The retry interval is 3 seconds. |
dynConfig | Content of service definition in the format <action>.<radiusAttributeName>=<pluginEventAttribute>\n
For example: start-stop.Acct-Session-Id = ifSessionId “start-stop.Acct-Session-Id=ifSessionId\nstart.vendor-specific.4874. 10.string=’video’\nstop.vendor-specific.4874.10.string=’default’\n" |
To configure substitutions for the script parameters:
- At the hierarchy for the script service, specify substitutions
for the parameters. For example:[edit services global service cos-service]user@host# set parameter substitution [ dynSecret=\”secret\” dynRetry=2 dynClientIp=10.227.7.111 dynClientPort=9099 "dynConfig=\"start-stop.1.string=primaryUserName\\nstart-stop.Acct-Session-id=ifSessionId \\nstart.vendor-specific.4874.108.string=['T01 3m', 'T04 consumer-scheduler-map']\\nstop.vendor-specific.4874.108.string=['T01 1m', 'T04 data-scheduler-map']\\nstart.vendor-specific.4874.10.string='video' \\nstop.vendor-specific.4874.10.string='default'\\n\"" ]
- Verify the configuration.[edit services global service cos-service]user@host# show
Configuring Subscriptions to the Script Service
You need to configure subscriptions to the script service. You can set up the subscriptions to activate immediately on login.
For more information, see Adding Subscribers (SRC CLI).