H3C常用命令详解
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
1.关闭后台日志输出
<yinzhengjie>sys
[yinzhengjie]undo info-center enable
2.查看设备IOS版本信息,设备启动时间,接口卡信息
<yinzhengjie>display version
3.查看全局配置信息
<yinzhengjie>display current-configuration #当前配合信息(即时信息),当设备断电或重启后丢失
<yinzhengjie>display saved-configuration #查看配置看start-config配置文件,该配置永久保存,断电重启后加载该文件,注意,华为设备会默认保存到vrpcfg.zip这个文件中。
4.查看设备所有接口的相关信息(包括IP,物理层,链路层协议状态等)
[yinzhengjie]display ip interface brief
<yinzhengjie>display interface Ethernet 0/0/0 #查看单个接口信息
5.查看H3C设备硬盘空间大小,及存储数据信息
<yinzhengjie>dir
6.给一个接口配置IP地址
<yinzhengjie>system-view
Enter system view, return user view with Ctrl+Z.
[yinzhengjie]interface Eth0/0/0
[yinzhengjie-Ethernet0/0/0]ip address 172.30.100.1 24 #这个也可以这样配置:[yinzhengjie-Ethernet0/0/0]ip address 172.30.100.1 255.255.255.0
[yinzhengjie-Ethernet0/0/0]undo shutdown
Info: Interface Ethernet0/0/0 is not shutdown.
[yinzhengjie-Ethernet0/0/0]
7.查看路由表信息
<yinzhengjie>display ip routing-table
8.查看历史命令记录
<yinzhengjie>display history-command
9.用户模式下配置系统时间
<yinzhengjie>clock datetime 0:26:30 2017-4-10
<yinzhengjie>display clock
2017-04-10 00:26:42-08:00
Monday
Time Zone(China-Standard-Time) : UTC-08:00
<yinzhengjie>
10.命令行编辑功能
11.显示系统运行统计信息
<yinzhengjie>display diagnostic-information
12.查看IP路由表摘要信息
[yinzhengjie]display ip routing-table
1 [yinzhengjie]display ip routing-table 2 Route Flags: R - relay, D - download to fib 3 ------------------------------------------------------------------------------ 4 Routing Tables: Public 5 Destinations : 2 Routes : 2 6 7 Destination/Mask(目的地址) Proto(路由协议) Pre(优先级) Cost(代价值) Flags NextHop (下一跳地址) Interface 8 9 127.0.0.0/8 Direct(直连) 0 0 D 127.0.0.1 InLoopBack0 10 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 11 12 [yinzhengjie] 13 14 关于协议扩充: 15 1>.Direct(直连) 16 2>.Static(静态路由) 17 3>.Rip(动态路由) 18 4>.O_ASE(OSPF)
13.查看符合指定目的地址的路由信息
[yinzhengjie]display ip routing-table 127.0.0.1
14.查看路由表的统计信息
[yinzhengjie]display ip routing-table statistics
15.查看OSPF配置信息
<yinzhengjie>display ospf brief
16.查看OSPF允许了哪些接口
<yinzhengjie>display ospf interface
17.
18.
19.
20.
21.