!
也想出现在这里? 联系我们
广告位
当前位置:首页>教程分享>网站教程>华为、华三、锐捷、思科、迈普交换机802.1X策略配置

华为、华三、锐捷、思科、迈普交换机802.1X策略配置

一、802.1X有线配置

1.1华为交换机

  1. 华为交换机配置AAA
# 创建Radius服务器模板controller。
[SwitchA] radius-server template controller

# 配置RADIUS认证密钥、主备用RADIUS服务器和计费服务器的IP地址、端口和主备运算法则。
[SwitchA-radius-controller] radius-server authentication 10.7.66.66 1812 weight 80
[SwitchA-radius-controller] radius-server accounting 10.7.66.66 1813 weight 80
[SwitchA-radius-controller] radius-server authentication 10.7.66.67 1812 weight 40
[SwitchA-radius-controller] radius-server accounting 10.7.66.67 1813 weight 40
[SwitchA-radius-controller] radius-server algorithm master-backup
[SwitchA-radius-controller] radius-server shared-key cipher Example@123

# 配置自动探测功能。
[SwitchA-radius-controller] radius-server testuser username test1 password cipher abc@123

# 配置对状态为Down的RADIUS服务器的自动探测周期和探测报文的超时等待时间。(取值为缺省值)
[SwitchA-radius-controller] radius-server detect-server interval 60
[SwitchA-radius-controller] radius-server detect-server timeout 3

# 配置RADIUS认证请求报文的重传次数和周期。(取值为缺省值)
[SwitchA-radius-controller] radius-server retransmit 3 timeout 5
[SwitchA-radius-controller] quit

# 配置将RADIUS服务器标记为Down的条件。(取值为缺省值)
[SwitchA] radius-server dead-interval 5
[SwitchA] radius-server dead-count 2
[SwitchA] radius-server detect-cycle 2
[SwitchA] radius-server max-unresponsive-interval 300
# 配置认证方案auth,认证模式为RADIUS认证。

[SwitchA] aaa
[SwitchA-aaa] authentication-scheme auth
[SwitchA-aaa-authen-auth] authentication-mode radius
[SwitchA-aaa-authen-auth] quit

# 配置计费方案acc,计费模式为RADIUS计费。
[SwitchA-aaa] accounting-scheme acc
[SwitchA-aaa-accounting-acc] accounting-mode radius
[SwitchA-aaa-accounting-acc] quit

# 配置example域,在域下应用认证方案auth、计费方案acc、RADIUS服务器模板controller。
[SwitchA-aaa] domain example
[SwitchA-aaa-domain-example] authentication-scheme auth
[SwitchA-aaa-domain-example] accounting-scheme acc
[SwitchA-aaa-domain-example] radius-server controller
[SwitchA-aaa-domain-example] quit
[SwitchA-aaa] quit
  1. 华为交换机配置802.1X认证。
# 将NAC配置模式切换成统一模式。设备默认为统一模式。传统模式与统一模式相互切换后,设备会自动重启。
[SwitchA] authentication unified-mode

# 配置802.1X接入模板d1、配置客户端认证超时时间为30秒。
[SwitchA] dot1x-access-profile name d1
[SwitchA-dot1x-access-profile-d1] dot1x authentication-method eap
[SwitchA-dot1x-access-profile-d1] dot1x timer client-timeout 30
[SwitchA-dot1x-access-profile-d1] quit

# 配置认证模板绑定802.1X接入模板d1、指定认证模板下用户的强制域为example。认证模板下配置强制域之后,使用该认证模板的用户,无论用户名是否携带域名或携带何种域名,均在该域下进行认证。
[SwitchA] authentication-profile name p1
[SwitchA-authen-profile-p1] dot1x-access-profile d1
[SwitchA-authen-profile-p1] access-domain example force
[SwitchA-authen-profile-p1] quit

