华为交换机AAA配置与管理
中兴,华为,烽火交换机常用配置命令教程

中兴,华为,烽火交换机常用配置命令教程交换机工作于OSI参考模型的第二层,即数据链路层。
交换机内部的CPU会在每个端口成功连接时,通过将MAC地址和端口对应,形成一张MAC表,不同品牌交换机配置可能有所不同,本文将详细介绍中兴,华为,烽火交换机常用配置参数,需要的朋友可以参考下ZXDSL8210常用命令查看板卡类型和软硬件版本号 showcard进入DSL模式 dsl查看端口状态 showinfo查看ADSL速率摸板 showprof更改端口应用的速率摸板 linecfg查看ADSL端口的线路质量 showperf打开ADSL端口 enable关闭ADSL端口 disable重启ADSL端口 resetport进入atm atm在atm下查看PVC showvcx allZXDSL8220常用命令查看板卡类型和软硬件版本号 sh card查看ADSL端口状态 show adsl status查看ADSL速率摸板 show adsl profile查看速率摸板D3M具体信息 show adsl profile d3m更新端口的流量信息 update adsl-perf card_list/port_list关闭ADSL端口 shutdown interface打开ADSL端口 no shutdown interfaceZXDSL9210设备常用命令查看板卡配置和版本号 show card查看设备版本号 show version查看ADSL端口状态 show interface查看一块板卡端口状态 show adsl status slot 1查看ADSL端口线路质量 show adsl physical查看ADSL线路摸板种类 show adsl profile查看D3M摸板的配置 show adsl profile d3m进入ADSL端口 int adsl-mpvc card/port关闭ADSL端口 shutdown打开ADSL端口 no shutdown中兴SU3查看板卡状态 show card all查看端口状态 show port查看速率摸板 show adsl lineprofile all查看线路质量 show adsl port端口号 option physical 开端口 port 端口号 enable关端口 port 端口号 disable华为MA5100&MA5103常用命令保存系统配制数据到FLASH内存 save查看单板状态 show board阻塞端口 block解除阻塞端口 no block激活端口 activate去激活端口 deactivate套片复位 chipset reset 0MA5300常用命令保存系统配置3 write查看单板状态 show board 0查看adsl端口状态 show adsl port state查看vdsl端口状态 show vdsl port state查看告警 show alarm history all查看板卡类型和运行状态 show board查看vlan show vlan all配制摸板 adsl line-profile add 3激活端口 adsl activate adsl 端口 3MA5600常用命令保存系统配制数据到FLASH内存 save查看单板状态 display board 0查看所有配制信息 disp running -config查看ADSL端口状态 display adsl port state查看vdsl端口状态 display vdsl port state查看xdsl 配置摸板 display adsl line-profile all查看vlan display vlan all查看告警 displayalarm history all查看上行板卡端口状态 display port state查看某个vlan所绑定下行端口 display vlan VLAN号查看上行板卡端口所绑定的vlan display port vlan配制摸板 adsl line-profile adddisplay interface adsl 0/1/1中兴交换机配置个人心得:命令的使用要注意各种用户模式。
华为S2300交换机开局配置

华为S2300交换机开局配置一、设置用户登录口令,登录方式,设备名称进入配置模式sys设置名称sysname huawei设置Console登录密码user-interface con 0authentication-mode passwordset authentication password cipher huawei配置用于AAA方式登录的用户名和密码aaalocal-user hw password simple hwlocal-user hw privilege level 15配置系统为AAA方式登录user-interface vty 0 4authentication-mode aaa二、设置管理VLAN,设备IP地址,默认网关假设设备管理VLAN为99假设设备管理地址为172.16.0.5,掩码为255.255.255.0假设设备默认网关为172.16.0.1假设设备上行接口为第1个千兆GE光口,如:interface GigabitEthernet0/0/1配置管理VLANvlan batch 99配置管理地址interface Vlanif99ip address 172.16.0.5 255.255.255.0配置默认网关ip route-static 0.0.0.0 0.0.0.0 172.16.0.1配置管理VLAN的上行口interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 99三、业务开通,配置业务VLAN的上行接口和下行接口配置业务VLAN,假设分配的业务VLAN为VLAN 2501 to 2524 vlan batch 2501 to 2524配置业务VLAN的上行口interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 2501 to 2524配置业务VLAN的下行口,若直接接用户,则为ACCESS模式配置业务VLAN 2501 to 2524到端口1-4interface Ethernet0/0/1port link-type accessport default vlan 2501#interface Ethernet0/0/2port link-type accessport default vlan 2502#interface Ethernet0/0/3port link-type accessport default vlan 2503#interface Ethernet0/0/4port link-type accessport default vlan 2504四、保存配置并验证业务是否正确配置退出配置模式quit保存配置save以下为可选操作:重启设备,可以验证设备断电后是否丢失数据重启之前请确认数据是否已正确配置和保存reboot。
华为交换机Console口属性配置

华为交换机Console⼝属性配置华为交换机Console⼝属性配置⼀、设置通过账号和密码(AAA验证)登陆Console⼝1. 进⼊ Console ⽤户界⾯视图<Huawei>system-view[Huawei]user-interface console 0[Huawei-ui-console0]2. 在 Console ⽤户界⾯视图下,设置⽤户验证⽅式为 AAA 验证[Huawei-ui-console0]authentication-mode ?aaa AAA authenticationnone Login without checking //⽆需验证直接登陆console⼝password Authentication through the password of a user terminal interface //只通过输⼊密码登陆console⼝[Huawei-ui-console0]authentication-mode aaa3. 进⼊AAA视图,配置登 Console ⼝的账号和密码[Huawei-ui-console0]q[Huawei]aaa[Huawei-aaa]local-user ?STRING<1-64> User name, in form of 'user@domain'. Can use wildcard '*',while displaying and modifying, such as *@isp,user@*,*@*.Cannot include invalid character / \ : * ? " < > | @ '[Huawei-aaa]local-user admin ?access-limit Set access limit of user(s)ftp-directory Set user(s) FTP directory permittedidle-timeout Set the timeout period for terminal user(s)password Set passwordprivilege Set admin user(s) levelservice-type Service types for authorized user(s)state Activate/Block the user(s)[Huawei-aaa]local-user admin password ?cipher User password with cipher text //以密⽂⽅式显⽰⼝令simple User password with plain text //以明⽂⽅式显⽰⼝令[Huawei-aaa]local-user admin password cipher ?STRING<1-16>/<24> The UNENCRYPTED/ENCRYPTED password string[Huawei-aaa]local-user admin password cipher 123456Info: Add a new user.//查看账户信息[Huawei-aaa]display local-user----------------------------------------------------------------------------User-name State AuthMask AdminLevel----------------------------------------------------------------------------admin A A -----------------------------------------------------------------------------Total 1 user(s)4. 设置登陆 Console 的账号和密码的服务类型为 Console(terminal)类型[Huawei-aaa]local-user admin ?access-limit Set access limit of user(s)ftp-directory Set user(s) FTP directory permittedidle-timeout Set the timeout period for terminal user(s)password Set passwordprivilege Set admin user(s) levelservice-type Service types for authorized user(s)state Activate/Block the user(s)[Huawei-aaa]local-user admin service-type ?8021x 802.1x userbind Bind authentication userftp FTP userhttp Http userppp PPP userssh SSH usertelnet Telnet userterminal Terminal userweb Web authentication userx25-pad X25-pad user[Huawei-aaa]local-user admin service-type terminal ?8021x 802.1x userbind Bind authentication userftp FTP userhttp Http userppp PPP userssh SSH usertelnet Telnet userweb Web authentication userx25-pad X25-pad user<cr>[Huawei-aaa]local-user admin service-type terminal//再次查看账户信息[Huawei-aaa]display local-user----------------------------------------------------------------------------User-name State AuthMask AdminLevel----------------------------------------------------------------------------admin A M -----------------------------------------------------------------------------Total 1 user(s)//保存配置<Huawei>saveThe current configuration will be written to the device.Are you sure to continue?[Y/N]y //输⼊y,确认Now saving the current configuration to the slot 0.Apr 6 2021 16:09:10-08:00 Huawei %%01CFM/4/SAVE(l)[55]:The user chose Y when deciding whether to save the configuration to the device.Save the configuration successfully.⼆、设置只通过密码登陆 Console ⼝1. 进⼊ Console ⽤户界⾯视图,设置只通过密码登陆 Console ⼝模式<Huawei>system-view[Huawei]user-interface console 0[Huawei-ui-console0]authentication-mode password2. 设置验证密码,输⼊的密码可以是明⽂或密⽂[Huawei-ui-console0]set authentication ?password Set the password for a user interface[Huawei-ui-console0]set authentication password ?cipher Set the password with cipher text //以密⽂⽅式显⽰⼝令simple Set the password in plain text //以明⽂⽅显⽰⼝令[Huawei-ui-console0]set authentication password cipher ?STRING<1-16>/<24> Plain text/cipher text password[Huawei-ui-console0]set authentication password cipher 123456//查看操作的步骤[Huawei-ui-console0]display this#user-interface con 0authentication-mode passwordset authentication password cipher yLST2)ywQ@:.`&R&e7S(bTi# //密码加密处理了user-interface vty 0 4#return//保存配置<Huawei>saveThe current configuration will be written to the device.Are you sure to continue?[Y/N]y //输⼊y,确认Now saving the current configuration to the slot 0.Apr 6 2021 16:09:10-08:00 Huawei %%01CFM/4/SAVE(l)[55]:The user chose Y when deciding whether to save the configuration to the device.Save the configuration successfully.1. 输⼊的密码可以是明⽂或者密⽂,当不指定cipher password参数时,将采⽤交互⽅式输⼊明⽂密码;2. 当指定cipher password参数时,既可以输⼊明⽂密码也可以输⼊密⽂密码,但都将以密⽂形式保存在配置⽂件中。
华为3700交换机基本配置-

华为3700交换机基本配置-没有测试-主要我现在还不明白路由的配置,请老师给指教一下。
启动交换机<Huawei>sys[Huawei]sysname huawei(机器名)#[huawei]aaa(AAA视图)[huawei-aaa]local-user admin password cipher admin(用户名和密码)[huawei-aaa]local-user admin service-type telnet(接入类型)[huawei-aaa]local-user admin privilege level 3(用户级别)[huawei-aaa]user-interface vty 0 4[huawei-ui-vty0-4]authentication-mode aaa#[huawei]vlan batch 10 20 30(批量创建VLAN)[huawei]in vlan 10(VLAN接口)[huawei-Vlanif10]ip address 172.18.136.72 24(VLAN接口地址)[huawei]in vlan 20(VLAN接口)[huawei-Vlanif10]ip address 192.168.1.1 24(VLAN接口地址)[huawei]in vlan 30(VLAN接口)[huawei-Vlanif10]ip address 192.168.2.1 24(VLAN接口地址)#[huawei]interface Ethernet0/0/22[huawei-Ethernet0/0/21]description UPLINK[huawei-Ethernet0/0/22]port link-type trunk(更改接口为trunk与三层交换机通讯)[huawei-Ethernet0/0/22]port trunk allow-pass vlan 10[huawei]interface Ethernet0/0/21[huawei-Ethernet0/0/21]description UPLINK[huawei-Ethernet0/0/21]port link-type trunk(备用接口)[huawei-Ethernet0/0/21]port trunk allow-pass vlan 10#[huawei-Ethernet0/0/1]port link-type access..........(使用文本批量粘贴执行)[huawei-Ethernet0/0/10]port link-type access[huawei-Ethernet0/0/1]port trunk allow-pass vlan 20..........(使用文本批量粘贴执行)[huawei-Ethernet0/0/10]port trunk allow-pass vlan 20#[huawei-Ethernet0/0/11]port link-type access..........(使用文本批量粘贴执行)[huawei-Ethernet0/0/20]port link-type access[huawei-Ethernet0/0/11]port trunk allow-pass vlan 30..........(使用文本批量粘贴执行)[huawei-Ethernet0/0/20]port trunk allow-pass vlan 30#[Huawei]ip route-static 0.0.0.0 0.0.0.0 172.18.136.73(这个地址与VLAN10里的172.18.136.72有什么关联)<Huawei>save是的,VLAN10的路由这样写对不对,好像我没有指定下跳的IP地址,VLAN20 30 的路由怎么写呢?VLAN 20 为管理路由我一般设这样做,3700上联路由器,VLAN10是用来连接路由器的,恩,我就把你的路由器当成三层交换机(上级的交换机)地址段为172.18.136.1 VLAN 10那我的这个3700交换机要想实现与上级路由器通讯上网,我的VLAN 20 30 的路由应该怎么写呢?vlan10只开一个端口,模式为ACCESS,与路由器相连。
华为交换机的三种视图:用户视图,系统视图,接口视图

华为交换机的三种视图:⽤户视图,系统视图,接⼝视图华为交换机的三种视图: ⽤户视图, 系统视图, 接⼝视图⽤户视图: 刚开始登⼊交换机时的视图,⼀般看到的是尖括号<> .save // 配置完交换机后保存当前配置的命令system-view // 进⼊系统视图的命令clock timezone BJ add|minus 8 // 设置时区clock datetime 16:36:00 2016-07-01 //设置交换机的时间系统视图: 在⽤户视图下输⼊system-view后进⼊系统视图,⼀般为⽅括号[]display current-configuration // 显⽰当前配置user-interface maximum-vty 15 //配置vty最⼤连接数user-interface vty 0 14 //进⼊vty⽤户界⾯视图user privilege level 2 //设置vty登⼊的⽤户等级为2(配置⽤户级别)authentication-mode aaa //设置vty登⼊时的验证模式为⽤户名和密码验证aaa //进⼊AAA视图local-user admin password cipher admin@123 //设置aaa登⼊的⽤户名和密码local-user admin service-type telnet //设置admin⽤户远程登⼊时的协议user-interface console 0 //进⼊第0个console⼝的⽤户界⾯authentication-mode passwd //配置从console⼝登⼊交换机的认证模式为密码认证set authentication password cipher admin@123 //配置从console⼝登⼊交换机的密码vlan 10 //创建⼀个VLANinterface meth 0/0/1 //进⼊交换机的第⼀个管理⽹⼝ip address 192.168.1.110 24 //设置管理⽹⼝的ip地址和⼦⽹掩码interface gigabitethernet 0/0/1 //进⼊第⼀个业务⽹⼝port link-type access //设置第1个⽹⼝位access模式port default vlan 10 //设置此⽹⼝的VLAN号为10interface gigabitethnet 0/0/2 //进⼊第2个业务⽹⼝port link-type trunk //设置第⼆个⽹⼝位trunk模式port trunk allow-pass vlan 10 20 30 //设置此端⼝可以通过的VLAN号// port trunk allow-pass vlan all 表⽰可以通过所有的带VLAN的帧Interface gigabitethnet 0/0/3 //进⼊第3个业务⽹⼝Port link-type hybrid //设置此端⼝为hybrid模式,每个端⼝默认就是hybrid模式Port hybrid pvid vlan 10 //设置pvid为10Port hybrid tagged vlan 20 30 40 //设置tagged列表为20,30,40Port hybrid untagged vlan 50 60 //设置untagged列表为50,60Display port vlan //显⽰当前各端⼝的VLAN情况清除某个端⼝的配置Interface gigabitethernet 0/0/2Clear configuration thisUndo shutdownInterface gigabitethernet 0/0/3Undo port default vlan //access 模式的端⼝Undo port link-typeUndo port hybrid pvid vlan vlanid //hybrid 模式的端⼝Undo port hybrid untagged vlan vlanidUndo port hybrid tagged vlan vlanidUndo port trunk pvid vlan //trunk 模式的端⼝Undo port trunk allow-pass vlan vlanidUndo port link-type恢复出⼚设置s5700SI在⽤户视图下(按Ctrl+z组合键回到⽤户视图)输⼊如下命令操作reset saved-configurationYRebootNY设置交换机的mux-vlan模式假设主VLAN是10,从VLAN中group模式的有VLAN 20, separate模式的有VLAN 30,server连接1号端⼝,PC1和PC2连接2和3号端⼝,PC3和PC4连接4和5号端⼝Vlan batch 10 20 30Vlan 10Mux-vlanSubordinate group 20Subordinate separate 30把各连接的端⼝设为access模式,并且加⼊到各⾃的VLAN中,且同时开启mux-vlan功能,Interface gigabitethernet 0/0/1Port link-type accessPort default vlan 10Port mux-vlan enableInterface gigabitethernet 0/0/2 //3号端⼝设置⽅法类似Port link-type accessPort default vlan 20Port mux-vlan enableInterface gigabitethernet 0/0/4 //5号端⼝设置⽅法类似Port link-type accessPort default vlan 30Port mux-vlan enable三层交换机接路由器LAN⼝Vlan 60 70Interface vlanif 60ip address 192.168.60.1 24interface vlanif 70ip address 192.168.1.238 24interface gigabitethernet 0/0/3port link-type accessport default vlan 60interface gigabitethernet 0/0/4port link-type accessport default vlan 70ip route-static 0.0.0.0 0.0.0.0 192.168.1.1在与交换机相连的路由器上设置⼀条静态ip地址,⽬的地址为交换机相关的各个⽹段地址,⽹关为交换机与路由器相连的vlanif的ip地址批量配置交换机端⼝vlan batch 10 20port-group 1group-member gigabitethernet 0/0/1 to gigabitethernet 0/0/10port link-type accessport default vlan 10。
AAA原理与配置

AAA原理与配置概述 AAA是Authentication(认证)、Authorization(授权)和Accounting(计费)的简称,它提供了认证、授权、计费三种安全功能。
AAA可以通过多种协议来实现,⽬前华为设备⽀持基于RADIUS(Remote Authentication Dial-In User Service)协议或HWTACACS(Huawei Terminal Access Controller Access Control System)协议来实现AAA。
应⽤场景例如,企业总部需要对服务器的资源访问进⾏控制,只有通过认证的⽤户才能访问特定的资源,并对⽤户使⽤资源的情况进⾏记录。
NAS为⽹络接⼊服务器,负责集中收集和管理⽤户的访问请求。
AAA服务器表⽰远端的Radius 或 HWTACACS服务器,负责制定认证、授权和计费⽅案。
认证⽅式AAA有三种认证⽅式:不认证:完全信任⽤户,不对⽤户⾝份进⾏合法性检查。
本地认证:将本地⽤户信息(包括⽤户名、密码和各种属性)配置在NAS上。
缺省为本地认证。
远端认证:将⽤户信息(包括⽤户名、密码和各种属性)配置在认证服务器上。
注:如果⼀个认证⽅案采⽤多种认证⽅式,这些认证⽅式按配置顺序⽣效。
授权⽅式AAA⽀持以下三种授权⽅式:不授权:不对⽤户进⾏授权处理。
本地授权:根据NAS上配置的本地⽤户账号的相关属性进⾏授权。
远端授权: 1. HWTACACS授权,使⽤TACACS服务器对⽤户授权。
2. RADIUS授权,对通过RADIUS服务器认证的⽤户授权。
RADIUS协议的认证和授权是绑定在⼀起的,不能单独使⽤RADIUS进⾏授权。
计费⽅式AAA⽀持以下两种计费⽅式:不计费:为⽤户提供免费上⽹服务,不产⽣相关活动⽇志。
远端计费:通过RADIUS服务器或HWTACACS服务器进⾏远端计费。
AAA域 设备基于域来对⽤户进⾏管理,每个域都可以配置不同的认证、授权和计费⽅案,⽤于对该域下的⽤户进⾏认证、授权和计费。
华为交换机安全基线

