• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

01-入门命令参考

01-入门命令

本章节下载 01-入门命令  (292.15 KB)

docurl=/cn/Service/Document_Software/Document_Center/IP_Security/ACG/H3C_SecPath_ACG1000/Command/Command_Manual/H3C_ACG1000_CR(E6411_R6609)-800/01/202112/1510214_30005_0.htm

01-入门命令

  录

1 入门命令

1.1 系统时间命令

1.1.1 date

1.1.2 ntp

1.1.3 ntpupdate

1.1.4 display date

1.1.5 display ntp config

1.1.6 display timezone

1.1.7 timezone

1.2 系统升级命令

1.2.1 copy ftp

1.2.2 copy http

1.3 配置文件命令

1.3.1 save config

1.3.2 boot-loader file  startup-config backup-config

1.3.3 boot-loader file  backup-config startup-config

1.3.4 boot-loader file  running-config backup-config

1.3.5 boot-loader file  running-config startup-config

1.3.6 copy file ftp

1.3.7 copy file tftp

1.3.8 copy ftp

1.3.9 copy tftp

1.3.10 erase startup-config

1.4 管理员命令

1.4.1 guish admin unique

1.4.2 guish autosave

1.4.3 guish maxclient

1.4.4 guish timeout

1.4.5 user administrator name

1.4.6 user administrator authorized-address

1.4.7 user administrator local

1.4.8 user administrator ldap

1.4.9 user administrator radius

1.4.10 admin auth usbkey

1.4.11 admin auth block

1.4.12 admin auth retry

1.4.13 http port

1.4.14 https port

1.4.15 ssh port

1.4.16 telnet port

1.4.17 who

1.5 常用系统管理命令

1.5.1 clear user

1.5.2 ping

1.5.3 ping6

1.5.4 display version

1.5.5 tcpsyn

1.5.6 traceroute

1.5.7 who

2 多配置管理命令

2.1 copy命令

2.1.1 copy running FileName

2.1.2 copy startup-config FileName

2.1.3 copy FileName startup-config

2.1.4 copy config LocalFile ftp/tftp

2.1.5 copy ftp/tftp

2.2 compare命令

2.2.1 compare running-config startup-config

2.2.2 compare running-config LocalFile

2.3 delete命令

2.3.1 delete config-file FileName

2.4 display命令

2.4.1 display config-list

2.4.2 display config-file LocalFile

2.4.3 display startup

2.4.4 display capacity

2.4.5 display cpu usage

2.4.6 display user-wechat white-list

2.4.7 display url-whitelist all

 


1 入门命令

1.1  系统时间命令

1.1.1  date

date命令用来配置系统时间。

【命令】

date year month day hour minute second

【视图】

用户视图

【参数】

year:年,取值范围为2006~2030。

month:月,取值范围为1~12。

day:天,取值范围为1~31。

hour:小时,取值范围为0~23。

minute:分钟,取值范围为0~59。

second:秒,取值范围为0~59。

【举例】

# 配置系统时间。

host# date 2014 7 3 15 51 20

【相关命令】

·     display date

1.1.2  ntp

ntp命令用来配置通过时间服务器配置系统时间。

no ntp命令用来删除时间服务器配置。

【命令】

ntp word interval-time

no ntp

【视图】

系统视图

【参数】

word:NTP服务器的IP地址,或者域名。

interval-time:从NTP服务器获取时间的间隔,取值范围为5~65535,单位为秒。

【举例】

# 配置从asia.pool.ntp.org获取时间。

host# configure terminal

host(config)# ntp asia.pool.ntp.org 60

【相关命令】

·     display date

·     display ntp config

1.1.3  ntpupdate

ntpupdate命令用来立刻从NTP服务器获取时间。

【命令】

ntpupdate word

【视图】

用户视图

【参数】

word:指定的NTP服务器的IP地址,或者域名。

【举例】

# 立即从asia.pool.ntp.org获取时间。

host# ntpupdate asia.pool.ntp.org

1.1.4  display date

display date命令用来显示系统时间。

【命令】

display date

【视图】

用户视图

【举例】

# 显示系统当前时间。

host# display date

ABS time        :1404375911

UTC time        :2014-07-03 08:25:11

Local time      :2014-07-03 16:25:11

1.1.5  display ntp config

display ntp config命令用来显示通过NTP服务器获取时间的配置信息。

【命令】

display ntp config

【视图】

用户视图

【举例】

# 显示NTP的配置信息。

host# display ntp config

timezone 57

ntp asia.pool.ntp.org 60

!

1.1.6  display timezone

display timezone命令用来显示系统时区信息。

【命令】

display timezone

【视图】

用户视图

【举例】

# 显示系统时区的配置信息。

host# display timezone

timezone 57

!

1.1.7  timezone

timezone命令用来配置系统的时区。

【命令】

timezone zone

【视图】

系统视图

【参数】

zone:时区,取值范围为1~75。

【使用指导】

北京、乌鲁木齐时区为57。

【举例】

# 配置系统时区为北京、乌鲁木齐。

host# configure terminal

host(config)# timezone 57

【相关命令】

·     display date

·     display timezone

1.2  系统升级命令

1.2.1  copy ftp

copy ftp命令用来通过FTP服务器的匿名账户升级相关文件。