# 配置RADIUS服务器故障时的逃生权限和RADIUS服务器恢复后的重认证功能。以用户逃生时授权VLAN为例,其他授权信息的配置可参考(可选)配置认证事件授权信息。
[SwitchA] authentication-profile name p1
[SwitchA-authen-profile-p1] authentication event authen-server-down action authorize vlan 20
[SwitchA-authen-profile-p1] authentication event authen-server-up action re-authen
[SwitchA-authen-profile-p1] quit

# 去使能预连接功能。
[SwitchA] undo authentication pre-authen-access enable

# 在接口GE1/0/2到GE1/0/n上绑定认证模板p1,使能802.1X认证。以接口GE1/0/2为例。
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] authentication-profile p1
[SwitchA-GigabitEthernet1/0/2] quit
  1. 可选配置——1x认证配置重认证,参考华三交换机。

 

 

1.2华三交换机

  1. 全局配置
# 配置radius
radius scheme testc
primary authentication 192.168.99.155
primary accounting 192.168.99.155
key authentication simple 123456
key accounting simple 123456
user-name-format without-domain

# 配置domain
domain testc
authentication default radius-scheme testc
authorization default radius-scheme testc
accounting default radius-scheme testc
domain default enable testc

# 全局使能1x
dot1x
dot1x authentication-method eap
  1. 接口配置
# 连接终端接口
interface Ethernet1/0/22
port link-mode bridge
undo dot1x handshake -----关闭握手,根据需求决定是否开启
undo dot1x multicast-trigger -----关闭组播触发报文,根据需求决定是否开启
dot1x mandatory-domain testc
dot1x
  1. 配置逃生(二选一)
# 认证接口配置逃生
## 连接终端接口
interface Ethernet1/0/22
port link-type hybrid ---配置接口类型为hybrid接口
port hybrid vlan 1 123 untagged
mac-vlan enable ---使能MAC VLAN功能
dot1x critical vlan 123 ---配置逃生vlan(接入控制方式为MAC-based的端口上,必须使能MAC VLAN功能,Critical VLAN功能才能生效)
dot1x critical eapol --- 配置发送EAP-Success报文(用户逃生恢复重认证)
dot1x mandatory-domain testc
dot1x

# 说明:
# · 在接入控制方式为Port-based的端口上,保证802.1X的组播触发功能处于开启状态,默认为开启。
# · 在接入控制方式为MAC-based的端口上,保证端口类型为Hybrid,端口上的MAC VLAN功能处于使能状态,且不建议将指定的Critical VLAN修改为携带Tag的方式。
# · 若同时配置Guest VLAN或Auth-Fail VLAN,如果端口已经位于802.1X的Guest VLAN或Auth-Fail VLAN,则当所有认证服务器都不可达时,端口并不会离开当前的VLAN而加入Critical VLAN,具体请查看官方文档。

# 认证域配置备选不认证
## 配置domain
domain testc
authentication default radius-scheme testc none
authorization default radius-scheme testc none
accounting default radius-scheme testc none
  1. 可选配置——1x认证配置重认证:
    端口启动了802.1X的周期性重认证功能后,设备会根据周期性重认证定时器设定的时间间隔(由命令dot1x timer reauth-period设置)定期向该端口在线802.1X用户发起重认证,以检测用户连接状态的变化、确保用户的正常在线,并及时更新服务器下发的授权属性(例如ACL、VLAN)。
配置步骤 命令 说明
进入系统视图 system-view -
(可选)配置周期性重认证定时器 dot1x timer reauth-period reauth-period-value 缺省情况下,周期性重认证定时器的值为3600秒
进入二层以太网接口视图 interface interface-type interface-number -
开启周期性重认证功能 dot1x re-authenticate 缺省情况下,周期性重认证功能处于关闭状态
(可选)配置重认证服务器不可达时 端口上的802.1X用户保持在线状态 dot1x re-authenticate server-unreachable keep-online 缺省情况下,端口上的802.1X在线用户重认证时,若认证服务器不可达,则会被强制下线
  1. 可选配置,交换机全局使能EAD快速部署功能且配置Free IP之后,未通过认证的802.1X终端用户可以访问该IP地址段中的网络资源。
