在之前的公司使用過此方法來管理交換機,不過網絡設備都是華爲的,現在的公司大部分使用cisco設備,配置方法跟之前差不多,貼上來供大家參考吧。對於交換機的管理來說,nps爲交換機提供外部的認證,可以爲不同組建立不同權限,但是具體到視圖權限的控制還是要在交換機上設定。
一、前提條件
服務器:Windows Server 2012 R2 NPS服務
交換機:Cisco3560
二、配置
1.配置NPS服務器
1.1安裝角色
添加角色“網絡策略和訪問服務”中的網絡策略服務器;
1.2添加網絡策略
未加密的身份驗證(PAP,SPAP)(S),其他都用默認即可。
保存重啓服務器後才生效
1.3修改網絡策略
a.概述->忽略用戶賬戶的撥入屬性
b.設置->Radius屬性->標準只保留以下兩項:
Service-Type->其他->Login
Login-Service->SSH
1.4添加Radius客戶端
2.交換機配置
TIDE-CISCO3560#show run
Building configuration...
Current configuration : 14132 bytes
!
! Last configuration change at 13:42:15 BJ Tue Dec 2 2014 by wangchao3
! NVRAM config last updated at 13:42:13 BJ Tue Dec 2 2014 by wangchao3
!
version 12.2
no service pad
no service timestamps debug uptime
service timestamps log datetime msec
no service password-encryption
!
hostname TIDE-CISCO3560
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$T4Dh$cv/NDd0lGC86ifSjl3obD/
!
username admin privilege 5 secret 5 $1$O6Fj$Cdt5ifcPnRmpOl3PWjR4.1
!
!
aaa new-model
!
!
aaa group server radius Nps01
server-private 10.1.200.23 auth-port 1645 acct-port 1646 key 7 095C4F1A0A1218000F
!
aaa authentication login default group Nps01 local
aaa authorization exec default group Nps01 local
!
!
!
aaa session-id common
clock timezone BJ 0 8
system mtu routing 1500
ip routing
!
!
ip dhcp snooping vlan 144
ip dhcp snooping
no ip domain-lookup
ip domain-name tidepharm.com
ip arp inspection vlan 144
ip radius source-interface Loopback0
!
privilege interface level 5 switchport
privilege interface level 5 ip arp
privilege interface level 5 ip address
privilege configure level 5 interface
privilege configure level 5 vlan
privilege exec level 5 configure terminal
privilege exec level 5 show running
!
line con 0
line vty 0 4
exec-timeout 15 0
transport input ssh
line vty 5 15
exec-timeout 0 1
transport input ssh