copy ftp username pasword命令用来通过FTP服务器配置的用户名和密码升级相关文件。

【命令】

copy ftp ip-address file-name { version | applib | avlib | ipslib | urllib }

copy ftp username pasword ip-address file-name { version | applib | avlib | ipslib | urllib }

【视图】

用户视图

【参数】

ip-address:FTP服务器IP地址。

file-name:升级的文件名称。

username:FTP服务器的用户名。

password:FTP服务器的密码。

version:从FTP服务器升级版本。

applib:从FTP服务器升级应用识别库。

avlib:从FTP服务器升级av库。

ipslib:从FTP服务器升级ips库。

urllib:从FTP服务器升级url库。

config:从FTP服务器升级配置文件。

【使用指导】

在通过FTP服务器升级相关文件前,需要保证:

·     FTP服务器与设备网络可达。

·     FTP服务器上存在升级响应的文件。

【举例】

# 通过匿名用户从FTP服务器升级系统版本。

host#copy ftp 192.168.1.75 image.bin version

# 通过FTP用户从FTP服务器升级系统版本。

host#copy ftp admin admin 192.168.1.75 image.bin version

1.2.2  copy http

copy http命令用来通过HTTP服务器升级相关文件。

【命令】

copy http ip-address file-name { version | applib | avlib | ipslib | urllib }

【视图】

用户视图

【参数】

version:从HTTP服务器升级版本。

applib:从HTTP服务器升级应用识别库。

avlib:从HTTP服务器升级av库。

ipslib:从HTTP服务器升级ips库。

urllib:从HTTP服务器升级url库。

config:从HTTP服务器升级配置文件。

【使用指导】

在通过HTTP服务器升级相关文件前,需要保证:

·     HTTP服务器与设备网络可达。

·     HTTP服务器上存在升级响应的文件。

【举例】

# 从HTTP服务器升级系统版本。

host#copy ftp 192.168.1.75 image.bin version

1.3  配置文件命令

1.3.1  save config

save config命令用来保存系统当前的配置。

【命令】

save config

【视图】

用户视图

【使用指导】

当系统的配置发生更改,需要保存配置时,需要执行此命令。

【举例】

# 保存系统当前配置。

host# save config 

Building configuration...

 

Save configuration ok !

【相关命令】

·     boot-loader file  startup-config backup-config

·     boot-loader file  backup-config startup-config

·     boot-loader file  running-config backup-config

·     boot-loader file  running-config startup-config

·     erase startup-config

1.3.2  boot-loader file  startup-config backup-config

boot-loader file  startup-config backup-config命令用来将启动配置进行备份。

【命令】

boot-loader file  startup-config backup-config

【视图】

用户视图

【举例】

# 备份启动配置。

host# boot-loader file  startup-config backup-config

【相关命令】

·     save config

·     boot-loader file  backup-config startup-config

·     boot-loader file  running-config backup-config

·     boot-loader file  running-config startup-config

·     erase startup-config

1.3.3  boot-loader file  backup-config startup-config

boot-loader file  backup-config startup-config命令用来将备份配置恢复为启动配置。

【命令】

boot-loader file  backup-config startup-config

【视图】

用户视图

【举例】

# 恢复备份配置为启动配置。

host# boot-loader file  backup-config startup-config

【相关命令】

·     save config

·     boot-loader file  startup-config backup-config

·     boot-loader file  running-config backup-config

·     boot-loader file  running-config startup-config

·     erase startup-config

1.3.4  boot-loader file  running-config backup-config

boot-loader file  running-config backup-config命令用来将当前有效配置保存为备份配置文件。

【命令】

boot-loader file  running-config backup-config

【视图】

用户视图

【举例】

# 将当前有效配置保存为备份配置文件。

host# boot-loader file  running-config backup-config

【相关命令】

·     save config

·     boot-loader file  startup-config backup-config

·     boot-loader file  backup-config startup-config

·     boot-loader file  running-config startup-config

·     erase startup-config

1.3.5  boot-loader file  running-config startup-config

boot-loader file  running-config startup-config命令用来将系统当前有效配置保存为启动配置。

【命令】

boot-loader file  running-config startup-config

【视图】

用户视图

【举例】

# 将系统当前有效配置保存为启动配置。

host# boot-loader file  running-config startup-config

【相关命令】

·     save config

·     boot-loader file  startup-config backup-config

·     boot-loader file  backup-config startup-config

·     boot-loader file  running-config backup-config

·     erase startup-config

1.3.6  copy file ftp

copy { running-config | startup-config } ftp命令用来通过FTP导出当前配置文件或启动配置文件。

【命令】

copy { running-config | startup-config } ftp username password ip-address remote-file

【视图】

用户视图

【参数】

running-config:导出当前系统配置文件。

startup-config:导出启动配置文件。

username:FTP服务器用户名。

password:FTP服务器密码。

ip-address:FTP服务器地址。

remote-file:导出后文件的保存名称。

【举例】

# 通过FTP导出当前系统配置文件。

host# copy running-config ftp admin admin 192.168.1.71 bk_cfg.con

【相关命令】

·     copy { running-config | startup-config } tftp ip-address remote-file

1.3.7  copy file tftp

copy { running-config | startup-config } tftp命令用来通过TFTP导出当前配置文件或启动配置文件。

【命令】

copy { running-config | startup-config } tftp ip-address remote-file

【视图】

用户视图

【参数】

running-config:导出当前系统配置文件。

startup-config:导出启动配置文件。

ip-address:TFTP服务器地址。

remote-file:导出后文件的保存名称。

【举例】

# 通过TFTP导出当前系统配置文件。

host# copy running-config tftp 192.168.1.71 bk_cfg.con

【相关命令】

·     copy { running-config | startup-config } ftp username password ip-address remote-file

1.3.8  copy ftp

copy ftp命令用来通过FTP服务器导入配置文件。

【命令】

copy ftp username password ip-address remote-file config

【视图】

用户视图

【参数】

username:FTP服务器用户名。

password:FTP服务器密码。

ip-address:FTP服务器地址。

remote-file:从FTP服务器导入的文件名称。

【举例】

# 从FTP服务器导入配置文件。

host# copy ftp admin admin 192.168.1.71 bk_cfg.con config

【相关命令】

·     copy tftp

1.3.9  copy tftp

copy tftp命令用来通过TFTP服务器导入配置文件。

【命令】

copy tftp ip-address remote-file config

【视图】

用户视图

【参数】

ip-address:TFTP服务器地址。

remote-file:从TFTP服务器导入的文件名称。

【举例】

# 从TFTP服务器导入配置文件。

host# copy tftp 192.168.1.71 bk_cfg.con config

【相关命令】

·     copy ftp username password ip-address remote-file config

1.3.10  erase startup-config

erase startup-config命令用来清除启动配置。

【命令】

erase startup-config

【视图】

用户视图

【举例】

# 清除系统启动配置。

host# erase startup-config

Remove all the configuration(back to factory default), are you sure? [y]/n: y

【相关命令】

·     save config

·     copy startup-config backup-config

·     copy backup-config startup-config

·     copy running-config backup-config

·     copy running-config startup-config

1.4  管理员命令

1.4.1  guish admin unique

guish admin unique命令用来开启管理员唯一性检查。

no guish admin unique命令用来关闭管理员唯一性检查。

【命令】

guish admin unique

no guish admin unique

【缺省情况】

缺省情况下,未开启管理员唯一性检查。

【视图】

系统视图

【使用指导】

该命令将使得第二个用相同管理员账号登录设备的IP登录失败。

【举例】

# 配置开启管理员唯一性检查。

host# configure terminal

host(config)# guish admin unique

1.4.2  guish autosave

guish autosave命令用来启用自动保存配置。

no guish autosave命令用来关闭自动保存配置。

【命令】

guish autosave

no guish autosave

【视图】

系统视图

【举例】

# 启用自动保存。

host# configure terminal

host(config)# guish autosave

1.4.3  guish maxclient

guish maxclient命令用来配置管理员最大登录数。

no guish maxclient命令用来删除管理员最大登录数。

【命令】

guish maxclient max

【缺省情况】

缺省情况下,管理员的最大登录数是20。

【视图】

系统视图

【参数】

max:管理员最大登录数,取值范围为1~20,默认为20。

【使用指导】

当执行no guish maxclient命令后,管理员最大登录数将恢复为默认值。

【举例】

# 配置管理员最大登录数。

host# configure terminal

host(config)# guish maxclient 15

1.4.4  guish timeout

guish timeout命令用来配置管理员没有操作自动退出的时间长度。

【命令】

guish timeout timeout

【缺省情况】

缺省情况下,超时时间是10分钟。

【视图】

系统视图

【参数】

timeout:管理员没有操作自动退出的时间长度。取值范围为1~480分钟。默认值为10分钟。

 

 

【举例】

# 配置管理员自动退出时间为20分钟。

host# configure terminal

host(config)# guish timeout 20

 

1.4.5  user administrator name

user administrator name enable命令用来启用一个管理员name。

user administrator name disable命令用来禁用一个管理员name。

【命令】

user administrator user enable

【视图】

系统视图

【参数】

user:管理员的名称,为已存在的管理员用户。

enable:启用管理员user。

disable:禁用管理员user。

【使用指导】

enable状态的管理员才能登录设备,disable状态的管理员不能使用,无法登录设备。

【举例】

# 创建一个管理员admin123,并将设备设置为enable。

host# system-view

host(config)# user administrator admin123 local test1q2w3e4r authorized-table admin

host(config)# user administrator admin123 enable

 

1.4.6  user administrator authorized-address

user administrator authorized-address命令用来配置管理员用户的管理地址。

no user administrator authorized-address命令用来删除管理员用户的管理地址。

【命令】

user administrator user authorized-address { first | second | third } ip-address

user administrator user authorized-address { first | second | third } ip-address/prefix

【视图】

系统视图

【参数】

user:管理员的名称,为已存在的管理员用户。

first:管理员的第一个管理地址。

second:管理员的第二个管理地址。

third:管理员的第三个管理地址。

ip-address:IP地址。

prefix:子网掩码。

【使用指导】

可以配置三个授权地址,该用户可以通过任意一个地址登录;或者配置网段管理地址,用户可以用该网段任何一个地址登录。

【举例】

# 配置管理员管理地址。

host# configure terminal

