华为radius认证

组网需求

图1所示,用户同处于huawei域,Router作为目的网络接入服务器。用户需要通过服务器的远端认证才能通过Router访问目的网络。在Router上的远端认证方式如下:

  • Router对接入用户先用RADIUS服务器进行认证,如果认证没有响应,再使用本地认证。

  • RADIUS服务器10.7.66.66/24作为主用认证服务器和计费服务器,RADIUS服务器10.7.66.67/24作为备用认证服务器和计费服务器,认证端口号缺省为1812,计费端口号缺省为1813。

图1 采用RADIUS协议对用户进行认证和计费组网图

配置思路

用如下的思路配置采用RADIUS协议对用户进行认证和计费。

  1. 配置RADIUS服务器模板。
  2. 配置认证方案、计费方案。
  3. 在域下应用RADIUS服务器模板、认证方案和计费方案。
  1. 配置RADIUS服务器模板。

    配置RADIUS服务器模板shiva。

    screen 复制代码
    <Huawei> system-view
    [Huawei] sysname Router
    [Router] radius-server template shiva

    配置RADIUS主用认证服务器和计费服务器的IP地址、端口。

    screen 复制代码
    [Router-radius-shiva] radius-server authentication 10.7.66.66 1812 weight 80
    [Router-radius-shiva] radius-server accounting 10.7.66.66 1813 weight 80

    配置RADIUS备用认证服务器和计费服务器的IP地址、端口。

    screen 复制代码
    [Router-radius-shiva] radius-server authentication 10.7.66.67 1812 weight 40
    [Router-radius-shiva] radius-server accounting 10.7.66.67 1813 weight 40

    配置RADIUS服务器密钥、重传次数,以及设备向RADIUS服务器发送的报文中的用户名不包含域名。

    screen 复制代码
    [Router-radius-shiva] radius-server shared-key cipher Huawei@2012
    [Router-radius-shiva] radius-server retransmit 2
    [Router-radius-shiva] undo radius-server user-name domain-included
    [Router-radius-shiva] quit
  2. 配置认证方案、计费方案。

    配置认证方案auth,认证模式为先进行RADIUS认证,后进行本地认证。

    screen 复制代码
    [Router] aaa
    [Router-aaa] authentication-scheme auth
    [Router-aaa-authen-auth] authentication-mode radius local
    [Router-aaa-authen-auth] quit

    配置计费方案abc,计费模式为RADIUS,并配置当开始计费失败时,允许用户上线。

    screen 复制代码
    [Router-aaa] accounting-scheme abc
    [Router-aaa-accounting-abc] accounting-mode radius
    [Router-aaa-accounting-abc] accounting start-fail online
    [Router-aaa-accounting-abc] quit
  3. 配置huawei域,在域下应用认证方案auth、计费方案abc、RADIUS服务器模板shiva。

    screen 复制代码
    [Router-aaa] domain huawei
    [Router-aaa-domain-huawei] authentication-scheme auth
    [Router-aaa-domain-huawei] accounting-scheme abc
    [Router-aaa-domain-huawei] radius-server shiva
    [Router-aaa-domain-huawei] quit
    [Router-aaa] quit
  4. 配置huawei域为全局默认域。

    screen 复制代码
    [Router] domain huawei
    [Router] domain huawei admin
  5. 配置AAA本地认证。

    screen 复制代码
    [Router] aaa
    [Router-aaa] local-user user1 password irreversible-cipher Huawei@123
    [Router-aaa] local-user user1 service-type http
    [Router-aaa] local-user user1 privilege level 15
    [Router-aaa] quit
  6. 验证配置结果。

    在Router上执行命令display radius-server configuration template template-name,可以观察到该RADIUS服务器模板的配置与要求一致。

    screen 复制代码
    [Router] display radius-server configuration template shiva
      ------------------------------------------------------------------------------
      Server-template-name          :  shiva
      Protocol-version              :  standard
      Traffic-unit                  :  B
      Shared-secret-key             :  %^%#z3#CA>MtbD=>A]Ts;au$;&I!<sN~"B!++2S8'--;%^%#
      Group-filter                  :  class 
      Timeout-interval(in second)   :  5
      Retransmission                :  2
      EndPacketSendTime             :  3 
      Dead time(in minute)          :  5
      Domain-included               :  NO
      NAS-IP-Address                :  - 
      Calling-station-id MAC-format :  xxxx-xxxx-xxxx
      Called-station-id MAC-format  :  XX-XX-XX-XX-XX-XX
      NAS-Port-ID format            :  New 
      Service-type                  :  - 
      NAS-IPv6-Address              :  ::
      Server algorithm              :  master-backup 
      Detect-interval(in second)    :  60 
      Authentication Server 1       :  10.7.66.66     Port:1812  Weight:80  [UP]
                                       Vrf:- LoopBack:NULL Vlanif:NULL
                                       Source IP: ::
      Authentication Server 2       :  10.7.66.67     Port:1812  Weight:40  [UP]
                                       Vrf:- LoopBack:NULL Vlanif:NULL
                                       Source IP: ::
      Accounting Server     1       :  10.7.66.66     Port:1813  Weight:80  [UP]
                                       Vrf:- LoopBack:NULL Vlanif:NULL
                                       Source IP: ::
      Accounting Server     2       :  10.7.66.67     Port:1813  Weight:40  [UP]
                                       Vrf:- LoopBack:NULL Vlanif:NULL
                                       Source IP: ::
      ------------------------------------------------------------------------------ 
相关推荐
半梦半醒*2 小时前
zabbix安装
linux·运维·前端·网络·zabbix
南尘NCA86663 小时前
企业微信防封防投诉拦截系统:从痛点解决到技术实现
java·网络·企业微信
程序猿费益洲4 小时前
Docker 网络详解:(三)四大网络模式
网络·docker·容器
Mr_Meng_De5 小时前
网络安全认证培训机构的痛点
网络
AORO20256 小时前
2025全新三防平板科普:5G-A+卫星通信+国产化
网络·5g·智能手机·电脑·制造·信息与通信
深圳南柯电子6 小时前
车载通信设备EMC整改:高频问题与AI辅助诊断方案|深圳南柯电子
网络·人工智能·互联网·实验室·emc
morning_sir_jking7 小时前
深入解析 kube-proxy:Kubernetes 服务发现的网络基石
网络·kubernetes·服务发现
问道飞鱼8 小时前
【Linux知识】Linux磁盘开机挂载
linux·运维·网络·磁盘·自动挂载
☆璇9 小时前
【Linux】网络基础概念
linux·网络
独行soc9 小时前
2025年渗透测试面试题总结-106(题目+回答)
网络·python·安全·web安全·adb·渗透测试·安全狮