This document describes how to configure RADIUS Authentication on Cisco IOS® switches with a third party RADIUS server (FreeRADIUS). This example covers the placement of a user directly into privilege 15 mode upon authentication.
Ensure that you have your Cisco switch defined as a client in FreeRADIUS with the IP address and the same shared secret key defined on FreeRADIUS and the switch.
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Switch(config)#username admin privilege 15 password 0 cisco123!
switch(config)# aaa new-model
switch# configure terminal
switch(config)#radius-server host 172.16.71.146 auth-port 1645 acct-port 1646
switch(config)#radius-server key hello123
switch# test aaa server Radius 172.16.71.146 user1 Ur2Gd2BH
switch(config)#aaa authentication login default group radius local
switch(config)#aaa authorization exec default group radius if-authenticated
Define the Client on the FreeRADIUS Server
# cd /etc/freeradius
# sudo nano clients.conf
client 192.168.1.1 {
secret = secretkey
nastype = cisco
shortname = switch
}
# sudo nano users
cisco Cleartext-Password := "password"
Service-Type = NAS-Prompt-User,
Cisco-AVPair = "shell:priv-lvl=15"
# sudo /etc/init.d/freeradius restart
DEFAULT Group == cisco-rw, Auth-Type = System
Service-Type = NAS-Prompt-User,
cisco-avpair :="shell:priv-lvl=15"
sudo nano/etc/freeradius/users
life Cleartext-Password := "testing"
Service-Type = NAS-Prompt-User,
Cisco-AVPair = "shell:priv-lvl=3"
Restart the FreeRADIUS service:
sudo /etc/init.d/freeradius restart
In order to verify the configuration on the switch, use these commands:
switch# show run | in radius (Show the radius configuration)
switch# show run | in aaa (Show the running AAA configuration)
switch# show startup-config Radius (Show the startup AAA configuration in
start-up configuration)
There is currently no specific troubleshooting information available for this configuration.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
11-Jul-2013 |
Initial Release |