配置步骤 命令 说明
进入系统视图 system-view -
全局使能EAD快速部署功能 dot1x ead-assistant enable 缺省情况下,未使能EAD快速部署功能
配置Free IP dot1x ead-assistant free-ip ip-address { mask-length | mask-address } 缺省情况下,未定义Free IP

 

 

1.3锐捷交换机

  1. 全局配置dot1x
Ruijie>enable
Ruijie#configure terminal
Ruijie(config)# aaa authentication dot1x ------>打开802.1x
Ruijie(config)#radius-server host 192.168.99.100 ------>配置认证服务器IP地址
Ruijie(config)#radius-server key test ------>配置认证服务器的key为test字符串
Ruijie(config)#aaa accounting server 192.168.99.100 ----配置计费服务器地址
Ruijie(config)#aaa accounting ------>打开计费
Ruijie(config)#aaa accounting update ------>开启计费更新
Ruijie(config)#snmp-server community ruijie rw ------>配置snmp属性值为ruijie,并赋予读写权限
  1. 接口下开启dot1x功能
Ruijie(config)# interface FastEthernet 0/1
Ruijie(config-if)# dot1x port-control auto
  1. 保存配置
Ruijie(config-if)# end
Ruijie#write ------>确认配置正确,保存配置
  1. 逃生

在radius认证组后增加一个为“none”的认证组,设备将会在radius服务器认证超时转为“none”认证,即dot1x认证客户端直接认证成功。

aaa authentication dot1x default group radius none

 

 

1.5思科交换机

Catalyst 交换机配置

aaa new-model //启用aaa
aaa authentication dot1x default group radius // dot1x 使用radius 做认证
aaa authorization network default group radius //使用802.1x 协议去动态分配vlan
dot1x system-auth-control //允许802.1x port-based 认证
dot1x guest-vlan supplicant
// 允许交换机在端口802.1x 认证失败后,指定vlan 到guest-vlan
radius-server host 192.168.1.1 auth-port 1812 acct-port 1813 key Password
//设置radius server 的ip 地址和端口,以及认证的password
radius-server dead-criteria time 5 tries 3
//判断radius是否有问题标准,尝试3次,每次5秒,通过15秒相应,判断radius是否有问题,并做相应策略
radius-server vsa send accounting
radius-server vsa send authentication
//需要通过802.1x 来指定端口的vlan,需要这两条配置命令。

以下为接口下配置

interface FastEthernet0/3
switchport mode access
//dot1x 指定vlan, switchport mode 必须为access
dot1x port-control auto //开启dot1x 端口认证
dot1x timeout quiet-period 10
//switch 在与client 认证失败后的静默时间。默认是60s,我设置为10
dot1x timeout tx-period 4
dot1x 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-method
authentication event server dead action authorize vlan 80
//服务器down掉时接入指定的vlan
authentication 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 terminal
switch(config)# feature dot1x
switch(config)# aaa group server radius RAD
switch(config)# radius-server host 192.168.0.225 key 7 "fewhg" authentication accounting
switch(config)# server 192.168.0.225
aaa authentication dot1x default group RAD

