ensp命令练习
1交换机的基本配置
1.1交换机
用户视图 进入 系统视图
<Huawei>system-view
[Huawei]
修改交换机的名字
<Huawei>system-view
[Huawei]sysname switch
[switch]
关闭终端日志提示
[switch]quit
<switch>undo terminal monitor
进入接口视图
<switch>system-view
[switch]interface GigabitEthernet 0/0/1
[switch-GigabitEthernet0/0/1]
进入接口视图 禁用接口
<switch>system-view
[switch]interface GigabitEthernet 0/0/1
[switch-GigabitEthernet0/0/1]shutdown
进入接口视图 启用接口
<switch>system-view
[switch]interface GigabitEthernet 0/0/1
[switch-GigabitEthernet0/0/1]undo shutdown
进入系统视图 进入console口 管理交换机
<switch>system-view
[switch]user console 0
[switch-ui-console0]
进入系统视图 进入console口 配置交换机密码
<switch>system-view
[switch]user console 0
[switch-ui-console0]authentication-mode password
[switch-ui-console0]set authentication password cipher 123
[switch-ui-console0]
进入系统视图 进入console口 配置交换机的超时保护时间
<switch>system-view
[switch]user console 0
[switch-ui-console0]idle-timeout 1440
进入系统视图 进入console口 退出console
Ctrl + Z 快捷键,表示退出
<switch>system-view
[switch]user console 0
[switch-ui-console0]quit
[switch]return
<switch>
重启
<switch>reboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the configuration file for the n
ext startup:, Continue?[Y/N]: Y
保存
<switch>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N] y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<switch>
恢复出厂设置
<switch>reset saved-configuration
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y
Warning: Now clearing the configuration in the device.
Info: Succeeded in clearing the configuration in the device.
<switch>reboot
<Huawei>
查看交换机 信息
<Huawei>display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.110 (S5700 V200R001C00)
Copyright (c) 2000-2011 HUAWEI TECH CO., LTD
Quidway S5700-28C-HI Routing Switch uptime is 0 week, 0 day, 0 hour, 2 minutes
<Huawei>
查看当前有效配置
<Huawei>display current-configuration
#
sysname Huawei
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
<Huawei>
2远程交换机
进入虚拟接口lvanif1 进行配置
2.1 配置lsw1
进入用户视图 lsw1
<Huawei>system-view
[Huawei]sysname lsw1
关闭终端日志提示
[lsw1]quit
<lsw1>undo terminal monitor
进入vlan 1 口 配置 交换机的ip
[lsw1]interfave vlan 1
[lsw1-Vlanif1]ip address 192.168.1.1 255.255.255.0
[lsw1-Vlanif1]quit
管理远程 配置vty 接口
vty是虚拟终端 是一种网络远程设备链接的方式
vty 0 4 表示同时打卡5 个回话
配置远程访问 密码
[lsw1-ui-vty0-4]set authentication password cipher Taren1
配置远程访问 权限
一共1-15个等级
0 参观, ping tracert tenlet quit
1 监控 ,0级命令 reboot reset undo debugging
2, 系统配置 0,1级命令 所有配置命令(管理及命令除外)
3-15管理, 所有命令
[lsw1-ui-vty0-4]user privilege level 3
[lsw1-ui-vty0-4]return
<lsw1>save