发布时间: 2019-07-09 | 浏览次数: 1489 | 下载次数: 19 | 作者: wWX466263 | 文档编号: EKB1001842646
客户配置hwtacacs对通过telnet登录设备的账户做认证,因为当前hwtacacs服务器还未部署,在认证方式authentication mode配置了两种方式, hwtacacs和local,正常情况下,hwtacacs没有回应,就会跳转到本地认证。但是测试过程中客户发现。telnet登录后马上就断开,并有相关报错信息。The server has disconnected with an error. Server message reads: A protocol error occurred. The connection is closed by SSH server
1.首先检查配置,客户aaa视图下的配置和hwtacacs配置均没有问题,客户配置了认证授权计费模板,且都配置了hwtacacs和local两种方式。
authentication-scheme xxxx-ucm
authentication-mode hwtacacs local
authorization-scheme xxxx-ucm
authorization-mode hwtacacs local
authorization-cmd 0 hwtacacs local
authorization-cmd 1 hwtacacs local
authorization-cmd 3 hwtacacs local
authorization-cmd 15 hwtacacs local
accounting-scheme xxxx-ucm
accounting-mode hwtacacs
hwtacacs-server template xxxx-ucm
hwtacacs-server authentication 87.1.X.X
hwtacacs-server authentication 87.1.X.X secondary
hwtacacs-server authorization 87.1.X.X
hwtacacs-server authorization 87.1.X.X secondary
hwtacacs-server accounting 87.1.X.X
hwtacacs-server accounting 87.1.X.X secondary
hwtacacs-server source-ip 87.224.X.X
hwtacacs-server shared-key cipher xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
undo hwtacacs-server user-name domain-included
2.因为accounting-mode计费方式中无法配置计费方式为local,怀疑是该问题导致的。查看文档,发现在计费策略失败后,有一个默认的处理策略:accounting start-fail offline 这条命令是设备只要配置了计费
方案,如果计费服务器连接失败,直接让用户下线,之前登录后闪退就是该原因导致。
3.在计费方案accounting-scheme xxxx-ucm中增加命令accounting start-fail online命令。保证计费服务器不可达时用户可以上线,测试后跳转到本地认证故障消失。
根因是配置了计费策略后,设备默认的计费策略中失败对用户的处理方式是下线,所以在计费服务器不可达的前提下,即使认证和授权策略都在本地,但是计费策略无法实现本地认证,根据默认动作,只能将用户下线。
在计费模板中配置accounting start-fail online后问题解决。
1.如果不需要计费,可以不配置计费方案,防止在故障时本地认证失败。
2.修改计费方案中默认的计费失败策略为用户上线,防止计费服务器不可达时用户无法登陆设备。