cisco scms sm radius listener leg reference guide...vi cisco scms sm radius listener leg reference...

42
Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883 Cisco SCMS SM RADIUS Listener LEG Reference Guide Release 3.1.5 October 2007 Customer Order Number: Text Part Number: OL-7202-07

Upload: others

Post on 27-Feb-2021

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Cisco SCMS SM RADIUS Listener LEG Reference GuideRelease 3.1.5 October 2007

Americas HeadquartersCisco Systems, Inc.170 West Tasman DriveSan Jose, CA 95134-1706 USAhttp://www.cisco.comTel: 408 526-4000

800 553-NETS (6387)Fax: 408 527-0883

Customer Order Number: Text Part Number: OL-7202-07

Page 2: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

CCDE, CCENT, Cisco Eos, Cisco HealthPresence, the Cisco logo, Cisco Lumin, Cisco Nexus, Cisco StadiumVision, Cisco TelePresence, Cisco WebEx, DCE, and Welcome to the Human Network are trademarks; Changing the Way We Work, Live, Play, and Learn and Cisco Store are service marks; and Access Registrar, Aironet, AsyncOS, Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Collaboration Without Limitation, EtherFast, EtherSwitch, Event Center, Fast Step, Follow Me Browsing, FormShare, GigaDrive, HomeLink, Internet Quotient, IOS, iPhone, iQuick Study, IronPort, the IronPort logo, LightStream, Linksys, MediaTone, MeetingPlace, MeetingPlace Chime Sound, MGX, Networkers, Networking Academy, Network Registrar, PCNow, PIX, PowerPanels, ProConnect, ScriptShare, SenderBase, SMARTnet, Spectrum Expert, StackWise, The Fastest Way to Increase Your Internet Quotient, TransPath, WebEx, and the WebEx logo are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.

All other trademarks mentioned in this document or website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0812R)

Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.

Cisco SCMS SM RADIUS Listener LEG Reference Guide © 2007 Cisco Systems, Inc. All rights reserved.

Page 3: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

OL-7202-07

C O N T E N T S

Preface v

Document Revision History v

Organization vii

Related Publications vii

Conventions viii

Obtaining Documentation and Submitting a Service Request ix

C H A P T E R 1 About the RADIUS Listener LEG 1-1

About the RADIUS Listener LEG 1-1

Terms and Concepts 1-2

NAS (Network Access System) 1-2

RADIUS Accounting Start/Interim/Stop 1-2

Subscriber Mappings 1-2

Subscriber Mappings over VPN 1-3

Subscriber Domain 1-3

Subscriber Property 1-3

Topologies 1-3

C H A P T E R 2 Installing the RADIUS Listener LEG 2-2

Installing the RADIUS Listener LEG Software 2-2

Uninstalling the RADIUS Listener LEG 2-3

C H A P T E R 3 Configuring the RADIUS Listener LEG 3-3

Configuring the General Settings 3-4

[Radius Listener] Section 3-4

Example 3-4

Information About the Regular Expression Utility 3-5

Supported Syntax 3-5

Unsupported Syntax 3-7

Regular Expression Examples 3-7

Configuring RADIUS Attributes Mapping 3-8

Mapping of RADIUS Attribute to Subscriber ID 3-8

Validation Rules 3-10

iiiCisco SCMS SM RADIUS Listener LEG Reference Guide

Page 4: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Contents

Configuring the Subscriber ID Example 3-10

Configuring the Vendor Specific Attribute (VSA) as Subscriber ID Example 3-11

Configuring Stripping of the Attribute Value Example using Regular Expression Rule 3-11

Mapping of RADIUS Attribute to Subscriber Policy 3-11

Extracting Data from a RADIUS Attribute 3-12

Validation Rules 3-13

Extracting Data from a RADIUS Attribute Example 3-13

Not Setting Any Policy to the Subscriber 3-14

Mapping of RADIUS Attribute to Subscriber IP Address 3-14

Configuring Subscriber IP Address Example 3-15

Configuring Subscriber IP Address over VPN Example 3-16

Configuring the NAS Devices 3-16

Configuring the NAS Devices: Example 3-17

C H A P T E R 4 Configuring the RADIUS Client 4-4

Configuring the RADIUS Client 4-4

C H A P T E R 5 Using the RADIUS Listener LEG CLU 5-5

Information About the p3radius Utility 5-5

Viewing the RADIUS Listener LEG Status 5-7

Viewing the RADIUS Listener LEG Statistics 5-8

Testing a Section in a Configuration File 5-8

Testing a Reduction Rule 5-9

Testing a Matching Rule 5-9

C H A P T E R A Domain Association Algorithm A-1

Domain Association Algorithm A-1

ivCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 5: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Preface

The SCMS SM RADIUS Listener LEG Reference Guide describes the concept of a RADIUS Listener Login Event Generator (LEG), and explains how to install and configure the RADIUS Listener LEG on the Service Control Management Suite Subscriber Manager (SCMS SM) platform.

This document is intended for system administrators and system integrators who are familiar with the RADIUS extensions concept and with Cisco Service Control Subscriber Management and Subscriber Integration concepts.

Document Revision History

Description of Changes

• Addition of regular expression utility, see Information About the Regular Expression Utility, page 5.

• Changes to the configuration file structure, see Configuring RADIUS Attributes Mapping, page 8.

• Addition of --test-reg-exp CLU to test regular expressions and the --test-manipulation CLU to test the manipulation defined in the configuration files. See Information About the p3radius Utility, page 5.

Description of Changes

• The RADIUS Listener LEG has been enhanced to provide dynamic integration for subscribers over VPN of type VLAN. See Subscriber Mappings over VPN, page 3 and Configuring the RADIUS Listener LEG, page 3.

Cisco Service Control Release Part Number Publication Date

Release 3.1.5 OL-7202-07 November, 2007

Cisco Service Control Release Part Number Publication Date

Release 3.1.5 LA OL-7202-06 July, 2007

Cisco Service Control Release Part Number Publication Date

Release 3.1.0 OL-7202-05 May, 2007

vCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 6: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Preface

Description of Changes

• Rearranged the topic order to be more logical.

• Updated for release 3.1.0.

Description of Changes

• Added new section describing mapping the RADIUS attribute to the subscriber IP address. See Mapping of RADIUS Attribute to Subscriber IP Address, page 14.

• Various other small changes to text.

