CISCO交换机AAA配置

一、RADIUS相关配置

【必要命令】

全局模式
switch(config)# aaa new-model
注:启用AAA认证
switch(config)# aaa authentication dot1x default group radius local
注:启用AAA通过RADIUS服务器做认证
switch(config)# aaa authorization network default group radius local
注:启用AAA通过RADIUS服务器做授权
switch(config)# dot1x system-auth-control
注:开启全局dot1x控制
switch(config)# dot1x guest-vlan supplicant
注:允许dot1x验证失败后加入guestvlan
switch(config)# radius-server host 10.134.1.207 auth-port 1812 acct-port 1813 key 123456
注:指定NPS服务器的ip地址、认证和授权端口、以及通信密码
switch(config)# radius-server vsa send authentication
注:允许交换机识别和使用IETF规定的VSA值,用于接受NPS分配vlan
switch(config)# ip radius source-interface vlan 2
注:当交换机有多个IP时,只允许该vlan段的IP作为发送给RADIUS服务器的IP地址


端口模式
switch(config)# interface FastEthernet0/10
注:进入端口模式(批量端口配置命令:interface range FastEthernet0/1 - 48)
switch(config-if)# switchport mode access
注:端口配置dot1x前必须设置为access模式
switch(config-if)# mab(IOS 12.2之前的版本命令:dot1x mac-auth-bypass)
注:当dot1x验证超时后会以mac为用户名密码发起验证
switch(config-if)# dot1x pae authenticator
注:设置交换机的pae模式
switch(config-if)# authentication port-control auto(IOS 12.2之前的版本命令:dot1x port-control auto)
注:设置dot1x端口控制方式,auto为验证授权
switch(config-if)# authentication event no-response action authorize vlan 3(IOS 12.2之前的版本命令:dot1x guest-vlan 3)
注:NPS验证失败时放置的vlan


【可选命令】

全局模式
switch(config)# radius-server retransmit 2
注:交换机向RADIUS服务器发送报文的重传次数
switch(config)# radius-server timeout 2
注:交换机向RADIUS服务器发送报文的超时时间

端口模式
switch(config-if)# dot1x timeout tx-period 2
注:交换机向dot1x端口定期多长时间发报文
switch(config-if)# dot1x timeout supp-timeout 2
注:交换机向客户端发送报文,客户端未回应,多长时间后重发
switch(config-if)# dot1x timeout server-timeout 2
注:交换机向RADIUS服务器发送报文,服务器未回应,多长时间后重发



二、其他

【必要命令】

SNMP设置
switch(config)# snmp-server community skylark RW
注:用于管理交换机,接收交换机相关信息


DHCP中继代理(在网关交换机上配置)
switch(config)# interface vlan 2
注:进入vlan接口
switch(config-if)# ip helper-address 10.134.1.207
注:设置DHCP地址,使不同vlan的客户端可以获取IP地址


【可选命令】

DHCP SNOOPING
switch(config)# ip dhcp snooping
注:开启全局DHCP SNOOPYING功能
switch(config)# ip dh

cp snooping vlan 2
注:指定DHCP SNOOPYING范围
switch(config)# interface g0/1
注:进入接口(配置级联端口和连接DHCP服务器的端口为信任端口)
switch(config-if)# ip dhcp snooping trust
注:设置该端口为信任端口,默认其它未设置端口则为不信任端口,丢弃不信任的DHCP报文


IP SOURCE GUARD
switch(config)# interface vlan 2
注:进入vlan接口
switch(config-if)# ip verify source port-security
注:动态绑定DHCP-SNOOPING表项,过滤掉其它数据(无port-security则只绑定ip,有port-security则是绑定ip+mac)

相关命令
show ip dhcp snooping binding



STP生成树
Switch(config-if)# spanning-tree portfast
注:生成树的端口快速转发,更加快速从DHCP获取IP地址


端口错误检测
switch(config)# errdisable recovery cause all
注:防止交换机端口因异常被关闭,恢复其正常状态
switch(config)# errdisable recovery interval 30
注:设置交换机端口故障关闭时间,过后关闭的端口自动打开





相关主题
相关文档
最新文档