host(config)# user administrator admin authorized-address first 192.168.1.1

1.4.7  user administrator local

user administrator local命令用来创建本地管理员用户。

no user administrator命令用来删除本地管理员用户。

【命令】

user administrator user local password authorized-table name [ disable ]

no user administrator  user

【缺省情况】

缺省情况下,已存在本地管理员账户“admin”。

【视图】

系统视图

【参数】

user:本地管理员的名称,为1~31个字符的字符串,且不能包含“%!"#$&`*+,/:;<=>?\^'{}!”。

password:本地管理员的密码,为6~63个字符的字符串,可以包含“!@#$%&`-.”。

name:权限表的名称。可选择:admin:管理员权限表;audit:审计员权限表。

disable:使该用户暂时无效。

【使用指导】

创建或者修改本地管理员用户的密码以及管理权限表,并可以通过disable选项使该用户暂时无效。

【举例】

# 配置一个test的本地管理员。

host# configure terminal

host(config)# user administrator test local test1! Authorized-table audit

1.4.8  user administrator ldap

user administrator ldap命令用来创建ldap管理员用户。

no user administrator 命令用来删除ldap管理员用户。

【命令】

user administrator user ldap server authorized-table name [ disable ]

no user administrator name

【视图】

系统视图

【参数】

user:ldap管理员的名称,为1~31个字符的字符串,且不能包含“%!"#$&`*+,/:;<=>?\^'{}!”。

server:ldap服务器的名称。

name:权限表的名称。可选择:admin:管理员权限表;audit:审计员权限表。

disable:使该用户暂时无效。

【使用指导】

server为已存在的ldap服务器名称。

【举例】

# 创建一个ldap管理员用户。

host# configure terminal

host(config)# ldap ldap1

host(config)#user administrator aa ldap ldap1 authorized-table audit

【相关命令】

·     ldap name

·     ldap ip-address [ port ]

1.4.9  user administrator radius

user administrator radius命令用来创建radius管理员用户。

no user administrator命令用来删除radius管理员用户。

【命令】

user administrator user radius server authorized-table name [ disable ]

no user administrator user

【视图】

系统视图

【参数】

user:radius管理员的名称,为1~31个字符的字符串,且不能包含“%!"#$&`*+,/:;<=>?\^'{}!”。

server:radius服务器的名称。

name:权限表的名称。可选择:admin:管理员权限表;audit:审计员权限表。

disable:使该用户暂时无效。

【使用指导】

server为已存在的radius server或者radius组。

【举例】

# 创建一个test_radius的用户。

host# configure terminal

host(config)#radius-server test_radius 1.1.1.1 aaa

host(config)#user administrator user_radius radius test_radius authorized-table audit

【相关命令】

·     radius-server name ip-address secret [ port ]

·     radius-server name group group-name

 

1.4.10  admin auth usbkey

admin auth usbkey命令用来启用管理员双因子认证。

no admin auth usbkey命令用来禁用管理员双因子认证。

【命令】

admin auth usbkey

【视图】

系统视图

【参数】

usbkey:启用管理员usbkey认证方式。

【使用指导】

启用管理员双因子认证后,需要有usbkey设备才能打开设备WEB登录界面。

【举例】

# 启用管理员双因子认证。

host# system-view

host(config)# admin auth usbkey

 

1.4.11  admin auth block

admin auth block命令用来配置管理员登录失败阻断时间。

no admin auth block命令用来恢复管理员登录失败阻断时间为默认设置。

【命令】

admin auth block time

【视图】

系统视图

【参数】

time:时间为1-3600s,默认为60s。

【使用指导】

配置管理员登录失败阻断时间后,管理员密码连续输错的情况下会被禁止登录,在指定的阻断时间范围内不能再次登录设备。

【举例】

# 配置管理员登录失败阻断时间为300s。

host# system-view

host(config)# admin auth block 300

 

1.4.12  admin auth retry

admin auth retry命令用来配置管理员登录失败重试次数。

no admin auth retry命令用来恢复管理员登录失败重试次数为默认设置。

【命令】

admin auth retry times

【视图】

系统视图

【参数】

times:次数范围为1-5次,默认为5次。

【使用指导】

配置管理员登录失败重试次数后,管理员登录连续失败指定次数,会被禁止登录设备,直到阻断时间超时。

【举例】

# 配置管理员登录失败重试次数为3。

host# system-view

host(config)# admin auth retry 3

 

1.4.13  http port

http port 命令用来修改设备http管理端口。

【命令】