Description of Changes

• Added new section describing how to configure the stripping of an attribute value. See Configuring Stripping of the Attribute Value Example using Regular Expression Rule, page 11.

• Various other small changes to text.

Description of Changes

• Reorganization of documentation. No major changes or new features were added to this revision.

Description of Changes

• This is the first version of this document.

Cisco Service Control Release Part Number Publication Date

Release 3.0.5 OL-7202-04 November, 2006

Cisco Service Control Release Part Number Publication Date

Release 3.0.3 OL-7202-03 May, 2006

Cisco Service Control Release Part Number Publication Date

Release 3.0 OL-7202-02 December, 2005

Cisco Service Control Release Part Number Publication Date

Release 2.5.7 OL-7202-01 May, 2005

viCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 7: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Preface

OrganizationThe major sections of this guide are as follows:

Related PublicationsUse this Cisco SCMS SM RADIUS Listener LEG Reference Guide in conjunction with the following Cisco documentation:

• Cisco SCMS Subscriber Manager User Guide

Table 1 Documentation Organization

Chapter Title Description

Chapter 1 About the RADIUS Listener LEG, page 1

Describes the Subscriber Manager RADIUS Listener LEG software module and the terms and concepts used in this guide.

Chapter 2 Installing the RADIUS Listener LEG, page 2

Details the procedures for installing the software on the Subscriber Manager. It also describes uninstalling the software and upgrading procedures.

Chapter 3 Configuring the RADIUS Listener LEG, page 3

Describes the configuration procedure for the RADIUS Listener LEG.

Chapter 4 Configuring the RADIUS Client, page 4

Describes the configuration procedure for the RADIUS Client.

Chapter 5 Using the RADIUS Listener LEG CLU, page 5

Provides a description of the command-line utility commands when the software is installed on the Subscriber Manager.

Appendix A Domain Association Algorithm, page 1

Describes the algorithm used for deciding the subscriber domain to which a subscriber should be logged on.

viiCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 8: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Preface

ConventionsThis document uses the following conventions:

Note Means reader take note. Notes contain helpful suggestions or references to materials not covered in this manual.

Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data.

Means reader be warned. In this situation, you might do something that could result in bodily injury.

Table 2 Documentation Conventions

Convention Description

boldface font Commands and keywords are in boldface.

italic font Arguments for which you supply values are in italics.

[ ] Elements in square brackets are optional.

{x | y | z} Alternative keywords are grouped in braces and separated by vertical bars.

[x | y | z] Optional alternative keywords are grouped in brackets and separated by vertical bars.

string A nonquoted set of characters. Do not use quotation marks around the string, or the string will include the quotation marks.

screen font Terminal sessions and information that the system displays are in screen font.

boldface screen font Information you must enter is in boldface screen font.

italic screen font Arguments for which you supply values are in italic screen font.

<> Nonprinting characters, such as passwords, are in angle brackets.

[ ] Default responses to system prompts are in square brackets.

!, # An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line.

viiiCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 9: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Preface

Obtaining Documentation and Submitting a Service RequestFor information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What’s New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at:

http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html

Subscribe to the What’s New in Cisco Product Documentation as a Really Simple Syndication (RSS) feed and set content to be delivered directly to your desktop using a reader application. The RSS feeds are a free service and Cisco currently supports RSS Version 2.0.

ixCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 10: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Preface

xCisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 11: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

CiscOL-7202-07

C H A P T E R 1

About the RADIUS Listener LEG

This module describes the Subscriber Manager RADIUS Listener LEG software module and the terms and concepts used in this guide.

• About the RADIUS Listener LEG, page 1-1

• Terms and Concepts, page 1-2

About the RADIUS Listener LEG The RADIUS Listener LEG is a software module that receives RADIUS Accounting messages, and according to their content, invokes logon operations to the Subscriber Manager (SM). It also provides dynamic integration for subscribers over VPN. The RADIUS Listener LEG is an extension to the SM software and runs concurrently with the SM.

When the RADIUS Listener LEG receives an Accounting-Start message, it extracts the subscriber ID, the subscriber IP-address, the VLAN-ID, and optionally, the subscriber package index from the message attributes, and triggers a login operation to the SM. In the same manner, Accounting-Interim-Update triggers a login operation, and the Accounting-Stop message triggers a logout operation.

The RADIUS Listener LEG also contains a regular expression utility. This command line utility (CLU) can be used to test regular expression “spelling” validity, test and show the reduction and pattern-matching of an input list of strings against certain regular-expression patterns, and provide the user with detailed output for each manipulation operation result.

The RADIUS Listener LEG was carefully developed and thoroughly tested with several RADIUS AAA servers and NAS devices.

1-1o SCMS SM RADIUS Listener LEG Reference Guide

Page 12: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 1 About the RADIUS Listener LEG Terms and Concepts

Terms and Concepts The following is a list of some terms and concepts that are necessary to understand the RADIUS Listener and SM configuration and operation. Additional information regarding the various issues can be found in the Cisco SCMS Subscriber Manager User Guide.

• NAS (Network Access System), page 1-2

• RADIUS Accounting Start/Interim/Stop, page 1-2

• Subscriber Mappings, page 1-2

• Subscriber Mappings over VPN, page 1-3

• Subscriber Domain, page 1-3

• Subscriber Property, page 1-3

• Topologies, page 1-3

NAS (Network Access System) A network device that serves as an access point for a remote user. It initiates RADIUS transactions to the RADIUS server to authenticate a remote user.

The RADIUS Listener LEG refers to all of its RADIUS clients as NAS devices, even though they might be RADIUS servers acting as a proxy or forwarding messages.

RADIUS Accounting Start/Interim/Stop The RADIUS Accounting messages must hold an attribute called Acct-Status-Type. This attribute can receive the value of start, interim-update, stop, or other RADIUS Accounting messages. An Accounting-Start message contains the Acct-Status-Type with the value start.

For additional information, see the relevant RADIUS RFC documentation.

Subscriber Mappings The SCE platform requires mappings between the network IDs (IP addresses) of the flows it encounters and the subscriber IDs. The SM database contains the network IDs that map to the subscriber IDs. The SCE network-ID-to-subscriber mappings are constantly updated from the SM database.

The main function of the RADIUS Listener LEG is to provide the SM with network-ID-to-subscriber mappings in real time.

