热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

交换机华为命令行配置视图

用户视图(查看运行状态或其他参数)系统视图(配置设备的系统参数)system-viewEntersystemview,returnuservi

用户视图(查看运行状态或其他参数)
<Huawei>系统视图(配置设备的系统参数)
<Huawei>system-view
Enter system view, return user view with Ctrl&#43;Z.
[Huawei]接口视图(配置接口参数)
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]协议视图(配置xx协议)返回上一视图
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]quit
<Huawei>直接返回用户视图
<Huawei>system-view
Enter system view, return user view with Ctrl&#43;Z.
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]return
<Huawei>命令提示:输入一部分在后面输入?
<Huawei>sy?system-view
<Huawei>sy查看VRP系统版本
<Huawei>display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.110 (S5700 V200R001C00)
Copyright (c) 2000-2011 HUAWEI TECH CO., LTDQuidway S5700-28C-HI Routing Switch uptime is 0 week, 0 day, 0 hour, 38 minutes
<Huawei>更改名称(在系统视图下)
[Huawei]sysname s1
[s1]配置登录simple密码(后续在登录时,密码看不见,输完直接按enter就好了)
这里的simple不是说密码内容简单,而是显示的简单,以明文的方式显示出来
[Huawei]user-interface console 0
[Huawei-ui-console0]set authentication password simple 123456
[Huawei-ui-console0]
Dec 2 2021 21:47:01-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 4, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-ui-console0]authentication-mode password
[Huawei-ui-console0]
Dec 2 2021 21:48:22-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 5, th
e change loop count is 0, and the maximum number of records is 4095.查看当前设备的配置信息(当看到--More--时,一直按enter即可看完全部)
<Huawei>display current-configuration
#
sysname Huawei
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple adminlocal-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 0authentication-mode passwordset authentication password simple 123456
user-interface vty 0 4
#
return配置cipher密码(加密密码)
[switch2-ui-console0]set authentication password cipher 123456
[switch2-ui-console0]
Dec 2 2021 22:08:34-08:00 switch2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.
5.25.191.3.1 configurations have been changed. The current change number is 5, t
he change loop count is 0, and the maximum number of records is 4095.此时查看密码的显示
<switch2>display current-configuration
#
sysname switch2
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple adminlocal-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 0authentication-mode passwordset authentication password cipher w-:8&#43;fEoLQ9P4p;tsqP&#43;(RN#
user-interface vty 0 4
#
return更改自动退出超时(配置屏幕睡眠) 单位:分钟 24*60&#61;1440
[switch-ui-console0]idle-timeout 1440
[switch-ui-console0]
Dec 2 2021 22:20:32-08:00 switch DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 7, th
e change loop count is 0, and the maximum number of records is 4095.save命令 如果不save,则在停止该交换机(或停电)之后再重启,之前配置的东西都无效
所以在配置完东西之后,应该在用户视图save
[Huawei]sysname switch
[switch]return
<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]:
Dec 2 2021 22:32:03-08:00 switch %%01CFM/4/SAVE(l)[54]:The user chose Y when de
ciding whether to save the configuration to the device.
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<switch>重启
<switch>reboot
Info: The system is now comparing the configuration, please wait.
Info: If want to reboot with saving diagnostic information, input &#39;N&#39; and then e
xecute &#39;reboot save diagnostic-information&#39;.
System will reboot! Continue?[Y/N]:y
Dec 2 2021 22:40:01-08:00 switch %%01CMD/4/REBOOT(l)[54]:The user chose Y when
deciding whether to reboot the system. (Task&#61;co0, Ip&#61;**, User&#61;**)
<switch>
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/BOARD_DISABLE(l)[55]:Board 0 has b
een unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFPDT/4/IF_STATE(l)[56]:GigabitEthernet0/0
/1 has turned into DOWN state.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[57]:Interface Gigabi
tEthernet0/0/1 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFPDT/4/IF_STATE(l)[58]:GigabitEthernet0/0
/2 has turned into DOWN state.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[59]:Interface Gigabi
tEthernet0/0/2 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_STATE(l)[60]:Interface Vlanif1
has turned into DOWN state.
Dec 2 2021 22:40:01-08:00 switch %%01IFPDT/4/IF_STATE(l)[61]:GigabitEthernet0/0
/3 has turned into DOWN state.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[62]:Interface Gigabi
tEthernet0/0/3 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[63]:Interface Gigabi
tEthernet0/0/4 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[64]:Interface Gigabi
tEthernet0/0/5 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[65]:Interface Gigabi
tEthernet0/0/6 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[66]:Interface Gigabi
tEthernet0/0/7 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[67]:Interface Gigabi
tEthernet0/0/8 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[68]:Interface Gigabi
tEthernet0/0/9 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[69]:Interface Gigabi
tEthernet0/0/10 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[70]:Interface Gigabi
tEthernet0/0/11 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[71]:Interface Gigabi
tEthernet0/0/12 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[72]:Interface Gigabi
tEthernet0/0/13 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[73]:Interface Gigabi
tEthernet0/0/14 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[74]:Interface Gigabi
tEthernet0/0/15 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[75]:Interface Gigabi
tEthernet0/0/16 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[76]:Interface Gigabi
tEthernet0/0/17 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[77]:Interface Gigabi
tEthernet0/0/18 has been unavailable.
Dec 2 2021 22:40:01-08:00 switch %%01IFNET/4/IF_DISABLE(l)[78]:Interface Gigabi
tEthernet0/0/19 has been unavailable.恢复出厂默认(重启后生效)
第一次选y表示确定要恢复出厂设置
第二次选n表示不保存配置
第三次选y表示确定要重启
<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.
Dec 2 2021 22:43:45-08:00 switch %%01CFM/4/RST_CFG(l)[0]:The user chose Y when
deciding whether to reset the saved configuration.
Info: Succeeded in clearing the configuration in the device.
<switch>reboo
<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]:n
Info: If want to reboot with saving diagnostic information, input &#39;N&#39; and then e
xecute &#39;reboot save diagnostic-information&#39;.
System will reboot! Continue?[Y/N]:y关闭接口,禁用某一台主机,不让它与其他主机通信
[switch2]interface GigabitEthernet 0/0/2
[switch2-GigabitEthernet0/0/2]shu
[switch2-GigabitEthernet0/0/2]shutdown
[switch2-GigabitEthernet0/0/2]
Dec 2 2021 22:53:51-08:00 switch2 %%01PHY/1/PHY(l)[1]: GigabitEthernet0/0/2:change status to down
Dec 2 2021 22:53:55-08:00 switch2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.
5.25.191.3.1 configurations have been changed. The current change number is 7, t
he change loop count is 0, and the maximum number of records is 4095.激活接口
[switch2-GigabitEthernet0/0/2]undo shutdown
[switch2-GigabitEthernet0/0/2]
Dec 2 2021 22:58:01-08:00 switch2 %%01PHY/1/PHY(l)[2]: GigabitEthernet0/0/2:change status to up
Dec 2 2021 22:58:05-08:00 switch2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.
5.25.191.3.1 configurations have been changed. The current change number is 8, t
he change loop count is 0, and the maximum number of records is 4095.

