- 经验
 - 121 
 - 分贝
 - 0 
 - 家园分
 - 452 
 - 在线时间:
 - 68 小时
 - 最后登录:
 - 2020-4-30
 - 帖子:
 - 62
 - 精华:
 - 0
 - 注册时间:
 - 2009-10-26
 - UID:
 - 450957
  
 
 
 
注册:2009-10-26 
 | 
6.2 配置文件管理 
6.2.1 配置文件内容及格式 
配置文件为一文本文件,其格式如下: 
 
l         以命令格式保存。 
 
l         为了节省空间,只保存非缺省的常数。 
 
l         命令的组织以命令模式为基本框架,同一命令模式的命令组织在一起,形成一节,节与节之间通常用空行或注释行隔开(以#开始的为注释行)。 
 
l         以end为结束。 
 
6.2.2 显示当前配置和起始配置 
S2000B系列以太网交换机上电时,从Flash Memory(闪速存储器)中读取配置文件进行以太网交换机的初始化工作,因此将Flash Memory中的配置文件称为起始配置。如果Flash Memory中没有配置文件,以太网交换机则使用缺省参数进行初始化。与起始配置相对应,S2000B系列运行过程中正在生效的配置称为当前配置。 
 
在所有视图下执行display命令可以显示当前配置和起始配置的相关信息。 
 
                                                                                                                表6-5 显示S2000B系列配置 
 
操作 
命令 
 
显示起始配置 
display saved-configuration 
 
显示当前配置 
display current-configuration 
 
 
 
 
需要注意的是,如果以太网交换机上电之后工作不正常,可以执行display saved-configuration命令查看交换机的启动配置,以定位问题所在。 
 
当用户完成一组配置后,需要验证配置是否正确时,可以执行display current-configuration命令来查看当前生效的参数。对于某些参数,虽然用户已经配置,但如果这些参数所在的功能没有生效,则不予显示。对于某些正在生效的配置参数,如果与缺省工作参数相同,也不显示。 
 
& 说明: 
 
配置文件的显示格式与保存格式相同。 
 
 
 
例:显示Flash Memory中以太网交换机的配置文件。 
 
<Quidway> display saved-configuration 
 
# 
 
sysname Quidway 
 
# 
 
hgmp enable 
 
# 
 
qos 10 
 
# 
 
user-interface aux 
 
speed 9600 
 
# 
 
vlan 1 
 
# 
 
vlan 2047 
 
# 
 
interface Ethernet0/1 
 
duplex full 
 
speed 10 
 
undo priority 
 
# 
 
interface Ethernet0/2 
 
undo priority 
 
# 
 
interface Ethernet0/3 
 
undo priority 
 
# 
 
---- More ---- 
 
例:显示以太网交换机当前生效的配置参数。 
 
<Quidway> display current-configuration 
 
# 
 
sysname Quidway 
 
# 
 
hgmp enable 
 
# 
 
qos 10 
 
# 
 
user-interface aux 
 
speed 9600 
 
# 
 
vlan 1 
 
# 
 
vlan 2047 
 
# 
 
interface Ethernet0/1 
 
duplex full 
 
speed 10 
 
undo priority 
 
# 
 
interface Ethernet0/2 
 
undo priority 
 
# 
 
interface Ethernet0/3 
 
undo priority 
 
# 
 
---- More ---- 
 
6.2.3 修改和保存当前配置 
为了使当前配置能够做为S2000B系列以太网交换机下次上电启动时的起始配置,需要使用以下命令保存当前配置到Flash Memory中。 
 
请在用户视图下进行下列配置。 
 
                                                                                                                        表6-6 保存当前配置 
 
操作 
命令 
 
保存当前配置 
save 
 
 
 
 
当完成一组配置并且已经达到预定功能时,建议用户将当前配置文件保存到Flash Memory中。 
 
例:保存当前配置文件到Flash Memory中。 
 
<Quidway> save 
 
This will save the configuration in the flash memory. 
 
The switch configurations will be written to flash. 
 
Are you sure?[Y/N]y 
 
Now saving current configuration to flash memory. 
 
Please wait for a while... 
 
 
 
Save current configuration to flash memory successfully. 
 
6.2.4 擦除Flash Memory中配置文件 
使用以下命令可以擦除S2000B系列以太网交换机Flash Memory中的配置文件。 
 
通常情况下S2000B系列以太网交换机的配置信息是由HGMP Server端进行设置。如果配置文件被擦除后没有取得HGMP Server端的配置信息,则S2000B系列下次上电启动时,将采用缺省的配置参数进行初始化。 
 
请在用户视图下进行下列配置。 
 
                                                                                                          表6-7 擦除Flash Memory中配置文件 
 
操作 
命令 
 
擦除Flash Memory中配置文件 
reset saved-configuration 
 
 
 
 
请慎重执行该命令,最好在技术支持人员指导下使用。 
 
一般在以下几种情况使用: 
 
l         以太网交换机软件升级之后,Flash Memory中配置文件可能与新版本软件不匹配,这时可以用reset saved-configuration命令擦除旧的配置文件。 
 
l         将一台已经使用过的以太网交换机用于新的应用环境,原有的配置文件不能适应新环境的需求,需要对以太网交换机重新配置,这时可以擦除原配置文件后,恢复出厂配置重新配置。 
 
l         当Flash Memory中的配置文件遭到破坏,如加载了错误的配置文件。 
 
例:擦除Flash Memory中以太网交换机配置文件。 
 
<Quidway> reset saved-configuration 
 
This will erase the configuration in the flash memory. 
 
The switch configurations will be erased to reconfigure. 
 
Are you sure?[Y/N] y(进行确认) 
 
Now erasing the configuration in flash memory. 
 
Please wait for a while... 
 
Erase the configuration in flash memory successfully 
 
6.3 设备管理 
S2000B系列以太网交换机提供设备管理功能,包括:显示系统信息、显示当前版本及重新启动以太网交换机。 
 
6.3.1 显示系统信息 
当以太网交换机出现故障时,可以使用以下命令一次性地、尽可能全地收集当前设备的运行信息,以便迅速定位问题、解决问题。所收集的信息包括:版本信息、以太网端口信息、VLAN相关信息、当前配置信息、起始配置信息和MAC地址表信息等。此外,系统内存的使用情况也会清晰的显示出来(包括已经分配的内存和空闲的内存空间大小)。 
 
请在所有视图下进行下列操作。 
 
                                                                                                                        表6-8 显示系统信息 
 
操作 
命令 
 
显示系统信息 
display diagnostic-information 
 
 
 
 
例:显示系统信息(因显示的内容很多,本例只截取了部分内容)。 
 
<Quidway> display diagnostic-information 
 
---------------display version--------------- 
 
Huawei Versatile Routing Platform Software 
 
VRP (R) Software, Version 0.88, RELEASE 0006 
 
Copyright (c) 2002-2003 HUAWEI TECH CO., LTD. 
 
 
 
Quidway S2016B with ARM7 Processor 
 
16M   bytes SDRAM 
 
1024K bytes Flash Memory 
 
Config Register points to FLASH 
 
 
 
Hardware Version is REV.0 
 
Bootrom Version is 101 
 
[Subslot 0] 17 100BASET Hardware Version is REV.0 
 
 
 
---------------display Hgmp--------------- 
 
Hgmp task is active 
 
Switch not be registered 
 
 
 
---------------display interface--------------- 
 
Ethernet0/1 is down 
 
Hardware is Fast Ethernet, Hardware address is 00e0-fc00-0010 
 
Full-duplex 10M 100_BASE_TX 
 
Flow control is disable 
 
The port belongs to these vlans: 
 
  Vlan 1 
 
It is a monitor observe port 
 
It doesn't belong to a port-aggregation 
 
0 packets output 
 
  0 bytes, 0 multicasts, 0 broadcasts, 0 pauses 
 
0 packets input 
 
  0 bytes, 0 multicasts, 0 broadcasts, 0 pauses 
 
0 CRC errors 
 
0 oversize frames 
 
6.3.2 显示系统版本 
不同版本的软件提供不同的功能,可以使用以下命令查看S2000B系列以太网交换机的系统版本信息,从而知道当前软件支持的功能特性。 
 
请在所有视图下进行下列操作。 
 
                                                                                                                        表6-9 显示系统版本 
 
操作 
命令 
 
显示系统版本 
display version 
 
 
 
 
例:显示系统版本信息。 
 
<Quidway> display version 
 
Huawei Versatile Routing Platform Software 
 
VRP (R) Software, Version 0.88, RELEASE 0006 
 
Copyright (c) 2002-2003 HUAWEI TECH CO., LTD. 
 
 
 
Quidway S2016B with ARM7 Processor 
 
16M   bytes SDRAM 
 
1024K bytes Flash Memory 
 
Config Register points to FLASH 
 
 
 
Hardware Version is REV.0 
 
Bootrom Version is 101 
 
[Subslot 0] 17 100BASET Hardware Version is REV.0 
 
6.3.3 复位交换机 
当S2000B系列以太网交换机出现故障需要重新启动时,可以通过以下命令进行复位。 
 
请在用户视图下进行下列配置。 
 
                                                                                                                          表6-10 复位交换机 
 
操作 
命令 
 
复位交换机 
reboot 
 
 
 
 
例:复位交换机。 
 
<Quidway> reboot 
 
This will reboot Switch. Continue? [Y/N]y 
 
The system will reset, please waiting... 
 
6.4 设置以太网交换机域名 
可以使用以下命令修改S2000B系列以太网交换机的域名,以便更清楚的标识各设备。 
 
请在系统视图下进行下列配置。 
 
                                                                                                                表6-11 以太网交换机域名设置 
 
操作 
命令 
 
设置以太网交换机域名 
sysname sysname 
 
恢复以太网交换机域名为缺省名 
undo sysname 
 
 
 
 
命令中的参数含义如下: 
 
sysname:欲设置的域名,取值范围为1~30个字符。 
 
需要注意的是,修改以太网交换机的域名将影响命令行提示符,如以太网交换机的域名为Quidway,则用户视图下的命令行提示符为<Quidway>。 
 
缺省情况下,以太网交换机的域名为Quidway。 
 
例:设置以太网交换机的域名为QuidwayS2008B。 
 
[Quidway] sysname QuidwayS2008B 
 
[QuidwayS2008B]   
   
 |   
 
  
 |