17.5.1.-->华为[Huawei]
华为ME60文档:https://support.huawei.com/hedex/hdx.do?lib=EDOC1100219216AZK10269&docid=EDOC1100219216&lang=zh&v=03
 
华为portal所有版本和pap/chap协议全部支持。
不要在华为里面强制指定portal版本。
source-ip在要在如下图这里强行指定。

开启无感知或COA代拨的话,radius-attribute set nas-port-type 19这个一定要设置正确,否则无感知无效
 

#本实例基于华为AR系列路由器
#仅做参考,大致差不多
#如果是标识对接,sysname命令设置设备的主机名也是标识名。
 
radius server IP:192.168.10.2
portal server IP:192.168.10.2
网关IP:192.168.10.1
 
system-view
dhcp enable
#启用DNS解析添加DNS服务器IP,以便添加域名方式免认证规则时NAS能解析出域名。
dns resolve
dns server 223.5.5.5
dns server 223.6.6.6
 
#设置外网
acl name GigabitEthernet0/0/4 2999
rule 5 permit
interface GigabitEthernet0/0/4
ip address 192.168.11.235 255.255.255.0
nat outbound 2999
interface NULL0
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/4 192.168.11.1
 
 
#第一步,配置免认证规则,放行
free-rule-template name default_free_rule
free-rule 0 destination ip 192.168.10.1 mask 255.255.255.255
free-rule 1 source ip 192.168.10.1 mask 255.255.255.255
free-rule 2 source ip 192.168.10.2 mask 255.255.255.255
free-rule 3 destination ip 192.168.10.2 mask 255.255.255.255
free-rule 4 source ip 223.5.5.5 mask 255.255.255.255
free-rule 5 destination ip 223.5.5.5 mask 255.255.255.255
 
#第二步,配置url模版(登录跳转的认证页地址和赋值参数)
#对接地址
url-template name lf_wifi
url http://192.168.10.2/lfradius/libs/portal/unify/portal.php/login/main/nasid/1/
#指定参数
url-parameter user-mac usrmac user-ipaddress usrip
#ME60用以下两个来指定
#web-server redirect-key user-mac-address usrmac simple
#web-server redirect-key user-ip-address usrip
#格式化一下MAC地址
url-parameter mac-address format delimiter - normal
 
#第三步,配置portal认证模版(设置与portal服务器对接的有关参数)
#web-auth-server version v2 启用版本v2,不设置同时支持v1和v2,一般不用设置
web-auth-server listening-port 2000
web-auth-server lf_wifi
server-ip 192.168.10.2
source-ip 192.168.10.1
port 50100
shared-key cipher 123456
url-template lf_wifi
 
#第四步,配置portal准入策略引用portal模版
#启用https转发
portal https-redirect enable
#如果执行不成功,改成这条
#authentication https-redirect enable
portal-access-profile name lf_wifi
#二层用这个
web-auth-server lf_wifi direct
#web-auth-server lf_wifi layer3 #三层用这个
#下线探测周期,只对二层有效
portal timer offline-detect 300
quit
 
 
#第五步,配置radius服务器模版
#radius-server模板,模板名称为lf_wifi,radius服务器IP为192.168.10.2,密钥为123456
radius-server template lf_wifi
#无线改为19,有线PPPOE用15,默认就是15
radius-attribute set nas-port-type 19
#限速用最小单位,缺省情况下,设备以(byte)作为RADIUS流量单位。 { byte | kbyte | mbyte | gbyte }
radius-server traffic-unit byte
#对接密钥
radius-server shared-key cipher 123456
radius-server authentication 192.168.10.2 1812
radius-server accounting 192.168.10.2 1813
#重试2次
radius-server retransmit 2 timeout 5
#向RADIUS服务器发送的报文中的用户名不携带域名
undo radius-server user-name domain-included
#封装called-station-id字段中MAC地址的格式
calling-station-id mac-format hyphen-split mode2 lowercase
quit
#必须配置授权指向radius服务器,否则Radius服务器踢用户下线功能将无效
radius-server authorization 192.168.10.2 shared-key cipher 123456
 
#配置AAA
aaa
#加入认证方案,使用radius认证模式
authentication-scheme lf_radius
authentication-mode radius
quit
 
#加入计费方案,使用radius方式
accounting-scheme lf_radius
accounting-mode radius
#开启实时计费功能,并设置实时计费时间间隔为1分钟。
accounting realtime 1
quit
 
#建立域加入上面修改的默认认证、授权、计费的方案
domain lf_wifi
authentication-scheme lf_radius
accounting-scheme lf_radius
radius-server lf_wifi
quit
quit
 
 
#第六步,如果Radius支持,配置一下无感知
mac-access-profile name lf_wifi      
mac-authen username macaddress format with-hyphen
quit
 
#第七步配置认证方案,引用无感知mac-access,引用portal准入策略portal-access,指定aaa的lf_wifi域
authentication-profile name lf_wifi
mac-access-profile lf_wifi
portal-access-profile lf_wifi
access-domain lf_wifi #指定为默认域
quit
 
#第八步,配置接口IP地址以及应用认证方案
interface Vlanif1
ip address 192.168.10.1 255.255.255.0
authentication-profile lf_wifi
dhcp select interface
#不参与自动分配的IP
dhcp server excluded-ip-address 192.168.10.2 192.168.10.10
dhcp server dns-list 223.5.5.5 223.6.6.6
 
#配置成功后需要保存,重启验证
quit
save
#如有配置失误恢复出厂设置并重启
reset save
reboot
 
#其他
#查看在线用户display access-user
#display radius-server configuration
#

© 凌风认证计费 http://www.lflflf.net/

文档更新时间: 2024-03-02 14:52   作者: