• 以一个学生宿舍区为例,解析华为交换机AAA的配置



       从上面的拓扑图中可以看出,用户处于xsss域中,通过出口设备BAS再经由FireWall去访问Internet,BAS作为校园网的核心设备负责对用户访问Internet的权限进行控制,执行AAA认证,认证模式采用Radius服务器认证和计费,现在需要实现ISP对xsss域内的用户进行Radius认证,必须在BAS上配置AAA认证和Radius模板来完成对接入用户的控制与管理。
    
    在LSW2上的配置如下:
    
    一、配置AAA认证方案
    [Huawei]aaa
    [Huawei-aaa]authentication-scheme xsss_aut                          配置AAA认证方案名为xsss_aut
    [Huawei-aaa-authen-aaa]authentication-mode radius local             配置AAA认证模式为先Radius,如无响应则本地认证
    [Huawei-aaa-authen-aaa]quit
    [Huawei-aaa]accounting-scheme xsss_acc                              配置AAA计费方案名为xsss_acc
    [Huawei-aaa-accounting-xsss_acc]accounting-mode radius              配置AAA计费模式为Radius服务器计费
    [Huawei-aaa-accounting-xsss_acc]accounting start-fail offline       配置当开始计费失败时,将用户离线
    [Huawei-aaa-accounting-xsss_acc]quit
    
    二、配置Radius模板
    
    [Huawei]radius-server template xsss_tpl                                            配置Raduis模板名为xsss_tpl
    [Huawei-radius-xsss_tpl]radius-server authentication 172.17.16.254 1812            主radius认证服务地址和端口
    [Huawei-radius-xsss_tpl]radius-server authentication 172.17.16.253 1812 secondary  备用认证服务器
    [Huawei-radius-xsss_tpl]radius-server accounting 172.17.16.253 1812                主radius计费服务地址和端口
    [Huawei-radius-xsss_tpl]radius-server accounting 172.17.16.253 1813 secondary      备用计费服务器
    [Huawei-radius-xsss_tpl]radius-server shared-key cipher mykey      配置设备与Radius通信的共享秘钥为mykey
    [Huawei-radius-xsss_tpl]radius-server retransmit 2 timeout 5       配置发送请求报文的超时重传次数为2s,间隔为5s
    [Huawei-radius-xsss_tpl]quit
    
    三、在AAA用户域绑定要使用的AAA认证和Radius模板
    
    [Huawei]aaa
    [Huawei-aaa]domain xsss                   配置AAA域,名称xsss
    [Huawei-aaa-domain-xsss]authentication-scheme xsss_aut     在域中绑定AAA认证方案
    [Huawei-aaa-domain-xsss]accounting-scheme xsss_acc                   在域中绑定AAA计费方案
    [Huawei-aaa-domain-xsss]radius-server xsss_tpl                   在域中绑定Radius模板
    [Huawei-aaa-domain-xsss]quit
    
    检查命令:
    [Huawei]display radius-server configuration template xsss_tpl
      ------------------------------------------------------------------------------
      Server-template-name             :  xsss_tpl
      Protocol-version                 :  standard
      Traffic-unit                     :  B
      Shared-secret-key                :  aaYOZ$V^P35NZPO3JBXBHA!!
      Timeout-interval(in second)      :  5
      Primary-authentication-server    :  172.17.16.254  :1812 :-LoopBack:NULL   Source-IP:0.0.0.0
      Primary-accounting-server        :  172.17.16.254  :1813 :-LoopBack:NULL   Source-IP:0.0.0.0
      Secondary-authentication-server  :  172.17.16.253  :1812 :-LoopBack:NULL   Source-IP:0.0.0.0
      Secondary-accounting-server      :  172.17.16.253  :1813 :-LoopBack:NULL   Source-IP:0.0.0.0
      Retransmission                   :  2
      Domain-included                  :  YES
      NAS-IP-Address                   :  0.0.0.0
      Calling-station-id MAC-format    :  xxxx-xxxx-xxxx
      ------------------------------------------------------------------------------
    [Huawei]
    
    [Huawei]display domain name xsss
      Domain-name                     : xsss                          
      Domain-state                    : Active
      Authentication-scheme-name      : xsss_aut
      Accounting-scheme-name          : xsss_acc
      Authorization-scheme-name       : -
      Service-scheme-name             : -
      RADIUS-server-template          : xsss_tpl
      HWTACACS-server-template        : -
    [Huawei]
    
    
    
    Session 2 AAA+HWTACACS进行认证、授权、计费(默认所有使用TCP端口49),拓扑不变
    
    HWTACACS(Huawei Terminal Access Controller Access Control System)协议是华为对TACACS进行了扩展的协议
    HWTACACS是在TACACS(RFC1492)基础上进行了功能增强的一种安全协议。该协议与RADIUS协议类似,主要是通过“客户端—服务器”模式与HWTACACS服务器通信来实现多种用户的AAA功能。
    HWTACACS与RADIUS的不同在于:
    l RADIUS基于UDP协议,而HWTACACS基于TCP协议。
    l RADIUS的认证和授权绑定在一起,而HWTACACS的认证和授权是独立的。
    l RADIUS只对用户的密码进行加密,HWTACACS可以对整个报文进行加密。
    
    [Huawei]aaa
    [Huawei-aaa]authentication-scheme xsss_aut                      配置AAA认证方案名为xsss_aut
    [Huawei-aaa-authen-aaa]authentication-mode hwtacacs local       配置AAA认证模式为先hwtacacs,如无响应则本地认证
    [Huawei-aaa-authen-aaa]authentication-super hwtacacs super      接入用户进行提权时,先进行hwtacacs认证,如无响应再本地认证
    [Huawei-aaa-authen-aaa]quit
    
    [Huawei]aaa
    [Huawei-aaa]authorization-scheme shou_quan                      配置AAA授权方案名为xsss_aut
    [Huawei-aaa-author-aaa]authorization-mode hwtacacs local        配置AAA授权模式为先hwtacacs,如无响应则本地授权
    [Huawei-aaa-author-aaa]quit
    
    [Huawei-aaa]accounting-scheme xsss_acc                          配置AAA计费方案名为xsss_acc
    [Huawei-aaa-accounting-xsss_acc]accounting-mode hwtacacs        配置AAA计费模式为hwtacacs服务器计费
    [Huawei-aaa-accounting-xsss_acc]accounting start-fail offline   配置当开始计费失败时,将用户离线
    [Huawei-aaa-accounting-xsss_acc]accounting relaltime 3          配置对用户进行实时计费,计费间隔为3min
    [Huawei-aaa-accounting-xsss_acc]quit
    
    二、配置hwtacacs模板
    
    [Huawei]hwtacacs-server template xsss_tpl                       配置hwtacacs模板名为xsss_tpl
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server authentication 172.17.16.254 49    主hwtacacs认证服务地址和端口
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server authentication 172.17.16.253 49 secondary     备用认证服务器
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server authorization 172.17.16.253 49      主hwtacacs授权服务地址和端口
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server authorization 172.17.16.253 49 secondary       备用授权服务器
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server accounting 172.17.16.253 49         主hwtacacs计费服务地址和端口
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server accounting 172.17.16.253 49 secondary          备用计费服务器
    [Huawei-hwtacacs-xsss_tpl]hwtacacs-server shared-key cipher mykey      配置设备与hwtacacs通信的共享秘钥为mykey
    [Huawei-hwtacacs-xsss_tpl]quit
    
    三、在AAA用户域绑定要使用的AAA认证和hwtacacs模板
    
    [Huawei]aaa
    [Huawei-aaa]domain xsss                                   配置AAA域,名称xsss
    [Huawei-aaa-domain-xsss]authentication-scheme xsss_aut    在域中绑定AAA认证方案
    [Huawei-aaa-domain-xsss]authorization-scheme shou_quan    在域中绑定AAA认证方案
    [Huawei-aaa-domain-xsss]accounting-scheme xsss_acc        在域中绑定AAA计费方案
    [Huawei-aaa-domain-xsss]hwtacacs-server xsss_tpl          在域中绑定hwtacacs模板
    [Huawei-aaa-domain-xsss]quit
    
    检查命令:
    [Huawei]display hwtacacs-server template xsss_tpl
      ---------------------------------------------------------------------------
      HWTACACS-server template name   : xsss_tpl
      Primary-authentication-server  : 172.17.16.254:49:-
      Primary-authorization-server    : 172.17.16.254:49-
      Primary-accounting-server       : 172.17.16.254:49:-
      Secondary-authentication-server : 172.17.16.253:49:-
      Secondary-authorization-server   : 172.17.16.253:49:-
      Secondary-accounting-server      : 172.17.16.253:49:-
      Current-authentication-server   : 172.17.16.254:49:-
      Current-authorization-server     : 172.17.16.254:49:-
      Current-accounting-server        : 172.17.16.254:49:-
      Source-IP-address               : 0.0.0.0
      Shared-key                      : mykey
      Quiet-interval(min)             : 5
      Response-timeout-Interval(sec)  : 5
      Domain-included                 : Yes
      Traffic-unit                    : B
      ---------------------------------------------------------------------------
      Total 1,1 printed
    [Huawei]
    
    [Huawei]display domain name xsss
      Domain-name                     : xsss                          
      Domain-state                      : Active
      Authentication-scheme-name     : xsss_aut
      Accounting-scheme-name          : xsss_acc
      Authorization-scheme-name       : shou_quan
      Service-scheme-name              : -
      RADIUS-server-template          : -
      HWTACACS-server-template        : xsss_tpl
    [Huawei]
    
    

  • 相关阅读:
    InterlockedIncrement函数详解
    c#事件调用
    jdk-8u281-windows-x64.exe JavaSE开发包
    安卓SDK_installer_r24.4.1-windows
    c#中@符号作用
    c#winformAPI_MFC_API
    NFC上位机未发现RFID设备
    MFC隐藏到托盘双击还原_右键退出实现方法
    win10 win+R快捷指令启动程序汇总
    CAN总线调试---节点掉线问题
  • 原文地址:https://www.cnblogs.com/xieyunc/p/9126451.html
Copyright © 2020-2023  润新知