思科交换机802.1X有线配置
思科交换机
Catalyst 交换机配置
复制代码
aaa new-model //启用aaaaaa authentication dot1x default group radius // dot1x 使用radius 做认证aaa authorization network default group radius //使用802.1x 协议去动态分配vlandot1x system-auth-control //允许802.1x port-based 认证dot1x guest-vlan supplicant// 允许交换机在端口802.1x 认证失败后,指定vlan 到guest-vlanradius-server host 192.168.1.1 auth-port 1812 acct-port 1813 key Password//设置radius server 的ip 地址和端口,以及认证的passwordradius-server dead-criteria time 5 tries 3//判断radius是否有问题标准,尝试3次,每次5秒,通过15秒相应,判断radius是否有问题,并做相应策略radius-server vsa send accountingradius-server vsa send authentication//需要通过802.1x 来指定端口的vlan,需要这两条配置命令。
以下为接口下配置
复制代码
interface FastEthernet0/3switchport mode access//dot1x 指定vlan, switchport mode 必须为accessdot1x port-control auto //开启dot1x 端口认证dot1x timeout quiet-period 10//switch 在与client 认证失败后的静默时间。默认是60s,我设置为10dot1x timeout tx-period 4dot1x timeout supp-timeout 4//switch 和client 之间认证等待的时间dot1x timeout server-timeout 4//switch 到radius server 的timeout 时间dot1x max-req 2//switch 和client 之间认证重试的次数,默认是2 次authentication event fail action next-methodauthentication event server dead action authorize vlan 80//服务器down掉时接入指定的vlanauthentication event sever alive action reinitialize //服务器alive时,重新开始认证dot1x host-mode single-host//host-mode 是针对在端口下通过hub 有多台机器上网的问题设置的。默认的single-host 只允许一台机器能够使用该端口;如果是multi-host, 那么只要第一台能够认证通过,那么其他接到这个hub 的机器就都能使用,但是如果第一台认证的机器没有通过认证,那么这个hub 上的任何机器就都fail 掉。spanning-tree portfast //开启快速生成树,只能开在接主机的口不要开在连其他交换机口上dot1x pae authenticator
NEXUS 交换机命令和官方文档
复制代码
switch# configure terminalswitch(config)# feature dot1xswitch(config)# aaa group server radius RADswitch(config)# radius-server host 192.168.0.225 key 7 "fewhg" authentication accountingswitch(config)# server 192.168.0.225aaa authentication dot1x default group RADswitch(config)# radius-server retransmit 3switch(config)# radius-server timeout {5}switch(config)# radius-server deadtime {5}switch (config)#aaa group server radius {group-name }switch (config-radius)# server {ipv4-address}(Optional) switch (config-radius)# deadtime {minutes}(Optional) switch(config-radius)# source-interface interface {interface}switch(config)# interface ethernet 2/1switch(config-if)# dot1x port-control autoswitch(config-if)# dot1x max-reauth-req {3}switch(config-if)# dot1x host-mode {multi-host}switch(config-if)# dot1x pae authenticator(Optional) dot1x timeout quiet-period {seconds}switch(config-if)# dot1x timeout ratelimit-period {10}switch(config-if)# dot1x timeout server-timeout {60}switch(config-if)# dot1x timeout supp-timeout {20}switch(config-if)# dot1x timeout tx-period {40}switch(config)# authentication event server dead action authorize vlan 20
阅读剩余
版权声明:
作者:SE_Gao
链接:https://www.cnesa.cn/2192.html
文章版权归作者所有,未经允许请勿转载。
THE END