For information about the SCE platforms, see the Cisco SCE 1000 2xGBE Installation and Configuration Guide and the Cisco SCE 2000 4xGBE Installation and Configuration Guide.

1-2Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 13: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 1 About the RADIUS Listener LEG Terms and Concepts

Subscriber Mappings over VPN Starting from version 3.1.5 the RADIUS Listener LEG supports dynamic integration for subscriber mappings over VPN. The LEG can be configured to extract a VLAN-ID from a RADIUS attribute and use it along with the extracted IP address.

Note Currently the LEG supports subscriber mappings over VPN only for VPNs that are defined by a VLAN-ID (also referred to as "VPNs of type VLAN").

Note The SM is able to learn VLAN VPNs automatically: upon subscriber login with a VLAN-ID that is unknown to the SM, the SM will add the VPN automatically using the VLAN-ID as a VPN name

Subscriber Domain The SM provides the option of partitioning SCE platforms and subscribers into subscriber domains. A subscriber domain is a group of SCE platforms that share a group of subscribers. Subscriber domains can be configured using the SM configuration file and can be viewed using the SM CLU.

For additional information about domains and domain aliases, see the “Configuration File Options” module of the Cisco SCMS Subscriber Manager User Guide.

Subscriber Property A subscriber property usually defines the policy enforced by Cisco SCMS solutions on each subscriber. The RADIUS Listener LEG can handle the property ID in any of the following ways:

• Set the property ID according to a value of a RADIUS attribute

• Set the property ID using a constant default value

• Leave the property ID unset

For additional information, see Mapping of RADIUS Attribute to Subscriber Policy, page 3-11, and the Cisco Service Control Application for Broadband (SCA BB) User Guide.

Topologies The following diagram illustrates a topology in which a RADIUS server/proxy forwards or proxies the RADIUS Accounting messages to the RADIUS Listener LEG.

1-3Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 14: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 1 About the RADIUS Listener LEG Terms and Concepts

Figure 1-1 Example of Radius Server Forwarding Radius Accounting Messages to Radius Listener LEG

The following diagram illustrates a topology in which the NAS performs authentication with the RADIUS server, and sends RADIUS Accounting messages to the RADIUS Listener LEG and, optionally, to the RADIUS server.

Figure 1-2 Example of NAS Sending Radius Accounting Messages to both the Radius Listener LEG and the Radius

Server

1571

12

RADIUSServer/Proxy

SCE

TrafficLinks

ControlLinks

NAS / GGSN

SCE

Edge Router

NAS / GGSN

RADIUSListener

Internet

1571

13

RADIUSServer/Proxy

SCE

TrafficLinks

RADIUSAccounting

ControlLinks

NAS / GGSN

SCE

Edge Router

NAS / GGSN

RADIUSListener

Internet

1-4Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 15: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

CiscOL-7202-07

C H A P T E R 2

Installing the RADIUS Listener LEG

This module describes the procedures for installing the software on the Subscriber Manager. It also describes uninstalling the software.

The RADIUS Listener LEG is part of the SM installation package. The installation package also includes configuration files and the Command-Line Utility of the LEG.

• Installing the RADIUS Listener LEG Software, page 2-2

• Uninstalling the RADIUS Listener LEG, page 2-3

Installing the RADIUS Listener LEG Software

Step 1 Edit the RADUIS Listener LEG configuration file.

To run the RADIUS Listener LEG at SM startup, set the start parameter to yes. See Configuring the General Settings, page 3-4.

Step 2 Load the configuration file using the p3sm command-line utility.

Run the p3sm command-line utility from the SM CLU sm-inst-dir/sm/server/bin (sm-inst-dir refers to the SM installation directory):

>p3sm --load-config

Step 3 Configure the NAS devices that are sending RADIUS Accounting messages to the RADIUS Listener LEG.

The NAS devices may be RADIUS servers acting as RADIUS clients that proxy or forward RADIUS accounting messages to the RADIUS Listener.

These RADIUS clients must be configured according to the RADIUS Listener configuration, as performed in Step 1 above. There are many different RADIUS client devices, each of which is configured in a different manner. See Configuring the NAS Devices, page 3-16 for instructions on configuring the RADIUS clients on NAS devices.

2-2o SCMS SM RADIUS Listener LEG Reference Guide

Page 16: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 2 Installing the RADIUS Listener LEG Uninstalling the RADIUS Listener LEG

Uninstalling the RADIUS Listener LEG

Step 1 Edit the SM configuration file and set the RADIUS Listener start parameter to no.

For further information, see Configuring the General Settings, page 3-4.

Note Setting the start parameter to no does not remove the RADIUS Listener LEG from the SM installation. You can reinstall the software again by setting the start parameter to yes.

Step 2 Run the p3sm CLU.

>p3sm --load-config

2-3Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 17: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

CiscOL-7202-07

C H A P T E R 3

Configuring the RADIUS Listener LEG

This module describes the configuration procedure for the RADIUS Listener LEG.

The RADIUS Listener LEG is configured using the SM configuration file p3sm.cfg, which resides in the sm-inst-dir/sm/server/root/config directory (sm-inst-dir refers to the SM installation directory).