switch(config)# radius-server retransmit 3
switch(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/1
switch(config-if)# dot1x port-control auto
switch(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

详见官方链接:

Cisco:配置RADIUS

Cisco:配置802.1X

Cisco:配置3A(认证、授权、审计)

 

 

1.6迈普交换机

MP2816

  1. 定义Radius认证服务器
aaa new-model
aaa group server radius radius_group
server-private ip_address_radius1 auth-port 1812 acct-port 1813 priority 0 key string
server-private ip_address_radius2 auth-port 1812 acct-port 1813 priority 1 key string
ip radius source-interface source-interface
radius-server retransmit 3  //默认配置
radius-server timeout 5    //默认配置
radius-server dead-time 5 
  1. 配置AAA认证方式
aaa authentication connection default radius_group none
  1. 全局开启802.1X认证
dot1x enable            //默认配置
dot1x eap-relay enable
dot1x client-probe enable
no dot1x reauthentication  
  1. 端口启用802.1X认证
port port
dot1x port-control enable
dot1x port-method macbased  //默认配置

MP4100E系列

  1. 定义Radius认证服务器
aaa new-model
aaa group server radius radius_group
server-private ip_address_radius1 auth-port 1812 acct-port 1813 priority 0 key string
server-private ip_address_radius2 auth-port 1812 acct-port 1813 priority 1 key string
ip radius source-interface source-interface
radius-server retransmit 3  //默认配置
radius-server timeout 5  //默认配置
radius-server dead-time 5
  1. 配置AAA认证方式
aaa authentication connection default radius_group none
  1. 全局开启802.1X认证
aaa authentication connection default radius_group none
  1. 端口启用802.1X认证
port port
port-type nni
dot1x eap-relay enable
dot1x port-control enable
dot1x client-probe enable
no dot1x reauthentication
dot1x port-method macbased  //默认配置

MP4100F系列

  1. 定义Radius认证服务器
radius-server authentication host ip_address_radius1 port 1812 key string primary access-mode dot1x
radius-server authentication host ip_address_radius2 port 1812 key string access-mode dot1x
radius nas-ipv4 ip_address
radius-server retransmit 3  //默认配置
radius-server timeout 5
radius-server dead-time 5
  1. 配置AAA认证方式
aaa enable
authentication dot1x radius none
  1. 全局开启802.1X认证
dot1x enable
dot1x macbased port-down-flush
no dot1x re-authentication  //默认配置
  1. 端口启用802.1X认证
interface interface
dot1x enable
dot1x port-control auto       //默认配置
dot1x port-method macbased
dot1x max-user macbased 256  //默认最大允许接入用户数为1,建议调成最大值256

 

 

二、802.1X无线

 

 

2.1华为AC

  1. 配置RADIUS服务器模板、RADIUS认证方案和RADIUS计费方案。
# 配置RADIUS服务器模板。
[AC] radius-server template radius_huawei
[AC-radius-radius_huawei] radius-server authentication 172.16.1.1 1812
[AC-radius-radius_huawei] radius-server accounting 172.16.1.1 1813
[AC-radius-radius_huawei] radius-server shared-key cipher Huawei@123
[AC-radius-radius_huawei] quit

# 配置RADIUS方式的认证方案。
[AC] aaa
[AC-aaa] authentication-scheme radius_huawei
[AC-aaa-authen-radius_huawei] authentication-mode radius
[AC-aaa-authen-radius_huawei] quit
[AC-aaa] quit

# 配置RADIUS方式的计费方案。
[AC-aaa] accounting-scheme scheme1
[AC-aaa-accounting-scheme1] accounting-mode radius
[AC-aaa-accounting-scheme1] accounting realtime 15
[AC-aaa-accounting-scheme1] quit
[AC-aaa] quit

•以设备与Agile Controller-Campus对接为例,计费功能并非真实意义上的计算费用,而是通过计费报文维护终端的在线信息。

•accounting realtime命令用来配置实时计费间隔。实时计费间隔的取值对设备和RADIUS服务器的性能有要求,实时计费间隔的取值越小,对设备和RADIUS服务器的性能就越高。请根据用户数设置实时计费间隔。

  1. 配置Portal服务器模板

配置Portal逃生功能,要求设备侧通过命令server-detect开启心跳探测功能;同时要求服务器侧支持并开启心跳探测功能。

[AC] web-auth-server abc
[AC-web-auth-server-abc] server-ip 172.16.1.1
[AC-web-auth-server-abc] shared-key cipher Admin@123
[AC-web-auth-server-abc] port 50200
[AC-web-auth-server-abc] url https://172.16.1.1:8445/portal
[AC-web-auth-server-abc] server-detect
[AC-web-auth-server-abc] quit
  1. 配置ACL3001,使认证通过后的用户能够访问客户问题处理系统

本举例使用远端服务器授权,服务器上需要配置为认证成功后的用户授权ACL3001。

[AC] acl 3001
[AC-acl-adv-3001] rule 5 permit ip destination 172.16.3.0 0.0.0.255
[AC-acl-adv-3001] quit
  1. 配置Portal接入模板“portal1”
[AC] portal-access-profile name portal1
[AC-portal-access-profile-portal1] web-auth-server abc direct
[AC-portal-access-profile-portal1] quit
  1. 配置Portal逃生

配置Portal服务器Down时,为用户授权用户组group1,实现用户能够访问客户问题处理系统。并且,Portal服务器Up后,对用户进行重认证。

[AC] user-group group1
[AC-user-group-group1] acl 3001
[AC-user-group-group1] quit
[AC] portal-access-profile name portal1
[AC-portal-access-profile-portal1] authentication event portal-server-down action authorize user-group group1
[AC-portal-access-profile-portal1] authentication event portal-server-up action re-authen
[AC-portal-access-profile-portal1] quit
  1. 配置免认证规则模板
[AC] free-rule-template name default_free_rule
[AC-free-rule-default_free_rule] free-rule 1 destination ip 172.16.1.2 mask 24
[AC-free-rule-default_free_rule] quit
  1. 配置认证模板“p1”
[AC] authentication-profile name p1
[AC-authentication-profile-p1] portal-access-profile portal1
[AC-authentication-profile-p1] free-rule-template default_free_rule
[AC-authentication-profile-p1] authentication-scheme radius_huawei
[AC-authentication-profile-p1] accounting-scheme scheme1
[AC-authentication-profile-p1] radius-server radius_huawei
[AC-authentication-profile-p1] quit
  1. 配置WLAN业务参数
# 创建名为“wlan-security”的安全模板,并配置安全策略。缺省情况下,安全策略为open方式的开放认证。
[AC] wlan
[AC-wlan-view] security-profile name wlan-security
[AC-wlan-sec-prof-wlan-security] quit

# 创建名为“guest”和“employee”的SSID模板,并分别配置SSID名称为“guest”和“employee”。
[AC-wlan-view] ssid-profile name guest
[AC-wlan-ssid-prof-guest] ssid guest
[AC-wlan-ssid-prof-guest] quit
[AC-wlan-view] ssid-profile name employee
[AC-wlan-ssid-prof-employee] ssid employee
[AC-wlan-ssid-prof-employee] quit

# 创建名为“guest”和“employee”的VAP模板,配置业务数据转发模式、业务VLAN,并且引用安全模板和SSID模板。
[AC-wlan-view] vap-profile name guest
[AC-wlan-vap-prof-guest] forward-mode tunnel
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-vap-prof-guest] service-vlan vlan-pool sta-pool
[AC-wlan-vap-prof-guest] security-profile wlan-security
[AC-wlan-vap-prof-guest] ssid-profile guest
[AC-wlan-vap-prof-guest] authentication-profile p1
[AC-wlan-vap-prof-guest] quit
[AC-wlan-view] vap-profile name employee
[AC-wlan-vap-prof-employee] forward-mode tunnel
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-vap-prof-employee] service-vlan vlan-pool sta-pool
[AC-wlan-vap-prof-employee] security-profile wlan-security
[AC-wlan-vap-prof-employee] ssid-profile employee
[AC-wlan-vap-prof-employee] authentication-profile p1
[AC-wlan-vap-prof-employee] quit

# 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板的配置。
[AC-wlan-view] ap-group name guest
[AC-wlan-ap-group-guest] vap-profile guest wlan 1 radio all
[AC-wlan-ap-group-guest] quit
[AC-wlan-view] ap-group name employee
[AC-wlan-ap-group-employee] vap-profile employee wlan 1 radio all
[AC-wlan-ap-group-employee] quit
  1. 配置AP射频的信道和功率

射频的信道和功率自动调优功能默认开启,如果不关闭此功能则会导致手动配置不生效。举例中AP射频的信道和功率仅为示例,实际配置中请根据AP的国家码和网规结果进行配置。

# 关闭AP射频0的信道和功率自动调优功能,并配置AP射频0的信道和功率。
[AC-wlan-view] ap-id 0
[AC-wlan-ap-0] radio 0
[AC-wlan-radio-0/0] calibrate auto-channel-select disable
[AC-wlan-radio-0/0] calibrate auto-txpower-select disable
[AC-wlan-radio-0/0] channel 20mhz 6
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-radio-0/0] eirp 127
[AC-wlan-radio-0/0] quit

# 关闭AP射频1的信道和功率自动调优功能,并配置AP射频1的信道和功率。
[AC-wlan-ap-0] radio 1
[AC-wlan-radio-0/1] calibrate auto-channel-select disable
[AC-wlan-radio-0/1] calibrate auto-txpower-select disable
[AC-wlan-radio-0/1] channel 20mhz 149
Warning: This action may cause service interruption. Continue?[Y/N]y
[AC-wlan-radio-0/1] eirp 127
[AC-wlan-radio-0/1] quit
[AC-wlan-ap-0] quit
[AC-wlan-view] quit

 

 

2.2华三AC

  1. 全局配置
# 配置radius
radius scheme testc
primary authentication 192.168.99.155
primary accounting 192.168.99.155
key authentication 123456
key accounting 123456
user-name-format without-domain

# 配置domain
domain testc
authentication default radius-scheme testc
authorization default radius-scheme testc
accounting default radius-scheme testc
domain default enable testc

# 全局使能1x
dot1x
dot1x authentication-method eap

2、SSID配置

wlan service-template test_1x
ssid test_1x
akm mode dot1x
cipher-suite ccmp
cipher-suite tkip
security-ie rsn
security-ie wpa
client-security authentication-mode dot1x
dot1x domain testc
service-template enable

# ssid绑定到radio
wlan ap 326a-ade9-7b12 model WA5320-ACN
serial-id 210235B116C114111174
vlan 1
radio 1
radio enable
service-template test_1x
radio 2
radio enable
service-template test_1x
radio 3
radio enable
service-template test_1x
gigabitethernet 1
gigabitethernet 2

 

 

2.3锐捷AC

  1. 配置802.1x AAA认证记账功能
AC-1(config)#aaa new-model //启用AAA认证功能
AC-1(config)#aaa authentication dot1x default group radius //定义dot1x认证默认使用列表
AC-1(config)#aaa accounting network default start-stop group radius //定义用户上线下线审计默认使用列表
AC-1(config)#radius-server host 192.168.33.212 key ruijie //配置radius服务器KEY及IP
AC-1(config)#ip radius source-interface vlan 90 //AC使用vlan 90 的IP地址和radius对接
AC-1(config)#dot1x authentication default //dot1x认证使用默认列表
AC-1(config)#dot1x accounting default //dot1x审计使用默认列表
AC-1(config)#dot1x eapol-tag //AC可以处理带Vlan Tag认证报文,默认都需要配置
  1. WLAN启用802.1X
AC-1(config)#wlansec 1
AC-1(config-wlansec)# security rsn enable //启用WPA2认证
AC-1(config-wlansec)# security rsn ciphers aes enable //启用AES加密
AC-1(config-wlansec)# security rsn akm 802.1x enable //启用802.1X认证
  1. 配置SNMP功能
AC-1(config)#snmp-server host 192.168.33.212 traps ruijie
AC-1(config)#snmp-server community ruijie

 

 

2.4TP-LINK AC

  1. Radius设置

在AC管理界面【认证管理 >> 认证服务器 >> Radius】中,服务器IP地址 为Radius服务器的IP地址, 共享密钥 即Radius服务器密钥,认证方式选择PAP。

  1. 服务器组设置

在【认证管理 >> 认证服务器 >> 服务器组】中,选择协议类型为 Radius,主服务器 选择上一步设置的Radius。

  1. 关联认证信息

选择【认证管理 >> 认证服务,Portal认证】选项选择已设置的WEB服务器条目,认证服务器组 选择上一步设置好的服务器组。

详见官方链接:

TP-LINK:Portal功能典型配置案例

 

 

2.5思科AC

详见官方链接:

Cisco:配置TACACS

 

 

三、MAC认证/MAB加白(有线)

 

 

