Networking NVIDIA NVOS User Manual for InfiniBand Switches

RADIUS

NVOS supports RADIUS authentication with minimal configuration. You do not need to create user accounts or directories on the switch. Authentication uses PAM and includes login, ssh, the REST API, sudo, and su.

RADIUS Client

RADIUS configuration has global settings and per-server settings. If you do not set a per-server setting, the server uses the global setting.

For the RADIUS commands, see RADIUS Commands. In the REST API, global settings are under /system/aaa/radius and per-server settings are under /system/aaa/radius/server/<server-id>.

RADIUS Users

NVOS supports three types of RADIUS users, based on the Management-Privilege-Level attribute set on the RADIUS server:

  • 15: admin users. They can run all nv commands, including nv set and nv config apply.

  • 7: monitor users. They can run nv show commands only.

  • 1: non-privileged users. They cannot run nv commands.

RADIUS Server Setup and Usage Example

You can set up the RADIUS server on a remote host, or on the switch itself for testing.

Basic RADIUS Server Configuration

For a basic RADIUS server configuration, add entries to the users and clients.conf files on the RADIUS server.

User File Example

radius_user Cleartext-Password := "radius_user_password"
        Management-Privilege-Level := <15,7,1>

Client File Example

client client_name {
        ipaddr          = 10.1.2.3
        secret          = radius-secret
}
# Or a CIDR block:
client 10.0.0.0/8 {
        secret          = testing-radius
}

Set Up a Basic FreeRADIUS Server

  1. On a Debian-based Linux host, install FreeRADIUS:

    sudo apt-get update
    sudo apt-get install freeradius -y
    
  2. Add the IP address of the switch (the RADIUS client) to the /etc/freeradius/3.0/clients.conf file:

    client client_name {
            ipaddr          = <CLIENT_IP>
            secret          = mysecret
    }
    

    Or use a CIDR block:

    client 10.0.0.0/8 {
            secret          = global-secret
    }
    
  3. Add the RADIUS users to the /etc/freeradius/3.0/users file:

    radius_admin_user Cleartext-Password := "radius_password"
            Management-Privilege-Level := 15
    
    radius_monitor_user Cleartext-Password := "radius_password"
            Management-Privilege-Level := 7
    
    radius_non_priv_user Cleartext-Password := "radius_password"
            Management-Privilege-Level := 1
    
  4. Restart the FreeRADIUS service and make sure it is running:

    sudo service freeradius restart
    sudo service freeradius status
    
  5. Configure the RADIUS client on the switch to use the server:

    admin@nvos:~$ nv set system aaa radius server <radius-server-ip> secret radius-secret
    admin@nvos:~$ nv set system aaa authentication order radius local
    admin@nvos:~$ nv config apply -y
    

    For example:

    admin@nvos:~$ nv set system aaa radius server 192.168.0.254 port 42
    admin@nvos:~$ nv set system aaa radius server 192.168.0.254 secret 'myradius$key'
    admin@nvos:~$ nv set system aaa radius server 192.168.0.254 priority 1
    admin@nvos:~$ nv set system aaa authentication order radius local
    admin@nvos:~$ nv config apply
    
  6. Log in with one of the configured users.

Optional RADIUS Configuration

You can configure the following global and per-server RADIUS settings:

Setting

Description

retransmit

The number of times the switch retries a RADIUS request that times out. You can set 0 to 10; the default is 0.

timeout

The number of seconds to wait for a reply from a RADIUS server. You can set 1 to 60 seconds; the default is 5. You can set a global timeout and a timeout for each server.

auth-type

The RADIUS authentication type: chap, pap, or mschapv2 (the default).

statistics

Records RADIUS statistics: enabled or disabled (the default). This is a global setting only.

The following example configures global RADIUS settings:

admin@nvos:~$ nv set system aaa radius retransmit 8
admin@nvos:~$ nv set system aaa radius timeout 10
admin@nvos:~$ nv set system aaa radius auth-type chap
admin@nvos:~$ nv set system aaa radius statistics enabled
admin@nvos:~$ nv config apply

The following example configures RADIUS settings for a specific RADIUS server:

admin@nvos:~$ nv set system aaa radius server 192.168.0.254 port 1811
admin@nvos:~$ nv set system aaa radius server 192.168.0.254 retransmit 5
admin@nvos:~$ nv set system aaa radius server 192.168.0.254 auth-type chap
admin@nvos:~$ nv set system aaa radius server 192.168.0.254 timeout 10
admin@nvos:~$ nv config apply

Show RADIUS Configuration

To show global RADIUS configuration, run the nv show system aaa radius command:

admin@nvos:~$ nv show system aaa radius
            operational    applied
----------  -------------  -------------
port        1812           1812
auth-type   mschapv2       mschapv2
timeout     5              5
retransmit  0              0
statistics  disabled       disabled
[server]    192.168.0.254  192.168.0.254

To show all the configured RADIUS servers, run the nv show system aaa radius server command:

admin@nvos:~$ nv show system aaa radius server
Server         Port  Priority  Password   Timeout
-------------  ----  --------  --------   -------
192.168.0.254  42    1         *          10

To show the configuration of one RADIUS server, run the nv show system aaa radius server <server-id> command:

admin@nvos:~$ nv show system aaa radius server 192.168.0.254
           operational   applied
---------  ------------  ------------
port       42            42
timeout    10            10
secret     *             *
priority   1             1

Considerations

If two or more RADIUS users log in simultaneously, a UID lookup only returns the user that logs in first. Any process that either user runs applies to both, and all files that either user creates apply to the first name matched. This process is similar to adding two local users to the password file with the same UID and GID, and is an inherent limitation of using the UID for the fixed user from the password file. The current algorithm returns the first name matching the UID from the mapping file, which is either the first or second user that logs in.

Last updated: