华为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: ::
      ------------------------------------------------------------------------------ 
相关推荐
德迅云安全-小潘25 分钟前
恶意爬虫对数字资产的系统性威胁
网络·人工智能·安全·web安全
孙同学_36 分钟前
【Linux篇】Socket编程TCP
linux·网络·tcp/ip
rgb2gray1 小时前
论文详解 | TWScan:基于收紧窗口的增强扫描统计,实现不规则形状空间热点精准检测
网络·人工智能·python·pandas·交通安全·出租车
zzb15801 小时前
RAG from Scratch-优化-routing
java·前端·网络·人工智能·后端·python·mybatis
流水迢迢lst1 小时前
靶场练习day14--任意文件读取
网络·安全
z2014z2 小时前
Deflate 算法详解
网络·算法
非凡ghost2 小时前
支持1000+格式:Wondershare Recoverit万能数据恢复
网络·windows·学习·软件需求·teamviewer
m0_738120722 小时前
渗透测试——pyexpvm靶机详细提权过程(MSF框架,Hydra数据库爆破,SUDO提权)
服务器·网络·数据库·python·sql·web安全
翱翔的苍鹰2 小时前
LangChain是一个主流的大语言模型(LLM)应用开发框架,核心功能是连接大模型与外部资源/工具。
网络·人工智能·python·深度学习·语言模型
草根站起来2 小时前
OCSP中国泛域名SSL证书申请
网络·网络协议·ssl