AAA的配置

拓扑

代码

R1
<Huawei>sys   //进入系统视角
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable    //关闭路由器信息表
Info: Information center is disabled.
[Huawei]sysname R1  //修改用户名
[R1]interface g0/0/0   //进入0/0/0接口
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24   //配置IP
[R1-GigabitEthernet0/0/0]undo shutdown   //打开接口
Info: Interface GigabitEthernet0/0/0 is not shutdown. 
[R1-GigabitEthernet0/0/0]quit  
[R1]quit  
 

R2
[Huawei]undo info-center enable   //关闭路由输出信息
Info: Information center is disabled.
[Huawei]sysname R2   
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.2 24  //配置IP
[R2-GigabitEthernet0/0/1]undo shutdown  //打开接口
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R2-GigabitEthernet0/0/1]quit
[R2]aaa  //进入AAA视图
[R2-aaa]authentication-scheme hcial   //创建认证方案hcia1
Info: Create a new authentication scheme.
[R2-aaa-authen-hcial]authentication-mode local  //本地认证
[R2-aaa-authen-hcial]quit
[R2-aaa]authorization-scheme hcia2   //hcia2
Info: Create a new authorization scheme.
[R2-aaa-author-hcia2]authorization-mode local  //本地授权
[R2-aaa-author-hcia2]quit
[R2-aaa]quit
[R2-aaa]domain hcia   //创建域hcia
Info: Success to create a new domain.
[R2-aaa-domain-hcia]authentication-scheme hcia1   //指定为hcia1认证
[R2-aaa-domain-hcia]authorization-scheme hcia2     //指定为hcia2授权
[R2-aaa-domain-hcia]quit
[R2-aaa]local-user ly@hcia password cipher 1234  //用户名为ly,密码为1234,hcia域
[R2-aaa]local-user ly@hcia service-type telnet  //服务类型为talnet
[R2-aaa]local-user ly@hcia privilege level 3   //用户权限为3
[R2-aaa]quit
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa   //AAA认证模式
[R2-ui-vty0-4]quit
 

结果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值