3.1华为交换机

1.配置AAA。

# 创建RADIUS服务器模板controller。
[SwitchA] radius-server template controller

# 配置RADIUS认证密钥、主备用RADIUS服务器和计费服务器的IP地址、端口和主备运算法则。
[SwitchA-radius-controller] radius-server authentication 10.7.66.66 1812 weight 80
[SwitchA-radius-controller] radius-server accounting 10.7.66.66 1813 weight 80
[SwitchA-radius-controller] radius-server authentication 10.7.66.67 1812 weight 40
[SwitchA-radius-controller] radius-server accounting 10.7.66.67 1813 weight 40
[SwitchA-radius-controller] radius-server algorithm master-backup
[SwitchA-radius-controller] radius-server shared-key cipher Example@123

# 配置自动探测功能。
[SwitchA-radius-controller] radius-server testuser username test1 password cipher abc@123

# 配置对状态为Down的RADIUS服务器的自动探测周期和探测报文的超时等待时间。(取值为缺省值)
[SwitchA-radius-controller] radius-server detect-server interval 60
[SwitchA-radius-controller] radius-server detect-server timeout 3

# 配置RADIUS认证请求报文的重传次数和周期。(取值为缺省值)
[SwitchA-radius-controller] radius-server retransmit 3 timeout 5
[SwitchA-radius-controller] quit

# 配置将RADIUS服务器标记为Down的条件。(取值为缺省值)
[SwitchA] radius-server dead-interval 5
[SwitchA] radius-server dead-count 2
[SwitchA] radius-server detect-cycle 2
[SwitchA] radius-server max-unresponsive-interval 300

# 配置认证方案auth,认证模式为RADIUS认证。
[SwitchA] aaa
[SwitchA-aaa] authentication-scheme auth
[SwitchA-aaa-authen-auth] authentication-mode radius
[SwitchA-aaa-authen-auth] quit

# 配置计费方案acc,计费模式为RADIUS计费。
[SwitchA-aaa] accounting-scheme acc
[SwitchA-aaa-accounting-acc] accounting-mode radius
[SwitchA-aaa-accounting-acc] quit

# 配置example域,在域下应用认证方案auth、计费方案acc、RADIUS服务器模板controller。
[SwitchA-aaa] domain example
[SwitchA-aaa-domain-example] authentication-scheme auth
[SwitchA-aaa-domain-example] accounting-scheme acc
[SwitchA-aaa-domain-example] radius-server controller
[SwitchA-aaa-domain-example] quit
[SwitchA-aaa] quit
  1. 配置MAC认证。
# 全局使能MAC地址认证功能
[Quidway] mac-authentication

# 设置集中式MAC地址认证方式为MAC地址方式,账号密码不带连字号。
[Quidway] mac-authentication authmode usernameasmacaddress usernameformat without-hyphen

# 端口下使能MAC地址认证功能
[Quidway] interface GigabitEthernet 1/0/1
[Quidway-GigabitEthernet1/0/1]mac-authentication
  1. (可选)MAC认证配置重认证

若管理员在认证服务器上修改了某一用户的访问权限、授权属性等参数,此时如果用户已经在线,则需要及时对该用户进行重定向以确保用户的合法性。MAC认证成功用户重认证如下所示:

配置点 方式 配置命令
在接入设备侧配置 对MAC认证成功用户进行周期性重认证,从接入设备收到RADIUS认证接受报文开始计算,reauthenticate-period-value时间之后,接入设备会重新请求RADIUS服务器对该终端进行MAC认证。 mac-authen reauthenticatemac-authen timer reauthenticate-period reauthenticate-period-value
MAC认证用户DHCP续租报文触发重认证。当接入设备收到MAC认证用户的DHCP续租报文后,对用户进行重认证。 mac-authen reauthenticate dhcp-renew
手动对指定MAC地址进行单次重认证。 mac-authen reauthenticate mac-address mac-address
在RADIUS服务器侧配置 对MAC认证成功的用户下发RADIUS标准属性Session-Timeout和Termination-Action。其中Session-Timeout属性值为用户在线时长1定时器,Termination-Action属性值为1表示对用户进行重认证。当用户在线时长达到Session-Timeout的属性值时,设备会对用户进行重认证。 -

 

 

