Mapping Application Terminate Reasons to RADIUS Terminate Codes
The JUNOSe software uses a default configuration that maps terminate reasons to RADIUS Acct-Terminate-Cause attributes. You can optionally create customized mappings between a terminate reason and a RADIUS Acct-Terminate-Cause attributethese mappings enable you to provide different information about the cause of a termination.
When a subscriber's L2TP or PPP session is terminated, the router logs a message for the internal terminate reason and logs another message for the RADIUS Acct-Terminate-Cause attribute (RADIUS attribute 49). RADIUS attribute 49 is also included in RADIUS Acct-Off and Acct-Stop messages. You can use the logged information to help monitor and troubleshoot terminated sessions.
Use the show terminate-code command to display information about the mappings between application terminate reasons and RADIUS Acct-Terminate-Cause attributes.
Table 9 lists the IETF RADIUS Acct-Terminate-Cause codes that you can use to map application terminate reasons. In addition, you can also configure and use proprietary codes for values beyond 22.
Configuration Example
This example describes a sample configuration procedure that creates custom mappings for PPP terminate reasons.
- Configure the router to include the Acct-Terminate-Cause attribute in RADIUS Acct-Off messages.
host1(config)#radius include acct-terminate-cause acct-off enable- (Optional) Display the current PPP terminate-cause mappings.
host1(config)#run show terminate-code pppRadiusApps Terminate Reason Description Code--------- -------------------------- -------------------------- ------ppp authenticate-authenticator authenticate authenticator 17-timeout timeoutppp authenticate-challenge-tim authenticate challenge tim 10eout eoutppp authenticate-chap-no-resou authenticate chap no resou 10rces rcesppp authenticate-chap-peer-aut authenticate chap peer aut 17henticator-timeout henticator timeoutppp authenticate-deny-by-peer authenticate deny by peer 17ppp authenticate-inactivity-ti authenticate inactivity ti 4meout meout--More--host1(config)#terminate-code ppp ?authenticate-authenticator-timeout Configure authenticateauthenticator timeouttranslationauthenticate-challenge-timeout Configure authenticatechallenge timeout translationauthenticate-chap-no-resources Configure authenticate chap noresources translationauthenticate-chap-peer-authenticator-timeout Configure authenticate chappeer authenticator timeouttranslationauthenticate-deny-by-peer Configure authenticate deny bypeer translation--More--
- Configure your customized PPP terminate-cause to RADIUS Acct-Terminate-Cause code mappings.
host1(config)#terminate-code ppp authenticate-authenticator-timeout radius 3host1(config)#terminate-code ppp authenticate-challenge-timeout radius 4- Verify the new terminate-cause mappings.
host1(config)#run show terminate-code pppRadiusApps Terminate Reason Description Code--------- -------------------------- -------------------------- ------ppp authenticate-authenticator authenticate authenticator 3-timeout timeoutppp authenticate-challenge-tim authenticate challenge tim 4eout eoutppp authenticate-chap-no-resou authenticate chap no resou 10rces rcesppp authenticate-chap-peer-aut authenticate chap peer aut 17henticator-timeout henticator timeoutppp authenticate-deny-by-peer authenticate deny by peer 17ppp authenticate-inactivity-ti authenticate inactivity ti 4meout meoutppp authenticate-max-requests authenticate max requests 10--More--radius include acct-terminate-cause
- Use to include the Acct-Terminate-Cause attribute (RADIUS attribute 49) in RADIUS Acct-Off messages.
- You control inclusion of the Acct-Terminate-Cause attribute by enabling or disabling this command.
- Example
host1(config)#radius include acct-terminate-cause acct-off disableUse the no version to restore the default, enable. terminate-code
- Use to configure a customized mapping relationship between an application's terminate reason and a RADIUS Acct-Terminate-Cause code (RADIUS attribute 49).
- To set up the mapping, specify the following variables with this command:
- Specify the application where the terminate event occurs. You can specify aaa, l2tp, ppp, or radius-client.
- Specify the application's terminate reason that you want to map.
- Use the question mark character (?) to display a list of the application's terminate reasons. For example:
host1(config)#terminate-code l2tp ?See Chapter 7, Application Terminate Reasons for a list of the default terminate reasons for the AAA, L2TP, PPP, and RADIUS client applications.
- Specify RADIUS as the translation application that is used for mapping. Then, specify the RADIUS Acct-Terminate-Cause code that you want to map to the application's terminate reason. See Table 9 for a list of supported RADIUS codes.
host1(config)#terminate-code ppp authenticate-challenge-timeout radius 4Use the no version to restore a default mapping, which are listed in Chapter 7, Application Terminate Reasons. For example: host1(config)#no terminate-code aaa deny-address-allocation-failure radius