Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

RADIUS Authentication for L2TP

Configure RADIUS Authentication for L2TP

The L2TP network server (LNS) sends RADIUS authentication requests or accounting requests. Authentication requests are sent out to the authentication server port. Accounting requests are sent to the accounting port. To configure RADIUS authentication for L2TP on an M10i or M7i router, include the following statements at the [edit access] hierarchy level:

Note:

The RADIUS servers at the [edit access] hierarchy level are not used by the network access server process (NASD).

You can specify an accounting port number on which to contact the accounting server (in the accounting-port statement). Most RADIUS servers use port number 1813 (as specified in RFC 2866, Radius Accounting).

Note:

If you enable RADIUS accounting at the [edit access profile profile-name accounting-order] hierarchy level, accounting is triggered on the default port of 1813 even if you do not specify a value for the accounting-port statement.

server-address specifies the address of the RADIUS authentication server (in the radius-server statement).

You can specify a port number on which to contact the RADIUS authentication server (in the port statement). Most RADIUS servers use port number 1812 (as specified in RFC 2865, Remote Authentication Dial In User Service [RADIUS] ).

You must specify a password in the secret statement. If a password includes spaces, enclose the password in quotation marks. The secret used by the local router must match that used by the RADIUS authentication server.

Optionally, you can specify the amount of time that the local router waits to receive a response from a RADIUS server (in the timeout statement) and the number of times that the router attempts to contact a RADIUS authentication server (in the retry statement). By default, the router waits 3 seconds. You can configure this to be a value in the range from 1 through 90 seconds. By default, the router retries connecting to the server three times. You can configure this to be a value in the range from 1 through 30 times. If the maximum number of retries is reached, the radius server is considered dead for 5 minutes (300 seconds).

In the source-address statement, specify a source address for each configured RADIUS server. Each RADIUS request sent to a RADIUS server uses the specified source address. The source address is a valid IPv4 address configured on one of the router interfaces.

To configure multiple RADIUS servers, include multiple radius-server statements.

Note:

When the L2TP network server (LNS) is configured with RADIUS authentication, the default behavior is to accept the preferred RADIUS-assigned IP address. Previously, the default behavior was to accept and install the nonzero peer IP address received by the Internet Protocol Control Protocol (IPCP) configuration request packet.

Configure RADIUS Authentication for an L2TP Client and Profile

On an M10i or M7i router, L2TP supports RADIUS authentication and accounting for users with one set of RADIUS servers under the [edit access] hierarchy. You can also configure RADIUS authentication for each tunnel client or user profile.

To configure the RADIUS authentication for L2TP tunnel clients on an M10i or M7i router, include the ppp-profile statement with the l2tp attributes for tunnel clients:

ppp-profile profile-name specifies the profile used to validate PPP session requests through L2TP tunnels. Clients of the referenced profile must have only PPP attributes. The referenced group profile must be defined.

To configure the RADIUS authentication for a profile, include following statements at the [edit access profile profile-name] hierarchy level:

When a PPP user initiates a session and RADIUS authentication is configured for the user profile on the tunnel group, the following priority sequence is used to determine which RADIUS server is used for authentication and accounting:

  • If the ppp-profile statement is configured under the tunnel client (LAC), the RADIUS servers configured under the specified ppp-profile are used.

  • If RADIUS servers are configured under the user profile for the tunnel group, those servers will be used.

  • If no RADIUS server is configured for the tunnel client (LAC) or user profile, then the RADIUS servers configured at the [edit access] hierarchy level are used.

RADIUS Local Loopback Interface Attribute for L2TP

You can configure the Local-Loopback-Interface attribute on a RADIUS server to manage multiple LAC devices. This attribute is used as the LAC source address on an LNS tunnel for PPPoE subscribers tunneled over L2TP.

When you use the Tunnel-Client-Endpoint attribute as the LAC source address, you must configure the Tunnel-Client-Endpoint attribute for each MX Series router that uses the same RADIUS server. Starting with this release you can use the Local-Loopback-Interface attribute, which needs to be configured only once. When the LAC initiates an Access-Request message to RADIUS for authentication, RADIUS returns the Local-Loopback-Interface attribute in the Access-Accept message. This attribute contains the name of the loopback interface, either as a generic interface name such as “lo0” or as a specific name like “lo0.0”. The MX Series router then uses the configured loopback interface IP address as the source address during tunnel negotiation with the LNS.

Note:

An MX Series router can act as the LAC and use any interface address on it as an L2TP tunnel source address. The source address can be dynamically assigned by RADIUS through the Tunnel-Client-Endpoint or Local-Loopback-Interface attribute. The tunnel source address can be statically configured on the MX Series router by using the L2TP tunnel profile. If RADIUS does not return the Tunnel-Client-Endpoint or Local-Loopback-Interface attribute, and if there is no corresponding L2TP tunnel profile configured on the MX Series router, then the L2TP tunnel fails to initiate because the router does not have a proper tunnel source address. In this case, the router can use the locally configured loopback address as the source address to successfully establish the L2TP tunnel.

Example: Configure RADIUS Authentication for L2TP

Configuration

CLI Quick Configuration

The following example shows how to configure RADIUS authentication for L2TP:

Example: Configure RADIUS Authentication for an L2TP Profile

Configuration

CLI Quick Configuration

Configure the RADIUS Disconnect Server for L2TP

To configure the RADIUS disconnect server to listen for disconnect requests from an administrator and process them, include the following statements at the [edit access] hierarchy level:

port-number is the server port to which the RADIUS client sends disconnect requests. The L2TP network server, which accepts these disconnect requests, is the server. You can specify a port number on which to contact the RADIUS disconnect server. Most RADIUS servers use port number 1700.

