配置HWTACACS服务器模板
背景信息
配置HWTACACS服务器模板中的关键步骤是指定服务器的IP地址和端口号、HWTACACS共享密钥。其他的步骤如配置HWTACACS用户名格式、流量单位等都有缺省配置,用户可以根据实际需要进行修改。
HWTACACS服务器模板下配置的HWTACACS用户名格式、HWTACACS共享密钥等要与HWTACACS服务器上的配置一致。
- 当一台HWTACACS服务器同时提供认证、授权或计费功能时,可以通过配置HWTACACS公共服务器一次性配置。
- 当通过不同的HWTACACS服务器提供认证、授权或计费功能时,需要分别配置HWTACACS认证、授权或计费服务器。
操作步骤
- 执行命令system-view,进入系统视图。
- 执行命令hwtacacs enable,使能HWTACACS功能。
缺省情况下,未使能HWTACACS功能。
- 执行命令hwtacacs server template template-name,创建HWTACACS服务器模板,并进入HWTACACS服务器模板视图。
- 执行命令hwtacacs server shared-key { cipher cipher-string | key-string },配置HWTACACS的共享密钥。
缺省情况下,没有配置HWTACACS的共享密钥。
- 通过以下两种方式之一配置主备HWTACACS服务器。
公共服务器的优先级高于分别配置的认证、计费和授权服务器。当配置公共服务器为主服务器时,其他类型的服务器(指认证、计费、授权服务器)的配置不生效。
配置HWTACACS公共服务器。
1个HWTACACS服务器模板下,主用HWTACACS公共服务器只能配置1个,备用HWTACACS公共服务器最多配置29个。- 配置主用HWTACACS公共服务器
hwtacacs server ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ] *
hwtacacs server ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] *
hwtacacs server host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] *
缺省情况下,未配置HWTACACS主用公共服务器。
- (可选)配置备用HWTACACS公共服务器
hwtacacs server ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ] * secondary
hwtacacs server ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] * secondary
hwtacacs server host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] * secondary
缺省情况下,未配置HWTACACS备用公共服务器。
- 配置主用HWTACACS公共服务器
分别配置HWTACACS认证、授权和计费服务器。
1个HWTACACS服务器模板下,主用认证、授权和计费服务器只能各配置1个,备用服务器最多配置29个。- 配置HWTACACS主用认证服务器
hwtacacs server authentication ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ]*
hwtacacs server authentication ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] *
hwtacacs server authentication host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] *
缺省情况下,未配置HWTACACS主用认证服务器。
- (可选)配置HWTACACS备用认证服务器
hwtacacs server authentication ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ]* secondary
hwtacacs server authentication ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] * secondary
hwtacacs server authentication host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] * secondary
缺省情况下,未配置HWTACACS备用认证服务器。
- 配置HWTACACS的主用授权服务器
hwtacacs server authorization ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ]*
hwtacacs server authorization ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] *
hwtacacs server authorization host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] *
缺省情况下,未配置HWTACACS主用授权服务器。
- (可选)配置HWTACACS的备用授权服务器
hwtacacs server authorization ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ]* secondary
hwtacacs server authorization ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] * secondary
hwtacacs server authorization host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] * secondary
缺省情况下,未配置HWTACACS备用授权服务器。
- 配置HWTACACS主用计费服务器
hwtacacs server accounting ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ] *
hwtacacs server accounting ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] *
hwtacacs server accounting host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] *
缺省情况下,未配置HWTACACS主用计费服务器。
- (可选)配置HWTACACS备用计费服务器
hwtacacs server accounting ip-address [ port ] [ { vpn-instance vpn-instance-name | public-net } | shared-key { key-string | cipher cipher-string } | mux-mode ] * secondary
hwtacacs server accounting ipv6-address [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | vpn-instance vpn-instance-name ] * secondary
hwtacacs server accounting host host-name [ port ] [ shared-key { key-string | cipher cipher-string } | mux-mode | { vpn-instance vpn-instance-name | public-net } ] * secondary
缺省情况下,未配置HWTACACS备用计费服务器。
- 配置HWTACACS主用认证服务器
- (可选)执行命令hwtacacs server user-name domain-excluded,配置设备向HWTACACS服务器发送的报文中用户名不包含域名。
缺省情况下,设备向HWTACACS服务器发送的报文中的用户名包含域名,即设备会把用户名和域名及域名分隔符一起发送给HWTACACS服务器进行认证。
- (可选)执行命令hwtacacs server source-ip ip-address,配置HWTACACS的源IP地址。
缺省情况下,未配置HWTACACS报文的源IP地址,此时设备使用实际出方向的接口的IP地址作为HWTACACS报文的源IP地址。
指定HWTACACS的源IP地址后,使用该HWTACACS模板与服务器通信时,报文的源IP地址为指定的IP地址。此时,服务器也将使用指定的IP地址与设备通信。
- (可选)执行命令hwtacacs server timer response-timeout interval,配置HWTACACS服务器应答超时时间。
缺省情况下,HWTACACS应答超时时间为5秒。
如果设备在应答超时时间内,没有收到HWTACACS服务器的回复,则认为服务器不可用。此时设备将尝试使用其他方式进行认证、授权。
- (可选)执行命令hwtacacs server timer quiet interval,配置HWTACACS主服务器恢复激活时间。
缺省情况下,主用服务器恢复激活状态前需要等待5分钟。
- 执行命令commit,提交配置。
- 执行命令return,返回用户视图。
- (可选)执行命令hwtacacs-user change-password hwtacacs server template-name,修改用户在HWTACACS服务器上保存的用户密码。
为充分保证设备安全,请用户定期修改密码。