3.2华三交换机

  1. 全局配置
# 配置Radius
radius scheme testc
primary authentication 192.168.99.155
primary accounting 192.168.99.155
key authentication 123456
key accounting 123456
user-name-format without-domain

# 配置domain
domain testc
authentication default radius-scheme testc
authorization default radius-scheme testc
accounting default radius-scheme testc

# 全局使能MAC认证
mac-authentication

# 全局配置MAC认证域,根据需求指定全局或者接口认证域,可二选一:
mac-authentication domain testc
  1. 接口配置
# 连接终端接口
interface Ethernet1/0/22
port link-mode bridge
mac-authentication
mac-authentication domain testc
  1. 配置逃生(二选一)
# a、认证域配置备选不认证:
# 配置domain:
domain testc
authentication default radius-scheme testc none
authorization default radius-scheme testc none
accounting default radius-scheme testc none

# b、认证接口配置逃生vlan:
mac-authentication critical vlan critical-vlan-id
  1. (可选)MAC认证配置重认证
# 认证接口开启重认证:
interface GigabitEthernet1/0/10
port bridge enable
mac-authentication
mac-authentication domain testc
mac-authentication re-authenticate

# 全局配置重认证间隔,默认3600s
mac-authentication timer reauth-period 3600

 

 

四、DAE交换机配置

 

 

4.1华三

  1. 进入系统视图。
system-view
  1. 开启RADIUS DAE服务,并进入RADIUS DAE服务器视图。缺省情况下, RADIUS DAE服务处于关闭状态。
radius dynamic-author server
  1. 指定RADIUS DAE客户端为NAC IP。缺省情况下,未指定RADIUS DAE客户端。
client { ip ipv4-address | ipv6 ipv6-address } [ key { cipher | simple } string | vpn-instance vpn-instance-name ] *
  1. (可选)指定RADIUS DAE服务端口。缺省情况下,RADIUS DAE服务端口为3799。
port port-number

 

 

4.2华为

  1. 进入系统视图。
system-view
  1. NAS作为服务端(默认端口号3799),配置用户下线的客户端,缺省情况下,是没有配置的。
radius-server authorization ip-address [ vpn-instance vpn-instance-name ] { server-group group-name shared-key cipher key-string | shared-key cipher key-string [ server-group group-name ] } [ protect enable ]
# 例如:radius-server authorization 1.1.1.1 shared-key cipher 123456 ----指定为NAC IP
  1. 查看配置结果。
display radius-server authorization configuration

 

 

4.3思科

  1. 启用特权EXEC模式。
Device> enable
  1. 进入全局配置模式。
Device# configure terminal
  1. 全局启用AAA。
Device(config)# aaa new-model
  1. 进入动态授权本地服务器配置模式,指定设备aaa服务器的RADIUS客户端RADIUS dynamic-author。
aaa server radius dynamic-author
  1. 配置RADIUS客户端和共享密钥 client {ip-address | name [vrf vrf-name]} server-key [0| 7] string。
Device(config-locsvr-da-radius)# client 10.0.0.1 server-key 123456 ----指定为NAC IP
  1. 指定设备侦听来自已配置RADIUS客户端的RADIUS请求的端口。
Device(config-locsvr-da-radius)# port 3799
  1. 返回全局配置模式。
Device(config-locsvr-da-radius)# exit

给TA打赏
共{{data.count}}人
人已打赏
网站教程

网站首页伪装 搜索引擎蜘蛛爬取正常

2020-7-15 11:49:31

网站教程

CentOS 7 挂载腾讯云COS对象存储教程

2021-3-22 23:34:40

声明 本站上的部份代码及教程来源于互联网,仅供网友学习交流,若您喜欢本文可附上原文链接随意转载。无意侵害您的权益,请发送邮件至 [email protected] 或点击右侧 私信:吉吉国王 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
OneEase