推荐阅读
  • 采用IKE方式建立IPsec安全隧道
    一、【组网和实验环境】按如上的接口ip先作配置,再作ipsec的相关配置,配置文本见文章最后本文实验采用的交换机是H3C模拟器,下载地址如 ... [详细]
  • 本文介绍如何使用 Android 的 Canvas 和 View 组件创建一个简单的绘图板应用程序,支持触摸绘画和保存图片功能。 ... [详细]
  • 本文详细解释了华为ENSP模拟器中常用的命令,涵盖用户模式、系统模式、接口模式和地址池视图模式下的操作。这些命令对于进行计算机网络实验至关重要,帮助用户更好地理解和配置路由器及PC机的通信。 ... [详细]
  • 本文详细介绍了 Flink 和 YARN 的交互机制。YARN 是 Hadoop 生态系统中的资源管理组件,类似于 Spark on YARN 的配置方式。我们将基于官方文档,深入探讨如何在 YARN 上部署和运行 Flink 任务。 ... [详细]
  • 本文详细介绍了网络存储技术的基本概念、分类及应用场景。通过分析直连式存储(DAS)、网络附加存储(NAS)和存储区域网络(SAN)的特点,帮助读者理解不同存储方式的优势与局限性。 ... [详细]
  • 在尝试用另一台电脑的MySQL文件替换本地D:\xampp\mysql目录后,MySQL服务无法启动。错误提示显示MySQL意外关闭,可能是由于端口冲突、依赖缺失、权限问题或崩溃等原因引起。 ... [详细]
  • 本文介绍了ArcXML配置文件的分类及其在不同服务中的应用,详细解释了地图配置文件的结构和功能,包括其在Image Service、Feature Service以及ArcMap Server中的使用方法。 ... [详细]
  • 本题探讨了在一个有向图中,如何根据特定规则将城市划分为若干个区域,使得每个区域内的城市之间能够相互到达,并且划分的区域数量最少。题目提供了时间限制和内存限制,要求在给定的城市和道路信息下,计算出最少需要划分的区域数量。 ... [详细]
  • Struts与Spring框架的集成指南
    本文详细介绍了如何将Struts和Spring两个流行的Java Web开发框架进行整合,涵盖从环境配置到代码实现的具体步骤。 ... [详细]
  • 配置多VLAN环境下的透明SQUID代理
    本文介绍如何在包含多个VLAN的网络环境中配置SQUID作为透明网关。网络拓扑包括Cisco 3750交换机、PANABIT防火墙和SQUID服务器,所有设备均部署在ESXi虚拟化平台上。 ... [详细]
  • 在成功安装和测试MySQL及Apache之后,接下来的步骤是安装PHP。为了确保安全性和配置的一致性,建议在安装PHP前先停止MySQL和Apache服务,并将MySQL集成到PHP中。 ... [详细]
  • 主板IO用W83627THG,用VC如何取得CPU温度,系统温度,CPU风扇转速,VBat的电压. ... [详细]
  • 对象自省自省在计算机编程领域里,是指在运行时判断一个对象的类型和能力。dir能够返回一个列表,列举了一个对象所拥有的属性和方法。my_list[ ... [详细]
  • DCG 创始人兼首席执行官 Barry Silbert 发布致股东信,详细解答了 19 个核心问题,并分享了公司未来的发展方向。 ... [详细]
  • 国际高保真音乐流媒体平台的崛起:亚马逊与谷歌的竞争策略
    近期,亚马逊和谷歌正积极筹备推出高保真音乐流媒体服务,预计在2019年底前上线。根据市场研究机构CIRP的数据,截至2018年12月,美国智能音箱的安装量已增至6600万台,较第三季度增长显著。这一趋势对Spotify等传统流媒体平台构成了新的挑战。 ... [详细]
author-avatar
流浪汉中的小男人
这个家伙很懒,什么也没留下!
RankList | 热门文章