The configuration file consists of sections headed by a bracketed section title; for example, [Radius.Subscriber ID]. Each section consists of several parameters having the format parameter=value. The number sign (“#”) at the beginning of a line signifies that it is a remark.

The General RADIUS Listener LEG configuration settings reside in the [Radius Listener] section. All additional RADIUS Listener LEG sections start with the prefix Radius., such as [Radius.NAS.nas1], and they are defined initially as remark lines.

• Configuring the General Settings, page 3-4

• Information About the Regular Expression Utility, page 3-5

• Configuring RADIUS Attributes Mapping, page 3-8

• Configuring the NAS Devices, page 3-16

3-3o SCMS SM RADIUS Listener LEG Reference Guide

Page 18: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring the General Settings

Configuring the General Settings

[Radius Listener] Section The [Radius Listener] section in the SM configuration file contains the following parameters:

• start

Defines whether the SM should run the RADIUS Listener at startup.

Possible values for this parameter are yes and no. The default value is no.

• accounting_port

Defines the RADIUS Listener accounting port number.

The default value is 1813.

• ip

The IP address to which the RADIUS listener should bind. Use this parameter only in cases where the IP address used for RADIUS transactions is not the main IP address of the SM machine. (For example in an SM cluster.)

Possible values are any IP address in dotted notation. The default value is not set.

• packet_types

Defines the RADIUS protocol packet types to analyze.

Possible values are accounting-start, accounting-interim, accounting-stop separated by a comma.

The default value is accounting-start,accounting-interim,accounting-stop.

Example The following example is a portion of a configuration file illustrating the [Radius Listener] section:

[Radius Listener] # The following parameter defines whether the SM should # run the RADIUS Listener at startup. # Receives the values: yes, no. (default no) start=no # accounting port number (default 1813) accounting_port=1813 # RADIUS packet types packet_types=accounting-start,account-interim,accounting-stop

3-4Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 19: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Information About the Regular Expression Utility

Information About the Regular Expression Utility A regular expression consists of a character string where some characters are given special meaning with regard to pattern matching. Regular expressions have been in use from the early days of computing, and provide a powerful and efficient way to parse, interpret and search and replace text within an application.

• Supported Syntax, page 3-5

• Unsupported Syntax, page 3-7

• Regular Expression Examples, page 3-7

Supported Syntax Within a regular expression, the following characters have special meaning:

• Positional Operators

– ^ matches at the beginning of a line

– $ matches at the end of a line

– \A matches the start of the entire string

– \Z matches the end of the entire string

– \b matches at a word break (Perl5 syntax only)

– \B matches at a non-word break (opposite of \b) (Perl5 syntax only)

– \<matches at the start of a word (egrep syntax only)

– \>matches at the end of a word (egrep syntax only)

• One-Character Operators

– . matches any single character

– \d matches any decimal digit

– \D matches any non-digit

– \n matches a newline character

– \r matches a return character

– \s matches any whitespace character

– \S matches any non-whitespace character

– \t matches a horizontal tab character

– \w matches any word (alphanumeric) character

– \W matches any non-word (alphanumeric) character

– \x matches the character x, if x is not one of the above listed escape sequences

• Character Class Operator

– [abc] matches any character in the set a, b, or c

– [^abc] matches any character not in the set a, b, or c

– [a-z] matches any character in the range a to z, inclusive

– A leading or trailing dash will be interpreted literally.

3-5Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 20: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Information About the Regular Expression Utility

• Within a character class expression, the following sequences have special meaning if the syntax bit RE_CHAR_CLASSES is on:

– [:alnum:] Any alphanumeric character

– [:alpha:] Any alphabetical character

– [:blank:] A space or horizontal tab

– [:cntrl:] A control character

– [:digit:] A decimal digit

– [:graph:] A non-space, non-control character

– [:lower:] A lowercase letter

– [:print:] Same as graph, but also space and tab

– [:punct:] A punctuation character

– [:space:] Any whitespace character, including newline and return

– [:upper:] An uppercase letter

– [:xdigit:] A valid hexadecimal digit

• Subexpressions and Backreferences

– (abc) matches whatever the expression abc would match, and saves it as a subexpression. Also used for grouping.

– (?:...) pure grouping operator, does not save contents

– (?#...) embedded comment, ignored by engine

– \n where 0 < n <10, matches the same thing the nth subexpression matched.

• Branching (Alternation) Operator

– a|b matches whatever the expression a would match, or whatever the expression b would match.

• Repeating Operators

These symbols operate on the previous atomic expression.

– ? matches the preceding expression or the null string

– * matches the null string or any number of repetitions of the preceding expression

– + matches one or more repetitions of the preceding expression

– {m} matches exactly m repetitions of the one-character expression

– {m,n} matches between m and n repetitions of the preceding expression, inclusive

– {m,} matches m or more repetitions of the preceding expression

• Stingy (Minimal) Matching

If a repeating operator is immediately followed by a ?, the repeating operator will stop at the smallest number of repetitions that can complete the rest of the match.

3-6Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 21: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Information About the Regular Expression Utility

• Lookahead

Lookahead refers to the ability to match part of an expression without consuming any of the input text. There are two variations to this:

– (?=foo) matches at any position where foo would match, but does not consume any characters of the input.

– (?!foo) matches at any position where foo would not match, but does not consume any characters of the input.

Unsupported Syntax Some flavors of regular expression utilities support additional escape sequences, and this is not meant to be an exhaustive list of unsupported syntax.

• (?mods) inlined compilation/execution modifiers (Perl5)

• \G end of previous match (Perl5)

• [.symbol.] collating symbol in class expression (POSIX)

• [=class=] equivalence class in class expression (POSIX)

• s/foo/bar/ style expressions as in sed and awk (note: these can be accomplished through other means in the API)

Regular Expression Examples The following examples show how to perform some basic manipulation using the regular expression tool.

• In order to remove the “cisco.com” suffix from a given name (e.g. [email protected]), define the following manipulation rule: (.*)@.*

• In order to remove the “name” prefix from a given name (e.g. [email protected]), define the following manipulation rule: .*@(.*)

• If no reduction is needed, either define the following reduction rule (.*) , or do not define any rule.

• In order to find a partial match from of a name (e.g. find 'isco' in [email protected]), define the following matching rule: mapping_table.cisco=<value>

• In order to find a full match of a name, define the following matching rule: mapping_table.cisco=<value>

• In order to define a default value for an empty or non-existent attribute value: mapping_table.^$=<value>

Note Brackets '[' or ']' are used by the regular expression mechanism and also in the section definitions in the configuration files. If either of these characters form a part of the reduction rule definition (field_manipulation parameter) or in matching rule definition (mapping_table parameter), it should be preceded by two backslashes ('\\') in order to be used as part of the value.

3-7Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 22: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

Note For example,

[Sample Section] mapping_table.^12\\[user7$=7 will have a full match result to the '12\[user7' string mapping_table.^12\[user7$=7 will have a full match result to the '12[user7' string mapping_table.^12[user7$=7 will have a full match result to the '12[user7' string as well.

Note Parentheses '(' or ')' and the pipe character '|' should be preceded by a single backslash '\'. For example, if you have the rule ̂ (?:88|99)(.*)$ --input=886, the CLU command should be as shown in the following example:

p3radius --test-reduction-rule --reg-exp=^\(?:88\|99\)\(.*\)$ --input=886

Note Using complex regular expression patterns will cause performance degradation; the degradation increases relative to the length of the string being manipulated. It is strongly recommended not to use the ‘[]’ operands with the .* or with the (.*) operands.

Configuring RADIUS Attributes Mapping • Mapping of RADIUS Attribute to Subscriber ID, page 3-8

• Mapping of RADIUS Attribute to Subscriber Policy, page 3-11

• Mapping of RADIUS Attribute to Subscriber IP Address, page 3-14

Mapping of RADIUS Attribute to Subscriber ID

Note The configuration described in this section is optional.

The subscriber ID is usually put in the User-Name RADIUS attribute. However, in certain installations, it is possible to use a different RADIUS attribute. For example, in wireless environments, it is possible to use the 3GPP-IMSI or the 3GPP2-IMSI attributes. The default is to use the User-Name attribute.

The RADIUS Listener can be configured to concatenate several RADIUS attributes for use as the Subscriber ID.

3-8Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 23: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

To define which attribute(s) to use for the subscriber ID, configure the [Radius.Subscriber ID] and the [Radius.Field.<field name>] sections. To define the attribute(s) to use, configure the following parameters in the [Radius.Subscriber ID] section:

• fields

Defines the RADIUS protocol fields names. When defining multiple fields, use commas between the field names. The field name must not start or end with a space character and it cannot contain an '=' character. A maximum of three fields can be defined.

The default value is user_name.

The following is an example of setting this parameter:

fields=user_name,vpn

• field_separator

Defines the character or string to be used when concatenating several fields.

In you define three values for the fields parameter (user_name, vpn, and IP) and the field separator is being defined:

– The field_separator parameter must contain user_name, vpn, and IP in the same order as they were defined in the fields parameter.

– The separator character between the 1st and 2nd attributes and between the 2nd and 3rd attributes can be different; for example, user_name-vpn::IP

– The separator can be string; for example, ::

– The separator can be an empty string; for example, field_separator=user_namevpnIP

• The default value is _.

The following is an example of setting this parameter with the value '-':

field_separator=user_name-vpn

• field_manipulation.<field name>=<regular expression>

The field_manipulation parameters define how to manipulate the RADIUS field values.

The <field name> part of this parameter is one of the fields defined in the fields parameter. The <regular expression> part of this parameter is the reduction regular expression to be used on the <field name> value.

It is possible to define a field_manipulation rule for each name in the field property. The following is an example of setting this parameter:

field_manipulation.user_name=(.*)@.* field_manipulation.vpn=(.*)

It is possible to configure the RADIUS listener to strip a RADIUS attribute based on a selected character or string using a regular expression rule. This provides a convenient method for obtaining the subscriber ID from a prefix or a suffix of an attribute value.

For example, you can obtain the subscriber ID from the USERNAME attribute value of subscriber@domain-name by stripping the characters from the value by using the (.*)@.* regular expression rule to produce the subscriber. Similarly, you can obtain the domain name by using the .*@(.*) regular expression rule.

3-9Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 24: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

For each field defined by the fields parameter, you must also define a [Radius.Field.<field name>] section with the following parameters:

• radius_attribute

Configure the radius_attribute parameter with the RADIUS attribute number. Use the following format for Vendor Specific Attributes (VSA): 26(vendor-id;sub-attribute). For example, 26(10415;1).

The default value is -1.

• radius_attribute_type

Configure radius_attribute_type parameter according to the RADIUS attribute format.

Possible values for this parameter are integer and string. The default value is string.

Validation Rules

When regular expression rules are used for reduction of RADIUS attributes, the following validation rules are applied:

• The protocol field amount must not exceed three fields.

• Each field defined in the fields parameter must have a corresponding [Radius.Field.<field>] section.

• If the separator character is defined, the order of the fields is checked.

• Each field defined in the fields parameter may have a single reduction regular expression rule. If a rule exists, the regular expression validity check is performed.

Configuring the Subscriber ID Example

The following is an example configuration file illustrating how to configure the subscriber ID assignment option. In this example, the User-Name and VPN attributes are assigned to the subscriber ID:

[Radius.Subscriber ID] # Field name fields=user_name,vpn # Field separator # "-" is the separator between the user_name and vpn fields. field_separator=user_name-vpn [Radius.Field.user_name] # RADIUS protocol attribute number radius_attribute=1 # the type of the attribute (type "integer" or "string") radius_attribute_type = string [Radius.Field.vpn] # Radius protocol attribute number . radius_attribute = 5 # the type of the attribute (type "integer" or "string") radius_attribute_type = integer

3-10Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 25: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

Configuring the Vendor Specific Attribute (VSA) as Subscriber ID Example

The following is an example configuration file illustrating how to configure the subscriber ID assignment option. In this example, the 3GPP_IMSI vendor-specific attribute is assigned to the subscriber ID:

[Radius.Subscriber ID] # Field name fields=user_name [Radius.Field.user_name] # in case of a vendor specific attribute (VSA) # when the 'radius_attribute' is set to 26 # configuration for 3GPP_IMSI radius_attribute = 26(10415;1) # the type of the attribute (type "integer" or "string") radius_attribute_type = string

Configuring Stripping of the Attribute Value Example using Regular Expression Rule

The following is an example configuration file illustrating how to configure the stripping of an attribute value using a regular expression rule:

[Radius.Subscriber ID] # Field name fields=user_name # Field manipulation field_manipulation.user_name=(.*)@.* [Radius.Field.user_name] # RADIUS protocol attribute number radius_attribute=1 # the type of the attribute (type "integer" or "string") radius_attribute_type = string

The above configuration applied on ‘[email protected]’ will extract “john” as a Subscriber ID.

Mapping of RADIUS Attribute to Subscriber Policy

Note The configuration described in this section is optional.

Subscriber policy configuration in the RADIUS Listener can be handled in any of the following ways:

• Extract the data from a RADIUS attribute

• Set a default value for all subscribers that log on via the RADIUS Listener

• Do not set any policy to the subscriber

3-11Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 26: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

Extracting Data from a RADIUS Attribute

To define which RADIUS attribute to use for the subscriber policy, configure the [Radius.Property.Package] and [Radius.Field.<field name>] sections. To define the attribute to be used, configure the following parameters:

• fields

Defines the RADIUS protocol fields names. When defining multiple fields, use commas between the field names. The field name must not start or end with a space character and it cannot contain an '=' character.

This parameter has no default value.

The following is an example of setting this parameter:

fields=user_name,ip

• field_separator

Defines the character to be used when concatenating several fields.

The default value is _.

The following is an example of setting this parameter with the value '-':

field_separator=user_name-ip

• field_manipulation.<field name>=<regular expression>

The field_manipulation parameters define how to manipulate the RADIUS field values.

The <field name> part of this parameter is one of the fields defined in the fields parameter. The <regular expression> part of this parameter is the reduction regular expression to be used on the <field name> value.

It is possible to define a field_manipulation rule for each name in the field property. This is the default rule if there is a non-configured field manipulation. The following is an example of setting this parameter:

field_manipulation.user_name=(.*)@.* field_manipulation.ip=(.*)

• mapping_table.<regExp>=<property-value>

The mapping_table parameters define a conversion table between the result of the attribute value manipulation, the matching rule, and the property value.

The <regExp>part of this parameter defines the regular expression matching rule. The <property-value>part of this parameter defines the integer result if the regular expression is matched.

There is no default value for this parameter, but it is possible to set a default value by using the following expression: mapping_table.^$=<value>. This value is used if the mapping result is an empty string.

The following is an example of setting this parameter.

mapping_table..*@.*=1 mapping_table..*=2

3-12Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 27: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

For each field defined by the fields parameter, you must also define a [Radius.Field.<field name>] section with the following parameters:

• radius_attribute

Configure the radius_attribute parameter with the RADIUS attribute number. Use the following format for Vendor Specific Attributes (VSA): 26(vendor-id;sub-attribute). For example, 26(10415;1).

The default value is -1.

• radius_attribute_type

Configure radius_attribute_type parameter according to the RADIUS attribute format.

Possible values for this parameter are integer and string. The default value is string.

Validation Rules

When regular expression rules are used for reduction of RADIUS attributes, the following validation rules are applied:

• The protocol field amount must not exceed three fields.

• Each field defined in the fields parameter must have a corresponding [Radius.Field.<field>] section.

• The property value in the mapping table is an integer.

• The “=” operator is concatenated to the property value with no space between them.

• A validity test is performed for each regular expression that is used for matching and reduction.

Extracting Data from a RADIUS Attribute Example

The following example is a portion of a configuration file illustrating how to configure the subscriber policy assignment option. In this example, a VSA is assigned to the subscriber policy. It is stripped from its prefix and converted to integer type using a mapping table.

[Radius.Property.Package] # Field name fields=user_name,vpn # Field separator field_separator=user_name@vpn # Field manipulation field_manipulation.user_name=(.*)@.* # Mapping table mapping_table..*@.*=1 mapping_table.^$=2 mapping_table..*=3 [Radius.Field.user_name] # Radius protocol attribute number radius_attribute = 1 # the type of the attribute (type "integer" or "string") radius_attribute type = string [Radius.Field.vpn] # Radius protocol attribute number. # use the following format for VSAs: 26 vendor-id;sub-attribute) # for example: 26(9;1) radius_attribute = 26(9;1) # the type of the attribute (type "integer" or "string") radius_attribute_type = string

3-13Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 28: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

Not Setting Any Policy to the Subscriber

Edit the [Radius.Property.Package] section with all remark lines. The number sign ("#") at the beginning of a line signifies a remark line.

Mapping of RADIUS Attribute to Subscriber IP Address The subscriber IP address is normally based on the Framed-IP-Address attribute; however, it can also be based on a different RADIUS attribute. The default is to use the Framed-IP-Address attribute.

In addition, for environments with IP addresses over VPN, the RADIUS Listener LEG supports the extraction of VPN information from a RADIUS attribute to be used with the extracted IP address.

Note Currently the LEG supports subscriber mappings over VPN only for VPNs that are defined by a VLAN-ID (also referred to as "VPNs of type VLAN").

The following algorithm is applied to handle IP addresses in this LEG:

1. If the user configured an attribute from which to extract the IP, the LEG will look for that attribute in the packet. If the attribute exists, the LEG will use the attribute as the subscriber IP address.

2. If the attribute does not exist or is not configured, the LEG will look for the Framed-Route attributes; several Framed-Route attributes may exist. If any Framed-Route attributes exist, the LEG will use these attributes as the subscriber IP addresses.

3. If there are no Framed-Route attributes, the LEG will look for a Framed-IP-Address attribute and a Framed-IP-Netmask attribute. If a Framed-IP-Address attribute exists, the LEG will use this attribute as the subscriber IP address. If both the Framed-IP-Address and the Framed-IP-Netmask attributes exist, the operation is performed with the IP range represented by the IP address and the IP netmask.

4. Otherwise, the LEG will perform a login without the IP address.

Note The configured attribute can be a regular RADIUS attribute or a VSA. It is possible to encode the attribute as an integer in which case it will be a single IP address. It can also be encoded as a string and will therefore be an IP-Address/IP-Range value: the value must be formatted as A.B.C.D/E or A.B.C.D.

Note The supported format of the Framed-Route attribute is as described in RFC-2865. It must start with a string that starts with the route itself in the format A.B.C.D/E followed by a space. Other values follow the space, but the LEG ignores these other values.

3-14Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 29: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring RADIUS Attributes Mapping

To define which attribute to use for the subscriber IP address, configure the [Radius.Subscriber IP Address] and the [Radius.Field.<field name>] section. To define the attribute to use, configure the following parameters:

• fields

Defines the RADIUS protocol field name. Only one field name can be defined.

The default value is not set.

• vpn_field

Defines the RADIUS protocol attribute field name to be used as the VPN information related to the IP address.

The default value is not set.

For the field defined by the fields parameter, you must also define a [Radius.Field.<field name>] section with the following parameters:

• radius_attribute

Configure the radius_attribute parameter with the RADIUS attribute number. Use the following format for Vendor Specific Attributes (VSA): 26(vendor-id;sub-attribute). For example, 26(10415;1).

The default value is -1.

• radius_attribute_type

Configure radius_attribute_type parameter according to the RADIUS attribute format.

Possible values for this parameter are integer and string. The default value is string.

Configuring Subscriber IP Address Example

The following is an example configuration file illustrating how to configure the subscriber IP assignment option. In the following example, the Framed-IP-Address attribute is used.

[Radius.Subscriber IP Address] # Field name for IP fields=frame-ip-address [Radius.Field.frame-ip-address] # RADIUS protocol attribute number radius_attribute=8 # the type of the attribute (type "integer" or "string") # if type is string a mapping table must be supplied # below. # (no default) radius_attribute_type=integer

3-15Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 30: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring the NAS Devices

Configuring Subscriber IP Address over VPN Example

The following is an example configuration file illustrating how to configure the subscriber IP assignment option for IP over VPN. In the following example, the Framed-IP-Address attribute is used for the IP address and the cisco-av-pair VSA attribute is used for the VPN information.

[Radius.Subscriber IP Address] # RADIUS protocol field name. fields=ip # Radius protocol attribute field name to be used as the # VPN information related to the IP address. vpn_field=vpn [Radius.Field.ip] # Radius protocol attribute number radius_attribute = 8 # the type of the attribute (type "integer" or "string") radius_attribute type = integer [Radius.Field.vpn] # Radius protocol attribute number. # use the following format for VSAs: 26 vendor-id;sub-attribute) # for example: 26(9;1) radius_attribute = 26(9;1) # the type of the attribute (type "integer" or "string") radius_attribute_type = integer

Configuring the NAS Devices The RADIUS Listener LEG must be configured with the RADIUS clients/NAS devices that transmit RADIUS messages to the LEG, to accept RADIUS messages.

Each [Radius.NAS.XXX] section specifies a single Network Access System (NAS), where XXX represents the NAS name.

Step 1 Copy the example Radius.NAS.XXX section that exists in the configuration file

The remarks from the parameters and section header should be removed.

Step 2 Configure a section name of the format [Radius.NAS.my_name_for_the_NAS].

Step 3 Configure the domain, IP_address, NAS_identifier, and secret parameters:

• domain

Set the domain parameter with a valid subscriber domain name.

• IP_address

Set the IP_address parameter with the NAS IP address with which the RADIUS messages arrive. IP address should be in dotted notation (xxx.xxx.xxx.xxx).

• NAS_identifier

Set the NAS_identifier parameter with a NAS-ID attribute with which the RADIUS messages are sent.

• secret

Set the secret parameter with the secret key defined in the NAS for this connection.

3-16Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 31: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring the NAS Devices

Configuring the NAS Devices: Example This example is a portion of a configuration file illustrating how to configure the NAS:

[Radius.NAS.Access134] # Cisco's subscriber domain name domain = subscribers # IP address in dotted notation IP_address = 202.156.24.100 # name of the NAS that exists in the NAS-ID attribute NAS_identifier =ACCESS134 # secret string secret = secret123

3-17Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 32: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 3 Configuring the RADIUS Listener LEG Configuring the NAS Devices

3-18Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 33: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

CiscOL-7202-07

C H A P T E R 4

Configuring the RADIUS Client

This module describes the configuration procedure for a RADIUS Client.

Configuring the RADIUS Client The RADIUS clients are needed to send RADIUS messages to the RADIUS Listener and must be configured to do so.

Step 1 Configure the SM machine as the destination of accounting messages.

You must configure the following parameters:

• The SM IP address

• The UDP ports to which the RADIUS Listener listens

• The shared secret configured for this client in the SM configuration file

Step 2 Verify that the Accounting-Start message is sent with the correct attributes

• The attribute configured in the subscriber ID attribute mapping in the SM configuration file. See Mapping of RADIUS Attribute to Subscriber ID, page 3-8.

• The attribute configured in the subscriber IP address attribute mapping in the SM configuration file, the Framed-Route or the Framed-IP-Address. See Mapping of RADIUS Attribute to Subscriber IP Address, page 3-14.

• (Optional) The attribute configured in the Subscriber package attribute mapping in the SM configuration file. See Mapping of RADIUS Attribute to Subscriber Policy, page 3-11.

Step 3 Verify that the Accounting-Stop message is sent with the correct attributes

• The attribute configured in the subscriber ID attribute mapping in the SM configuration file. See Mapping of RADIUS Attribute to Subscriber ID, page 3-8.

• The attribute configured in the subscriber IP address attribute mapping in the SM configuration file, the Framed-Route or the Framed-IP-Address. See Mapping of RADIUS Attribute to Subscriber IP Address, page 3-14.

Note It is recommended that you configure the RADIUS client to not send Authentication and Accounting-Intermediate messages to the SM to reduce the load of packet handling.

4-4o SCMS SM RADIUS Listener LEG Reference Guide

Page 34: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 4 Configuring the RADIUS Client Configuring the RADIUS Client

4-5Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 35: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

CiscOL-7202-07

C H A P T E R 5

Using the RADIUS Listener LEG CLU

This module describes the command-line utility commands when the software is installed on the Subscriber Manager.

Information About the p3radius Utility The p3radius utility displays the RADIUS Listener configurations, status, and statistics. It also provides utilities to test RADIUS configuration and regular expression manipulation. The RADIUS Listener configuration includes all configured NAS devices and general RADIUS Listener parameters.

The p3radius command format is p3radius <operation>.

The following table lists the p3radius operations.

Table 5-1 p3radius Operations

Operation Description

--show Displays all of the NAS and RADIUS configurations and other general information (status of ports, regular expression configuration, etc.)

--show-statistics Displays counters of RADIUS messages handled and number of logon operations performed.

--test-reg-exp Returns a value indicating if the regular expression is valid or not.

--test-manipulation Validates the section definition and performs the manipulation operation on a given field's data against the specified section in a given configuration file.

--test-reduction-rule Performs reduction of the input string and returns the result.

--test-matching-rule Performs a match of the input string against a given regular expression and returns a result indicating if there is a match or not.

5-5o SCMS SM RADIUS Listener LEG Reference Guide

Page 36: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 5 Using the RADIUS Listener LEG CLU Information About the p3radius Utility

Table 5-2 p3radius Options

Option Abbreviation Description

--reg-exp=reg exp rule, [reg exp rule]

Tests the validity of regular expression patterns. Possible results are:

• <regular expression rule>is a valid regular expression pattern.

• <regular expression rule>is an invalid regular expression pattern. Also includes GNU error information.

--file=configuration_file name --fields=fieldname=fieldValue [ ,fieldname=fieldValue ] --section=section name

-f configuration_file name --fields=fieldname=fieldValue [ ,fieldname=fieldValue ] --section=section name

Tests the new/updated configuration file.

The tests are done by providing the following parameters:

• -f <path>or --file=<path>: Perform the operation on a specified configuration file.

• --field=fieldName=fieldValue: Perform the operation using specified field attribute(s), and field attribute(s) data.

<fieldName>: Property name as defined in the fields property.

<fieldValue>: String value of the field property.

• section=section name : Perform the operation on the specified section in the configuration file.

--input=string Provides the input string that is being tested using the --test-reduction-rule or the --test-manipulation-rule operations.

5-6Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 37: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 5 Using the RADIUS Listener LEG CLU Information About the p3radius Utility

Viewing the RADIUS Listener LEG Status The following is an example using the p3radius command-line utility with the show operation:

>p3radius --show RADIUS Listener information ============================ running: true accounting port: 1813 packet types : accounting-start, accounting-interim, accounting-stop NASs: none Subscriber ID ============= user_name: radius attribute: 1 type: string vpn: VSA Vendor-id: 1 sub attribute: 2 type: string Separator configuration rule: Separator=user_namevpn Subscriber IP Address ===================== IP Configuration: filter-id: radius attribute: 2 type: integer VPN Configuration: vpn: radius attribute: 26 type: integer Properties ========== property name: packageId ------------------------ vpn: VSA Vendor-id: 1 sub attribute: 2 type: string user_name: radius attribute: 1 type: string Reduction configuration rules: Field=vpn; Pattern=.* Field=user_name; Pattern=.* Matching configuration rules: Matching Pattern=.*; Matching Value=2 Matching Pattern=123; Matching Value=3 property name: monitor ---------------------- filter-id: radius attribute: 2 type: integer Matching configuration rules: Matching Pattern=^$; Matching Value=1 property name: upVlinkId ------------------------ property name: downVlinkId -------------------------- Command terminated successfully >

5-7Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 38: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 5 Using the RADIUS Listener LEG CLU Information About the p3radius Utility

Viewing the RADIUS Listener LEG Statistics The following is an example of the p3radius command-line utility with the show-statistics operation:

>p3radius --show-statistics Statistics: =========== Packets Received: 0 Packets Transmitted: 0 Accounting Request: 0 Accounting Start: 0 Accounting Interim: 0 Accounting Stop: 0 Accounting Response: 0 Dropped: 0 Successful logins: 0 Failed logins: 0 Successful logouts: 0 Failed logouts: 0 Command terminated successfully >

Testing a Section in a Configuration File The following is an example of the p3radius command-line utility with the test-manipulation operation:

p3radius --test-manipulation -f regExpTest.cfg --section="Radius.Subscriber ID" --fields=user_name=,vsa=cisco.LTD.sanjose,filter-id=172.16.1.1 The following fields parameter were being extracted: field_name=user_name, field_data= field_name=vsa, field_data=cisco.LTD.sanjose field_name=filter-id, field_data=172.16.1.1 reduction rules: user_name pattern: (.*)@.* vsa pattern: (.*).LTD(.*) filter-id pattern: .* separator: user_name-vsa@filter-id Reduction iteration [0]: field data=, RegExp Pattern=(.*)@.*, concatenated string (with separator)=- Reduction iteration [1]: field data=cisco.LTD.sanjose, RegExp Pattern=(.*).LTD(.*), concatenated string (with separator)=-cisco.sanjose@ Reduction iteration [2]: field data=172.16.1.1, RegExp Pattern=.*, concatenated string (with separator)=-cisco.sanjose@ Manipulation result:-cisco.sanjose@ Command terminated successfully >

5-8Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 39: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 5 Using the RADIUS Listener LEG CLU Information About the p3radius Utility

Testing a Reduction Rule The following is an example of the p3radius command-line utility with the test-reduction-rule operation:

p3radius --test-reduction-rule --reg-exp=(.*)@.*,.*@(.*) [email protected] Pattern: '(.*)@.*'; String to reduce: '[email protected]'; Reduction result: 'user' Pattern: '.*@(.*)'; String to reduce: '[email protected]'; Reduction result: 'cisco.com' Command terminated successfully >

Testing a Matching Rule The following is an example of the p3radius command-line utility with the test-matching-rule operation:

p3radius --test-matching-rule --reg-exp=^user$,user,users [email protected] Pattern: 'user'; String to match: '[email protected]'; Match found Pattern: users; String to match: [email protected]; Matching not found Command terminated successfully >

5-9Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 40: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Chapter 5 Using the RADIUS Listener LEG CLU Information About the p3radius Utility

5-10Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07

Page 41: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Cisco SCMOL-7202-07

A

P P E N D I X A Domain Association Algorithm

This module describes the algorithm used for deciding the subscriber domain to which a subscriber should be logged on.

Domain Association Algorithm The Radius Listener decides to which domain the subscriber should be logged on, according to the NAS that sent the Accounting-Start message.

However, if the only NAS the Radius Listener is configured with is the proxy device (as illustrated in the following diagram), which is the device from where the RADIUS Listener receives messages, the RADIUS listener cannot distinguish between NAS1 and NAS2 subscribers and cannot map them to different subscriber domains.

Figure A-1 Example of when the only NAS that the Radius Listener is configured with is the

Proxy Device

1571

07

RADIUSServer/Proxy

SCE

TrafficLinks

ControlLinks

NAS 1

SCE

Edge Router

NAS 2

RADIUSListener

Internet

A-1S SM RADIUS Listener LEG Reference Guide

Page 42: Cisco SCMS SM RADIUS Listener LEG Reference Guide...vi Cisco SCMS SM RADIUS Listener LEG Reference Guide OL-7202-07 Preface Description of Changes † Rearranged the topic order to

Appendix A Domain Association Algorithm Domain Association Algorithm

To solve the problem of distinguishing between two NAS devices, the following algorithm is used:

• If a NAS-Identifier attribute exists in the Accounting-Start message and a NAS device is configured with that identifier, this NAS subscriber domain configuration is used.

• If the NAS-Identifier attribute does not exist, the same test will be performed on the NAS-IP-Address attribute. If the NAS-IP-Address attribute exists in the Accounting-Start message the NAS device was configured, this NAS domain configuration is used.

• Otherwise, the domain configured for the NAS identified by the Accounting-Start packet source IP address is used.

Using the Radius attributes provides the ability to distinguish between the two NAS devices.

Note If none of the three NAS identification characteristics (packet source IP, NAS-Identifier, or NAS-IP-Address) matches the Radius message, the message is dropped because of Radius packet processing reasons. The domain selection stage will not be performed.

A-2Cisco SCMS SM RADIUS Listener LEG Reference Guide

OL-7202-07