http port {default|<1024-65534>

【视图】

系统视图

【参数】

default:恢复http管理端口为默认端口80。

<1024-65534>:修改http管理端口为指定端口,范围为1024-65534。

 

【使用指导】

http管理端口被修改后,需要使用新端口来访问。

【举例】

# 修改设备http管理端口为8080。

host# system-view

host(config)# http port 8080

 

1.4.14  https port

https port 命令用来修改设备http管理端口。

【命令】

https port {default|<1024-65534>

【视图】

系统视图

【参数】

default:恢复https管理端口为默认端口443。

<1024-65534>:修改https管理端口为指定端口,范围为1024-65534。

 

【使用指导】

https管理端口被修改后,需要使用新端口来访问。

【举例】

# 修改设备https管理端口为4443。

host# system-view

host(config)# http port 4443

 

1.4.15  ssh port

ssh port 命令用来修改设备ssh管理端口。

【命令】

ssh port {default|<1024-65534>

【视图】

系统视图

【参数】

default:恢复ssh管理端口为默认端口22。

<1024-65534>:修改ssh管理端口为指定端口,范围为1024-65534。

 

【使用指导】

ssh管理端口被修改后,需要使用新端口来访问。

【举例】

# 修改设备ssh管理端口为8022。

host# system-view

host(config)# ssh port 8022

 

1.4.16  telnet port

telnet port 命令用来修改设备telnet管理端口。

【命令】

telnet port {default|<1024-65534>

【视图】

系统视图

【参数】

default:恢复telnet管理端口为默认端口23。

<1024-65534>:修改telnet管理端口为指定端口,范围为1024-65534。

 

【使用指导】

telnet管理端口被修改后,需要使用新端口来访问。

【举例】

# 修改设备telnet管理端口为8023。

host# system-view

host(config)# telnet port 8023

 

1.4.17  who

who命令用来查看设备在线管理员信息。

【命令】

who

【视图】

enable视图

【参数】

【使用指导】

Who查看所有方式登录设备的在线管理员信息,包含web、telnet、ssh、console

【举例】

# 查看设备当前在线管理员详情。

host # who

Login style      Username      Author    IP                  Login time

Console          admin         R&W       *                   2017-11-08 20:20:47

SSH              admin         R&W       192.168.2.50        2017-11-08 20:38:51

Telnet           admin         R&W       192.168.2.50        2017-11-08 20:39:06

GUI              admin         R&W       192.168.2.50        2017-11-08 20:06:57

【相关命令】

清除一个在线管理员

host # who

host # clear user admin address 192.168.2.50 time 2017-11-08 20:06:57

 

1.5  常用系统管理命令

1.5.1  clear user

clear user命令用来清除已登录的用户。

【命令】

clear user name address ip-address time time

【视图】

用户视图

【参数】

name:登录用户的用户名。

ip-address:登录用户的IP地址。

time:登录用户的登录时间。

【使用指导】

time格式需要和who命令显示的格式一致。

【举例】

# 清除admin用户。

host(config)# clear user admin address 192.168.1.105 time  2014-07-4 19:34:46

1.5.2  ping

ping命令用来诊断设备的网络情况。

【命令】

ping -c request-times -s packet -i interval-time -t ttl -I { ip-address | domain-name }

【视图】

用户视图

【参数】

request-times:ping请求的ICMP报文个数。取值范围为1~10000次,默认为5个。

packet:ICMP报文大小。取值范围为0~65507字节,默认为64字节。

interval-time:请求的时间间隔。取值范围为0~10秒,默认为1秒。

ttl:ICMP报文的TTL时间。取值范围为1~255秒。

ip-address:ping请求的地址。

doman-name:ping请求的域名。

【使用指导】

ping域名时,需要配置DNS,具体请参考DNS配置。

【举例】

# ping百度。

host# ping www.baidu.com

PING 61.135.169.105 (61.135.169.105) 56(84) bytes of data.

      seq       ttl     time(ms)

        1        47     73.194

        2        47     70.368

        3        47     61.334

        4        47     69.463

        5        47     70.177

 

--- 61.135.169.105 ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 4001ms

rtt min/avg/max/mdev = 61.334/68.907/73.194/3.998 ms

1.5.3  ping6

ping6命令用来诊断设备的网络情况。

【命令】

ping6 -c request-times -s packet -i interval-time -t ttl -I ipv6-address

【视图】

用户视图

【参数】

request-times:ping请求的ICMP报文个数。取值范围为1~10000次,默认为5个。

packet:ICMP报文大小。取值范围为0~65507字节,默认为64字节。

interval-time:请求的时间间隔。取值范围为0~10秒,默认为1秒。

ttl:ICMP报文的TTL时间。取值范围为1~255秒。

ipv6-address:ping6请求的地址。

【举例】

# ping6 2003:2003::1。

host# ping6 2003:2003::1

PING 2003:2003::1(2003:2003::1) 56 data bytes

      seq       ttl     time(ms)

        1        64     0.145

        2        64     0.119

        3        64     0.118

        4        64     0.119

        5        64     0.112

 

--- 2003:2003::1 ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 4002ms

rtt min/avg/max/mdev = 0.112/0.122/0.145/0.016 ms

1.5.4  display version

display version命令用来显示系统的版本信息。

【命令】

display version

【视图】

用户视图

【举例】

# 查看系统版本信息。

host# display version

Unkown, Build time is Jun 30 2014 16:25:16

System uptime: 3 days 21 hours 23 minutes

Firmware is saplingos-0630.bin

 

Application signature version: 20140620

Url category version: 20140422

IPS signature version: 20140620

Virus Productoon version: 20140422

 

Serial          : 020100000114040228802760

Product         : Unknown

Model           : Unknown

Platform        : Unknown

 

Basic Functionality                             : License valid  

Application Audit and Control                   : License valid  

URL Category                                    : License valid  

Malware URL Category                            : License valid  

Virtual Private Network                         : License valid  

Intrusion Prevention System                     : License valid  

Virus Protection                                : License valid  

Application Audit and Control Update Service    : License valid  

URL Category Update Service                     : License valid  

Malware URL Category Update Service             : License valid  

Intrusion Prevention System Update Service      : License valid  

Virus Protection Update Service                 : License valid

1.5.5  tcpsyn

tcpsyn命令用来进行TCP SYN报文的诊断。

【命令】

tcpsyn -c request-times<1-1000> ip-address port<0-65535>

【视图】

用户视图

【参数】

request-times:TCP SYN报文请求次数。取值范围为1~1000次,默认为4次。

ip-address:TCP SYN报文的目的IP地址。

port:TCP SYN报文的目的端口号。

【举例】

# 向192.168.1.1发送TCP SYN报文。

host# tcpsyn -c 5 192.168.1.1 80

tcpsyn to 192.168.1.1:80

 1  TCP ACK from 192.168.1.1:80

 2  TCP ACK from 192.168.1.1:80

 3  TCP ACK from 192.168.1.1:80

 4  TCP ACK from 192.168.1.1:80

 5  TCP ACK from 192.168.1.1:80

1.5.6  traceroute

traceroute命令用来进行路由诊断。

【命令】

traceroute -s { ip-address | domain-name }

【视图】

用户视图

【参数】

ip-address:需要通过命令进行路由诊断的IP地址。

domain-name:需要通过命令进行路由诊断的域名。

【举例】

# traceroute百度。

host# traceroute www.baidu.com

traceroute to 61.135.169.125 (61.135.169.125), 30 hops max, 46 byte packets

 1  192.168.2.1 (192.168.2.1)  1.222 ms  4.836 ms  4.839 ms

 2  124.202.226.33 (124.202.226.33)  5.338 ms  2.688 ms  1.880 ms

 3  10.255.26.225 (10.255.26.225)  5.663 ms  4.703 ms  3.477 ms

 4  124.205.98.205 (124.205.98.205)  6.172 ms  4.949 ms  5.018 ms

 5  124.205.98.217 (124.205.98.217)  5.004 ms  3.391 ms  4.993 ms

 6  202.99.1.138 (202.99.1.138)  5.051 ms  6.706 ms  *

 7  10.15.253.229 (10.15.253.229)  5.576 ms  5.798 ms  7.121 ms

 8  *  *  *

 9  113.57.231.1 (113.57.231.1)  24.559 ms  *  25.419 ms

10  58.19.113.250 (58.19.113.250)  30.435 ms  25.320 ms  25.433 ms

11  210.5.142.234 (210.5.142.234)  71.182 ms  71.219 ms  70.708 ms

12  210.5.142.237 (210.5.142.237)  26.776 ms  25.325 ms  30.491 ms

13  58.19.112.17 (58.19.112.17)  71.150 ms  71.126 ms  71.331 ms

14  219.158.22.49 (219.158.22.49)  71.217 ms  71.235 ms  71.272 ms

15  123.126.0.90 (123.126.0.90)  71.070 ms  71.113 ms  72.854 ms

16  202.106.227.34 (202.106.227.34)  81.300 ms  76.106 ms  76.209 ms

17  *  *  *

18  *  *  *

19  *  *  *

20  *  *  *

21  *  *  *

22  *  *  *

23  123.125.248.98 (123.125.248.98)  70.982 ms !A  *  *

24  *  *  *

25  *  *  *

26  *  *  *

27  *  *  *

28  *  *  *

29  *  *  *

30  *  *  *

1.5.7  who

who命令用来查看当前有多少用户登录了设备。

【命令】

who

【视图】

用户视图

【使用指导】

当需要查看有多少用户、什么时间、登录IP、什么方式登录设备时,请执行此命令。

【举例】

# 查看当前登录用户。

host# who

Login style      Username      IP                  Login time

SSH              admin         192.168.1.105       2014-07-04 12:25:13

GUI              admin         192.168.1.105       2014-07-04 09:38:56

表1-1 当前登录用户信息描述表

字段

描述

Login style

登录方式

Usernae

登录用户名

Ip

登录用户的IP地址

Login time

登录的时间

 


2 多配置管理命令

2.1  copy命令

2.1.1  copy running FileName

copy running FileName命令用来将当前运行配置文件保存为配置文件。

【命令】

copy running FileName

【缺省情况】

无。

【视图】

全局视图

【使用指导】

将当前运行配置文件保存为配置文件时,需要使用该功能。

【举例】

# 将当前运行配置保存为配置文件test.cfg。

H3C# copy running-config test.cfg     

H3C#

【相关命令】

·     display config-list

·     delete config-file FileName

2.1.2  copy startup-config FileName

copy startup-config FileName命令用来将当前主启动配置文件保存为配置文件。

【命令】

copy startup-config FileName

【缺省情况】

无。

【视图】

全局视图

【使用指导】

将当前主启动配置文件保存为配置文件时,需要使用该功能。

【举例】

# 将当前主启动配置文件保存为配置文件test.cfg。

H3C# copy startup-config test.cfg     

H3C#

【相关命令】

·     display config-list

·     delete config-file FileName

2.1.3  copy FileName startup-config

copy FileName startup-config命令用来将当前主启动配置文件切换为配置文件的配置。

【命令】

copy startup-config FileName

【缺省情况】

无。

【视图】

全局视图

【使用指导】

将当前主启动配置文件切换为配置文件的配置时,需要使用该功能。

【举例】

# 将当前主启动配置文件保存为配置文件test.cfg。

H3C# copy test.cfg startup-config    

H3C#

【相关命令】

·     display config-list

·     delete config-file FileName

·     display startup

2.1.4  copy config LocalFile ftp/tftp

copy config LocalFile ftp [USERNAME PASSWD]  A.B.C.D RemoteFile命令用来将配置文件导出到FTP服务器。

copy config LocalFile tftp   A.B.C.D RemoteFile命令用来将配置文件导出到TFTP服务器。

【命令】

copy config LocalFile ftp [USERNAME PASSWD]  A.B.C.D RemoteFile

copy config LocalFile tftp   A.B.C.D RemoteFile

【缺省情况】

无。

【视图】

全局视图

【参数】

LocalFile:设备保存的配置文件名称。

USERNAMEFTP服务器的用户名,可配置项,若未输入则为匿名用户。

PASSWD:FTP服务器的用户名所对应的密码。

A.B.C.D:FTP/TFTP服务器的IP地址。

RemoteFile保存到FTP/TFTP文件的名称。

 

【使用指导】

将当前配置文件导出到FTP/TFTP服务器时,需要使用该功能。

【举例】

# 将当配置文件test.cfg导出到192.168.2.123的FTP服务器,保存文件名称为test-ftp.cfg。

H3C# copy config test.cfg ftp 192.168.2.123 test-ftp.cfg 

H3C#

【相关命令】

·     display config-list

·     copy ftp/tftp

2.1.5  copy ftp/tftp

copy ftp [USERNAME PASSWD]  A.B.C.D RemoteFile  config  LocalFile命令用来将FTP服务器上的配置文件导入到ACG设备。

copy tftp   A.B.C.D RemoteFile  config  LocalFile命令用来将TFTP服务器上的配置文件导入到ACG设备。

【命令】

copy ftp [USERNAME PASSWD]  A.B.C.D RemoteFile  config  LocalFile

copy tftp   A.B.C.D RemoteFile  config  LocalFile

【缺省情况】

无。

【视图】

全局视图

【参数】

LocalFile:保存到ACG设备的配置文件名称。

USERNAMEFTP服务器的用户名,可配置项,若未输入则为匿名用户。

PASSWD:FTP服务器的用户名所对应的密码。

A.B.C.D:FTP/TFTP服务器的IP地址。

RemoteFile要导入的FTP/TFTP的文件名称。

 

【使用指导】

将FTP/TFTP服务器上的配置文件导入到ACG设备时,需要使用该功能。

【举例】

# 从ftp服务器导入配置文件test.cfg到ACG设备,保存文件名称为test-ftp.cfg。

H3C# copy ftp 192.168.2.123 test1.cfg config test-ftp.cfg

Download file test1.cfg ....

 

The configuration file successfully upgraded, reboot to take effect.

H3C#  

【相关命令】

·     display config-list

·     copy config LocalFile ftp/tftp

2.2  compare命令

2.2.1  compare running-config startup-config

compare running startup-config命令用来对比当前运行配置与主启动配置文件配置信息。

【命令】

compare running startup-config

【缺省情况】

无。

【视图】

全局视图

【使用指导】

当前运行配置和主启动配置文件配置信息对比时,需要使用该功能。

【举例】

# 对比当前运行配置与主启动配置文件配置信息。

H3C# compare running-config startup-config

--- running-config_1527272823

+++ startup-config_1527272823

@@ -128,7 +128,6 @@

 !

 !

 ip route 0.0.0.0/0 192.168.2.1

-ip route 192.168.0.250/32 192.168.2.1

 !

 !user-param

 !

H3C#   

【相关命令】

·     compare running LocalFile

2.2.2  compare running-config LocalFile

compare running LocalFile命令用来对比当前运行配置与主启动配置文件配置信息。

【命令】

compare running LocalFile

【缺省情况】

无。

【视图】

全局视图

【使用指导】

当前运行配置和配置文件配置信息对比时,需要使用该功能。

【举例】

# 对比当前运行配置与配置文件test1.cfg。

H3C# compare running-config test1.cfg

--- running-config_2037031920

+++ test1.cfg_2037031920

@@ -128,7 +128,6 @@

 !

 !

 ip route 0.0.0.0/0 192.168.2.1

-ip route 192.168.0.250/32 192.168.2.1

 !

 !user-param

 !

H3C#   

【相关命令】

·     display config-list

·     compare running startup-config

2.3  delete命令

2.3.1  delete config-file FileName

delete config-file FileName命令用来删除配置文件。

【命令】

delete config-file FileName

【缺省情况】

无。

【视图】

全局视图

【使用指导】

删除配置文件时,需要使用该功能。

【举例】

# 删除配置文件test1.cfg。

H3C# delete config-file test1.cfg

Delete the configuration file:test1.cfg, are you sure? y/[n]: y

H3C#

【相关命令】

·     display config-list

2.4  display命令

2.4.1  display config-list

display config-list 命令用来显示设备当前保存的配置文件。

【命令】

display config-list

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看设备当前保存的配置文件时,需要使用该功能。

【举例】

# 查看设备当前保存的配置文件。

H3C# display config-list

-----------------------------------------------------------------

Index          Size(Byte)         Date Time       FileName     

-----------------------------------------------------------------

1                    3642   2017-11-09 18:26:01   test-ftp.cfg 

2                    3681   2017-11-09 16:37:00   test.cfg      

3                    3642   2017-11-09 13:48:18   test1-ftp.cfg

4                    3642   2017-11-09 13:47:31   test1-tftp.cfg

5                    3642   2017-11-09 13:35:47   test2.cfg    

 

CF card 3343516 KB free (Configuration file 204782 KB free)

 

【相关命令】

·     display config-file LocalFile

2.4.2  display config-file LocalFile

display config-file LocalFile 命令用来查看配置文件信息。

【命令】

display config-file LocalFile

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看配置文件信息时,需要使用该功能。

【举例】

# 查看配置文件test2.cfg的配置信息。

H3C# display config-file test2.cfg

 

# test2.cfg the last modification time: 2017-11-09 13:35:47

 

!config

switch keep-order off

authorized-table admin

    description Default authority table with all authority enable

    authorized read all

    authorized write all

!

authorized-table audit

    description Default authority table used for audit administrator

    authorized read all

!

user administrator anonym local secret Hg6MAD7MGTUEcoT9gHG+LhDc6E07QwG71SmiEodL/fQT/YirzsAURqDjk69469y authorized-table admin 

user administrator anonym authorized-address first 0.0.0.0/0

user administrator admin local secret Hg6MAD7MGTUEcoT9gHG+LhDc6E07QwG71SmiEodL/fQT/YirzsAURqDjk69469y authorized-table admin 

user administrator admin authorized-address first 0.0.0.0/0

radius nas-port-type ethernet

!

app-ident mode smart

timezone 57

!

wxfj-place 8

wxfj switch disable

guish autosave

guish timeout 480

!

pki ca crl update-period 30

!

!

ipv6 enable

!

!

application bypass threshold 90

application session change user enable

application terminal identify enable

--More--

 

H3C#

【相关命令】

·     display config-list

2.4.3  display startup

display startup 命令用来查看当前设备启动使用的配置文件的名称。

【命令】

display startup

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看当前设备启动使用的配置文件名称时,需要使用该功能。

【举例】

# 查看配置文件test2.cfg的配置信息。

H3C# display startup

Current startup configuration file:     test1.cfg

Next startup configuration file:        test1.cfg

 

H3C#

【相关命令】

·     display config-list

2.4.4  display capacity

display capacity  命令用来查看当前设备各功能模块的规格。

【命令】

display capacity

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看当前设备某个功能模块真实的规格时,需要使用该功能。

【举例】

# 查看当前设备支持的子接口规格。

H3C:WD-D# display capacity

================================================================================

Product: PRODUCT_UAC Model: ACG1000-E Platform: PLATFORM_MC5600

--------------------------------------------------------------------------------

Capacity Name                    Capacity Value                 

--------------------------------------------------------------------------------

SESSION                          4000000                         

ARP                              8192                            

FDB                              16384                           

DHCP_SERVER                      1024                            

VLAN                             4094                            

SUB_INTERFACE                    12287

 

【相关命令】

·     display capacity

2.4.5  display cpu usage

display cpu usage 命令用来查看当前设备CPU使用率。

【命令】

display cpu usage

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看当前设备最近15分钟内的各个核的CPU使用率情况以及平均使用率情况时,需要使用该功能。

【举例】

# 查看当前设备CPU使用率。

H3C:WD-D# display cpu usage

----------------------------------------------------

Name       Current    1Min       5Min       15Min    

----------------------------------------------------

Average    12         2          2          3        

CPU0       100        17         23         24       

CPU1       1          0          0          0        

CPU2       1          0          0          0        

CPU3       0          0          0          0        

CPU4       0          0          0          0        

CPU5       0          0          0          0        

CPU6       0          0          0          0        

CPU7       0          0          0          0   

【相关命令】

·     display cpu usage detail 查看最近每秒CPU的使用情况。

2.4.6  display user-wechat white-list

display user-wechat white-list    命令用来查看当前设备微信认证方式的服务器白名单配置。

【命令】

display user-wechat white-list

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看当前设备微信认证方式的服务器白名单配置,需要使用该功能。服务器白名单中的配置用户在认证之前可以直接访问,且该配置仅对微信认证生效,对其他方式以及混合认证中的微信认证均不生效。

【举例】

# 查看当前设备微信服务器白名单配置。

H3C:WD-D# display user-wechat white-list

Total number:1

-----------------------------------------------

type                 ip address           mask

-----------------------------------------------

subnet               192.168.2.0           24    

【相关命令】

·     display user-wechat white-list

 

2.4.7  display url-whitelist all

display url-whitelist all 命令用来查看当前设备URL白名单配置。

【命令】

display url-whitelist all

【缺省情况】

无。

【视图】

全局视图

【使用指导】

查看当前设备URL白名单配置时,需要使用该功能。

【举例】

# 查看当前设备URL白名单配置。

H3C:WD-D# display url-whitelist all

url 0: www.jd.com

url 1: www.taobao.com

【相关命令】

·     display url-whitelist all

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们