实验1-配置模式切换
环境:ensp模拟器
添加一个路由器
1.实现配置模式的切换
<Huawei>system-view 从用户模式进入系统模式
[Huawei]
[Huawei]quit 从系统模式退回到用户模式
<Huawei>
2.使用快捷键
<Huawei>? ?键可以显示当前模式下可以输入的所有命令
<Huawei>sy 输入sy,然后敲下Tab键,命令自动补全
<Huawei>system-view
3.总结:
华为设备有两种配置模式:用户模式、系统模式。
进入设备首先进入的是用户模式,如果要对设备进行业务配置,则需要从用户模式进入系统模式。
在输入命令的时候如果能熟练运用快捷键,则会事半功倍。
实验2-配置主机名
<Huawei>system-view 进入系统模式
[Huawei]sysname R1 配置主机名
[R1]
实验3-配置console线路密码
1.设备管理方式有几种?
两种:本地管理、远程管理
2.这两种管理方式分别使用什么线路?
(1)本地管理使用console线路:用户通过物理接口(console口/MinUSB口)登录
固定编号是 con 0
(2)远程管理使用vty线路:虚拟类型终端,是一种虚拟线路端口,通过建立telnet或ssh进行连接登录
第一个为vty 0,第二个为vty1,最高编号为vty14,共有15个,缺省存在vty 0~4
3.如何配置console线路密码?
<Huawei>system-view
[Huawei]sysname R1
[R1]user-interface console 0 进入console线路,绝对编号 0
[R1-ui-console0]authentication-mode password 选择密码认证模式
Please configure the login password (maximum length 16):huawei123 设置密码
[R1-ui-console0]quit
[R1]quit
<R1>quit 退出设备登陆
Configuration console exit, please press any key to log on
Login authentication
Password: 在此输入密码,进入设备
<R1>
实验4-配置console口密码aaa认证模式
1.配置aaa模式本地管理密码:
[R1]user-interface console 0
[R1-ui-console0]authentication-mode aaa 选择aaa模式的认证
[R1-ui-console0]quit
[R1]aaa
[R1-aaa]local-user user0 password cipher huawei123
[R1-aaa]local-user user1 password cipher huawei234
[R1-aaa]local-user user2 password cipher huawei345 创建三个账号
[R1-aaa]local-user user0 privilege level 0
[R1-aaa]local-user user1 privilege level 1
[R1-aaa]local-user user2 privilege level 2 为账号分配不同的权限级别
[R1-aaa]quit
(退出设备登陆,然后通过不同的用户进入设备)
2.设备上配置的用户有多少级权限?
0-15,一共16级权限
3.不同级别的权限分别代表什么?
0级:访问级权限,通过0级用户进入设备基本上什么都不能做,就像游客一样。
1级:监控级权限,通过1级用户进入设备可以对设备的运行状态进行监控。
2级:配置级权限,通过2级用户进入设备可以对设备进行业务配置。
实验5-配置接口IP
环境:ensp模拟器
添加两个路由器
R1:
1.配置R1的接口IP
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/0]quit
2.查看接口IP配置
[R1]display ip interface brief
3.通过ping测试R1与R2的IP连通性
[R1]ping 12.1.1.2
R2:
1.配置R2的接口IP:
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]quit
2.检查接口IP配置:
[R2]display ip interface brief