温馨提示:欢迎对技术感兴趣的新手朋友们,希望这些知识点能对大家有帮助。如果有什么不解或疑惑或建议,可留言小编或邮件2355331040@qq.com,我将尽快给予解决。感谢大家的支持和关注,谢谢!!!

学习目标

· 掌握本地AAA认证授权方案的配置方法

· 掌握创建域的方法

· 掌握认证用户优先级的配置方法

拓扑图

image.png

图7.3 本地AAA配置实验拓扑图

场景

您是企业的网络管理员,需要对企业服务器的资源访问进行控制,只有通过认证的用户才能访问特定的资源,因此您需要在R1路由器上配置本地AAA认证,并基于域来对用户进行管理,并配置已认证用户的权限级别。

操作步骤

步骤一 实验环境准备

为了保证实验结果的准确性,确保设备以空配置启动。

配置R1

<Huawei>system-view

[Huawei]sysname R1

[R1]interface GigabitEthernet0/0/0

[R1-GigabitEthernet0/0/0]ip address 10.1.12.1 24

配置R2

<Huawei>system-view

[Huawei]sysname R2

[R2]interface GigabitEthernet0/0/0

[R2-GigabitEthernet0/0/0]ip address 10.1.12.2 24

步骤二 检测R1和R2间的连通性

<R1>ping 10.1.12.2

PING 10.1.12.2: 56 data bytes, press CTRL_C to break

Reply from 10.1.12.2: bytes=56 Sequence=1 ttl=255 time=100 ms

Reply from 10.1.12.2: bytes=56 Sequence=2 ttl=255 time=30 ms

Reply from 10.1.12.2: bytes=56 Sequence=3 ttl=255 time=20 ms

Reply from 10.1.12.2: bytes=56 Sequence=4 ttl=255 time=30 ms

Reply from 10.1.12.2: bytes=56 Sequence=5 ttl=255 time=30 ms

步骤三 在R1上配置AAA功能

在R1上配置认证方案为本地认证,授权方案为本地授权。

[R1]aaa

[R1-aaa]authentication-scheme auth1

[R1-aaa-authen-auth1]authentication-mode local

[R1-aaa-authen-auth1]quit

[R1-aaa]authorization-scheme auth2

[R1-aaa-author-auth2]authorization-mode local

[R1-aaa-author-auth2]quit

在R1上创建域“huawei“并将认证方案和授权方案与域关联起来,然后创建一个用户并将用户加入到域huawei。

[R1]telnet server enable

[R1]aaa

[R1-aaa]domain huawei

[R1-aaa-domain-huawei]authentication-scheme auth1

[R1-aaa-domain-huawei]authorization-scheme auth2

[R1-aaa-domain-huawei]quit

[R1-aaa]local-user user1@huawei password cipher huawei123

[R1-aaa]local-user user1@huawei service-type telnet

[R1-aaa]local-user user1@huawei privilege level 0

将R1配置为Telnet服务器,认证模式配置为AAA。

[R1]user-interface vty 0 4

[R1-ui-vty0-4]authentication-mode aaa

验证R2 Telnet R1时是否要经过AAA认证。

<R2>telnet 10.1.12.1

Press CTRL_] to quit telnet mode

Trying 10.1.12.1 ...

Connected to 10.1.12.1 ...

Login authentication

Username:user1@huawei

Password: 输入密码huawei123

<R1>system-view

^

Error: Unrecognized command found at '^' position.

<R1>quit

可以看到用户user1@huawei Telnet R1后不能使用命令system-view进入系统试图,原因是用户操作权限配置的是级别0,因此操作受限。

步骤四 验证AAA的配置结果

<R1>display domain name huawei

Domain-name : huawei

Domain-state : Active

Authentication-scheme-name : auth1

Accounting-scheme-name : default

Authorization-scheme-name : auth2

Service-scheme-name : -

RADIUS-server-template : -

HWTACACS-server-template : -

User-group : -

<R1>display local-user username user1@huawei

The contents of local user(s):

Password : **

State : active

Service-type-mask : T

Privilege level : 0

Ftp-directory : -

Access-limit : -

Accessed-num : 0

Idle-timeout : -

User-group : -

配置文件

<R1>display current-configuration


微思郭仔
31 声望2 粉丝

微思IT认证培训-思科、华为、红帽、oracle、VMware、PMP、CISP等,一切为了成为更好的自己,加油!!!