华为交换机安全基线
华为交换机安全基线是指在使用华为交换机时,需要遵循的一套安
全配置准则和最佳实践,以确保交换机的安全性和可靠性。
以下是
一些常见的华为交换机安全基线配置要点:
1. 管理口安全:禁用默认管理口,为管理口设置强密码,并限制访
问管理口的IP地址范围。
2. 字典攻击防护:启用密码强度检查功能,配置登录失败锁定策略,限制登录尝试次数。
3. AAA认证和授权:使用AAA认证机制,确保用户身份验证的安全性。
采用RBAC角色权限控制,为不同的用户分配不同的权限。
4. SSH安全:优先使用SSH协议进行交换机访问和管理,并配置安全性较高的SSH版本和密码加密算法。
5. 网络访问控制:配置ACL访问控制列表,限制允许通过交换机的IP地址、端口、协议和服务。
6. 网络流量监测和报警:启用网络流量监测功能,及时发现异常流
量和攻击行为,并设置报警机制。
7. 系统日志和审计:启用系统日志功能,记录关键操作和事件,以便后期追踪和审计。
8. 端口安全:为交换机端口绑定MAC地址,限制端口下连接设备的数量,防止非法设备接入网络。
9. VLAN隔离:使用VLAN隔离不同的用户和设备,限制内部访问和互相通信。
10. 升级和补丁管理:及时升级交换机固件到最新版本,安装安全漏洞的补丁,以防止已知的攻击和漏洞利用。
以上只是一些常见的华为交换机安全基线配置要点,具体安全配置还需根据实际的网络环境和安全需求来进行定制化配置。
建议在配置安全策略前,参考华为官方文档、安全手册和最佳实践指南,确保正确和合适地配置华为交换机的安全性。
华为交换机配置SSH登陆方法