Note:

The Junos OS accepts only disconnect requests from the client address configured at the [edit access radius-disconnect client-address] hierarchy level.

client-address is the host sending disconnect requests to the RADIUS server. The client address is a valid IP address configured on one of the router or switch interfaces.

password authenticates the RADIUS client. Passwords can contain spaces. The secret used by the local router must match that used by the server.

For information about how to configure RADIUS authentication for L2TP, see Configuring RADIUS Authentication for L2TP.

The following example shows the statements to be included at the [edit access] hierarchy level to configure the RADIUS disconnect server:

Configure RADIUS Accounting Order for L2TP

You can configure RADIUS accounting for an L2TP profile. With RADIUS accounting enabled, Juniper devices can act as RADIUS clients. They can notify the RADIUS server about user activities such as software logins, configuration changes, and interactive commands. The framework for RADIUS accounting is described in RFC 2866.

To configure RADIUS accounting, include the accounting-order statement at the [edit access profile profile-name] hierarchy level:

When you enable RADIUS accounting for an L2TP profile, it applies to all the clients within that profile. You must enable RADIUS accounting on at least one LT2P profile for the RADIUS authentication server to send accounting stop and start messages.

Note:

When you enable RADIUS accounting for an L2TP profile, you do not need to configure the accounting-port statement at the [edit access radius-server server-address] hierarchy level. When you enable RADIUS accounting for an L2TP profile, accounting is triggered on the default port of 1813.

For L2TP, RADIUS authentication servers are configured at the [edit access radius-server] hierarchy level.

Example: Configure RADIUS-Based Subscriber Authentication and Accounting

Configuration

CLI Quick Configuration

RADIUS Attributes for L2TP

Junos OS supports the following types of RADIUS attributes for L2TP:

  • Juniper Networks vendor-specific attributes (VSAs)

  • Attribute-value pairs (AVPs) defined by the Internet Engineering Task Force (IETF)

  • RADIUS accounting stop and start AVPs

Juniper Networks vendor-specific RADIUS attributes are described in RFC 2865, Remote Authentication Dial In User Service (RADIUS). These attributes are encapsulated with the vendor ID set to the Juniper Networks ID number 2636. Table 1 lists the Juniper Networks VSAs you can configure for L2TP.

Table 1: Juniper Networks Vendor-Specific RADIUS Attributes for L2TP

Attribute Name

Standard Number

Value

Juniper-Primary-DNS

31

IP address

Juniper-Primary-WINS

32

IP address

Juniper-Secondary-DNS

33

IP address

Juniper-Secondary-WINS

34

IP address

Juniper-Interface-ID

35

String

Juniper-IP-Pool-Name

36

String

Juniper-Keep-Alive

37

Integer

Table 2 lists the IETF RADIUS AVPs supported for LT2P.

Table 2: Supported IETF RADIUS Attributes for L2TP

Attribute Name

Standard Number

Value

User-Name

1

String

User-Password

2

String

CHAP-Password

3

String

NAS-IP-Address

4

IP address

NAS-Port

5

Integer

Service-Type

6

Integer

Framed-Protocol

7

Integer

Framed-IP-Address

8

IP address

Framed-IP-Netmask

9

IP address

Framed-MTU

12

Integer

Framed-Route

22

String

Session-Timeout

27

Integer

Idle-Timeout

28

Integer

Called-Station-ID

30

String

Calling-Station-ID

31

String

CHAP-Challenge

60

String

NAS-Port-Type

61

Integer

Framed-Pool

88

Integer

Table 3 lists the supported RADIUS accounting start AVPs for L2TP.

Table 3: Supported RADIUS Accounting Start Attributes for L2TP

Attribute Name

Standard Number

Value

User-Name

1

String

NAS-IP-Address

4

IP address

NAS-Port

5

Integer

Service-Type

6

Integer

Framed-Protocol

7

Integer

Framed-IP-Address

8

IP address

Called-Station-ID

30

String

Calling-Station-ID

31

String

Acct-Status-Type

40

Integer

Acct-Delay-Time

41

Integer

Acct-Session-ID

44

String

Acct-Authentic

45

Integer

NAS-Port-Type

61

Integer

Tunnel-Client-Endpoint

66

String

Tunnel-Server-Endpoint

67

String

Acct-Tunnel-Connection

68

String

Tunnel-Client-Auth-ID

90

String

Tunnel-Server-Auth-ID

91

String

Table 4 lists the supported RADIUS accounting stop AVPs for L2TP.

Table 4: Supported RADIUS Accounting Stop Attributes for L2TP

Attribute Name

Standard Number

Value

User-Name

1

String

Local-Loopback-Interface

3

String

NAS-IP-Address

4

IP address

NAS-Port

5

Integer

Service-Type

6

Integer

Framed-Protocol

7

Integer

Framed-IP-Address

8

IP address

Called-Station-ID

30

String

Calling-Station-ID

31

String

Acct-Status-Type

40

Integer

Acct-Delay-Time

41

Integer

Acct-Input-Octets

42

Integer

Acct-Output-Octets

43

Integer

Acct-Session-ID

44

String

Acct-Authentic

45

Integer

Acct-Session-Time

46

Integer

Acct-Input-Packets

47

Integer

Acct-Output-Packets

48

Integer

Acct-Terminate-Cause

49

Integer

Acct-Multi-Session-ID

50

String

Acct-Link-Count

51

Integer

NAS-Port-Type

61

Integer

Tunnel-Client-Endpoint

66

String

Tunnel-Server-Endpoint

67

String

Acct-Tunnel-Connection

68

String

Tunnel-Client-Auth-ID

90

String

Tunnel-Server-Auth-ID

91

String