华为交换机配置SSH登陆方法一、配置设备基本信息首先,我们需要对华为交换机进行一些基本的配置,包括设置设备名称、域名和管理口IP地址等信息。
可通过以下命令进行配置:sysname 设备名称domain domain-name 域名interface 接口名称ip address ip-address { mask , mask-length }其中,设备名称为自定义的名称,域名为网络中的域名,IP地址为管理口的IP地址。
配置完成后,可以通过display current-configuration命令来查看当前的配置信息。
二、生成SSH密钥对生成SSH密钥对是配置SSH登录的重要步骤。
华为交换机支持RSA、DSA和ECDSA等多种加密算法。
以下是生成RSA密钥对的命令示例:sysname 设备名称user-interface vty 0 4ssh authentication-type rsa生成密钥对的具体步骤如下:1.创建RSA密钥对:rsa local-key-pair create创建密钥对时,系统会要求设置密钥长度,可以根据实际需求选择合适的长度。
2.显示密钥对信息:display rsa local-key-pair该命令可以查看当前设备的RSA密钥对信息。
3.导出密钥对到文件:rsa export local-key-pair file file-name通过该命令可以将生成的密钥对保存到文件中,方便备份和导入到其他设备中。
三、配置SSH登录在华为交换机上配置SSH登录,需要设置SSH服务参数、用户权限和登录方式等。
以下是配置SSH登录的命令示例:sysname 设备名称ssh server enablessh authentication-type default allssh user 用户名 authentication-type aaassh user 用户名 service-type stelnet其中,第一条命令用于启用SSH服务,第二条命令设置默认认证方式为全部认证(包括密码和密钥认证),第三条命令设置用户的认证方式为AAA认证,第四条命令设置用户的服务类型为STelnet。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为交换机AAA配置与管理AAA配置与管理一、基础1、AAA是指:authentication(认证)、authorization (授权)、accounting(计费)的简称,是网络安全的一种管理机制;Authentication是本地认证/授权,authorization 和accounting是由远处radius(远程拨号认证系统)服务或hwtacacs(华为终端访问控制系统)服务器完成认证/授权;AAA是基于用户进行认证、授权、计费的,而NAC方案是基于接入设备接口进行认证的。
在实际应用中,可以使用AAA的一种或两种服务。
2、AAA基本架构:C/S结构,AAA客户端(也叫NAS-网络接入服务器)是使能了aaa功能的网络设备(可以是一台或多台、不一定是接入设备)3、AAA基于域的用户管理:通过域来进行AAA用户管理,每个域下可以应用不同的认证、授权、计费以及radius或hwtacacs服务器模板,相当于对用户进行分类管理缺省情况下,设备存在配置名为default(全局缺省普通域)和default_admin(全局缺省管理域),均不能删除,只能5、hwtacacs协议Hwtacacs是在tacacs(rfc1492)基础上进行了功能增强的安全协议,与radius协议类似,主要用于点对点PPP和VPDN (virtual private dial-up network,虚拟私有拨号网络)接入用户及终端用户的认证、授权、计费。
与radius相比,具有更加可靠的传输和加密特性,更加适合于安全控制。
Hwtacacs协议与其他厂商支持的tacacs+协议的认证流程和实现方式是一致的,能够完全兼容tacacs+协议6、华为设备对AAA特性的支持支持本地、radius、 hwtacacs三种任意组合本地认证授权:优点是速度快,可降低运营成本;缺点是存储信息量受设备硬件条件限制RADIUS认证、计费:优点防止非法用户对网络的攻击相对较高;缺点是不支持单独授权功能,必须与认证功能一起,使用了认证功能就使用了授权功能Hwtacacs认证、授权、计费:认证、授权、计费室单独进行的,可以单独配置使用,在大型网络中可以部署多台hwtacacs服务器;还支持在一个方案中使用多协议模式,如本地认证常用于radius认证和hwtacacs认证的备用认证方案,本地授权作为hwtacacs授权的备用授权方案等二、本地方式认证和授权配置配置流程为:配置AAA方案——配置本地用户——配置业务方案——配置域的AAA方案一、配置AAA方案配置AAA方案就是配置AAA中的认证、授权、计费,用于“域的aaa方案”中绑定这些方案使用(所配置的各种方案只有在域中绑定后才能得到应用)认证方案:1、进入AAA视图[Huawei]aaa2、设置一个AAA认证方案名[Huawei-aaa]authentication-scheme test13、设置认证模式为本地认证(缺省为本地认证)[Huawei-aaa-authen-test1]authentication-mode ?hwtacacs HWTACACSlocalLocalnone Noneradius RADIUS4、配置当前认证模板对用户提升级别进行认证时采用的认证模式(可选,默认为本地认证)[Huawei-aaa-authen-test1]authentication-super ?hwtacacs HWTACACSnone Noneradius RADIUSsuper Super(本地认证模式)5、配置用户名和域名解析的方向(可选,缺省从左向右)[Huawei-aaa]domainname-parse-direction ?left-to-right Configure the left to right direction of domainname parsingright-to-leftConfigure the right to left direction of domainname parsing授权方案:1、创建一个授权方案[Huawei-aaa]authorization-scheme tets12、配置本地授权模式[Huawei-aaa-author-tets1]authorization-mode ?hwtacacs Use HWTACACS authorization methodif-authenticated Use authorization method which lets user(s) authorized if user(s) not authenticated by none authentication methodlocal Use local authorization methodnone Use none authorization method3、设置授权服务器下发的用户授权信息的生效模式(可选,缺省为overlay模式)[Huawei-aaa]authorization-modify ?Modify 修改模式,新下发的授权信息覆盖上一次下发的所有属性类别的授权信息 Overlay 覆盖模式,新下发的授权信息覆盖前次下发的所有用户授权信息# 模拟器未能模拟二、配置本地用户采用本地方式进行认证授权时,需要在本地设备配置用户的认证和授权信息,如用于认证的用户名、密码、用于授权的优先级、用户组、允许接入的服务器类型、可建立连接数、访问目录等1、设置本地用户名和密码[Huawei-aaa]local-user test password simple 1472582、设置本地用户的级别[Huawei-aaa]local-user test privilege level 153、设备本地用户加入用户组(可选,先配置好用户组[Huawei-aaa]local-user test user-group teset #模拟器无法模拟4、设置本地用户断开超时时间[Huawei-aaa]local-user test idle-timeout 6005、设备本地用户用于何种类型的服务[Huawei-aaa]local-user test service-type ?8021x 802.1x userbind Bind authentication userftp FTP user http Http userppp PPP user ssh SSH usertelnet Telnet userterminal Terminal userweb Web authentication userx25-pad X25-pad user6、本地用户作为FTP使用时设置访问目录[Huawei-aaa]local-user test ftp-directory ?STRING<1-58>flash:flash:/7、设置本地用户状态[Huawei-aaa]local-user test state ?active Permit the user(s) to deal with the authen requestblock Forbid the user(s) to deal with the authen request (拒绝该用户认证请求)8、设备本地用户访问时最大连接数(缺省不限制)[Huawei-aaa]local-user test access-limit 109、设置本地账号锁定功能(连续登陆失败达到次数后锁定和解锁、重试等参数)[Huawei-aaa]local-aaa-user wrong-passwordretry-interval 5(重试时间间隔)retry-time 3 (连续认证失败的最大次数block-time 10(账号被锁定时间)10、修改账号密码<Huawei>local-user change-password三、配置业务方案(可选)“业务方案”也是一种授权方案,它是专门针对一些IP业务(如管理员权限、DHCP服务、DNS服务、策略路由)所进行的授权,也称为“业务授权方案”。
通常只需要使用admin-user privilege level 命令配置管理员用户的用户级别,其它命令只有在业务方案被其他特性(如IPSEC)调用时才需要配置。
具体配置:1、创建一个业务方案[Huawei-aaa]service-scheme test2、配置本地用户可作为管理员登陆设备并设置级别[Huawei-aaa-service-test]admin-user privilege level 153、设置业务方案下使用的DHCP服务器组(仅7700及以上支持)[Huawei-aaa-service-test]dhcp-server grpup test4、设置可用的DHCP IP地址池或移动已配置的地址的位置(仅7700及以上支持)[Huawei-aaa-service-test]ip-pool testpool move-to testpool25、设置业务方案下的主用或备用DNS服务器地址Huawei-aaa-service-test]dns 10.1.1.1 ?secondary Set secondary DNS server's IP address<cr>6、设置业务方案下用户的策略路由功能(仅7700及以上支持)[Huawei]policy route 20.1.1.1(下一跳IP地址) 5(源路由vlan ID)四、配置域的AAA方案认证、授权方案、业务方案只有绑定域的AAA方案中才能得到应用1、设置一个域的AAA方案名(缺省存在default和default_admin两个域)[Huawei-aaa]domain testdomain2、绑定认证方案[Huawei-aaa-domain-testdomain]authentication-scheme test3、绑定授权方案[Huawei-aaa-domain-testdomain]authorization-scheme test4、绑定业务方案[Huawei-aaa-domain-testdomain]service-scheme tese5、设置域的AAA方案状态[Huawei-aaa-domain-testdomain]state ?active Activeblock Block6、设置域名分隔符(缺省为@)[Huawei-aaa]domain-name-delimiter @三、RADIUS方式认证、授权、计费配置配置流程为:配置AAA方案——配置radius服务器模板——配置业务方案——配置域的AAA方案一、认证授权配置Radius中的认证和授权时同步进行的,只要是能其认证功能,也就是能了授权功能。