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

H3C S5830V2[S5820V2]系列以太网交换机 典型配置举例-Release22xx系列-6W100

目录

60-信息中心典型配置举例

本章节下载 60-信息中心典型配置举例  (130.33 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S5800/S5830V2/Configure/Typical_Configuration_Example/H3C_S5830V2[S5820V2]-Release22xx-6W100/201403/819626_30005_0.htm

60-信息中心典型配置举例


1  信息中心典型配置举例

1.1  简介

本章介绍了与信息中心有关的各种典型配置举例。

1.2  配置日志信息发送到日志主机典型配置举例

1.2.1  适用产品和版本

表1 适用产品和版本

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.2.2  组网需求

图1所示,为了能集中监控设备的运行状态,现要求在设备上配置信息中心功能,将设备运行过程中产生的所有informational及以上级别的日志信息发送到日志主机。

图1 配置日志信息发送到日志主机组网图

 

1.2.3  配置步骤

# 开启信息中心功能。

<Device> system-view

[Device] info-center enable

# 配置设备发送的日志信息的级别为informational。

[Device] info-center source default loghost level informational

# 配置日志主机的IP地址。

[Device] info-center loghost 1.2.0.1

1.2.4  验证配置

# 以上配置完成后,在设备上查看信息中心的运行情况。

[Device] display info-center                                                   

Information Center: Enabled                                                    

Console: Enabled                                                               

Monitor: Enabled                                                               

Log host: Enabled                                                              

    IP address: 1.2.0.1, port number: 514, host facility: local7               

Log buffer: Enabled                                                            

    Max buffer size 1024, current buffer size 512                              

    Current messages 512, dropped messages 0, overwritten messages 156         

Log file: Enabled                                                               

Security log file: Disabled                                                    

Information timestamp format:                                                  

    Log host: Date                                                              

    Other output destination: Date                                             

1.2.5  配置文件

#

 info-center loghost 1.2.0.1

#

1.3  配置日志信息保存到日志文件典型配置举例

1.3.1  适用产品和版本

表2 适用产品和版本

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.3.2  组网需求

为了能集中监控设备的运行状态,现要求在设备上配置信息中心功能,将设备运行过程中产生的所有informational及以上级别的日志信息保存到日志文件中。

1.3.3  配置步骤

# 开启信息中心功能。

<Device> system-view

[Device] info-center enable

# 开启保存日志文件功能。

[Device] info-center logfile enable

# 配置设备发送的日志信息的级别为informational。

[Device] info-center source default logfile level informational

# 设置日志文件自动保存的频率为1小时,即3600秒。

[Device] info-center logfile frequency 3600

1.3.4  验证配置

# 以上配置完成后,在设备上查看信息中心的运行情况。

[Device] display info-center                                                   

Information Center: Enabled                                                    

Console: Enabled                                                               

Monitor: Enabled                                                               

Log host: Enabled                                                               

    IP address: 1.2.0.1, port number: 514, host facility: local7               

Log buffer: Enabled                                                            

    Max buffer size 1024, current buffer size 512                              

    Current messages 512, dropped messages 0, overwritten messages 156         

Log file: Enabled                                                              

Security log file: Disabled                                                    

Information timestamp format:                                                  

    Log host: Date                                                             

    Other output destination: Date                                             

# 显示日志文件的配置信息。

[Device] display logfile summary                                                 

  Log file: Enabled                                                            

  Log file size quota: 10 MB                                                   

  Log file directory: flash:/logfile                                           

  Writing frequency: 1 hour 0 min 0 sec

1.3.5  配置文件

#

 info-center logfile frequency 3600

#

1.4  配置安全日志保存到安全日志文件典型配置举例

1.4.1  适用产品和版本

表3 适用产品和版本

产品

软件版本

S5830V2&S5820V2系列以太网交换机

Release 2208P01,Release 2210

 

1.4.2  组网需求

图2所示,在设备运行过程中,为了能集中监控设备上发生的与安全相关的事件,现要求如下:

·     将安全日志保存到专门的安全日志文件,保存频率为每小时一次。

·     只有安全日志管理员有权限查看安全日志文件内容、或对安全日志文件进行备份。

图2 安全日志同步保存功能功能组网图

 

1.4.3  配置思路

设备系统管理员与安全日志管理员权限不同,两者的主要区别如下:

·     系统管理员对安全日志功能进行配置,但不能对安全日志文件进行读写、管理及维护。

·     安全日志管理员对对安全日志文件进行读写、管理及维护,但不能对安全日志功能进行配置。

1.4.4  配置步骤

# 开启信息中心功能。

<Device> system-view

[Device] info-center enable

# 开启安全日志功能。

[Device] info-center security-logfile enable

# 设置安全日志的自动保存频率为每小时一次,即3600秒。

[Device] info-center security-logfile frequency 3600

# 创建安全日志管理员本地用户seclog,密码为seclog123。

[Device] local-user seclog

New local user added.

[Device-luser-manage-seclog] password simple seclog123

# 授权用户可以管理安全日志文件。

[Device-luser-manage-seclog] authorization-attribute user-role security-audit

# 设置用户可以使用的登录方式为Telnet。

[Device-luser-manage-seclog] service-type telnet

[Device-luser-manage-seclog] quit

# 配置安全日志管理员的登录认证方式为scheme。

[Device] user-interface vty 0 15

[Device-ui-vty0-15] authentication-mode scheme

[Device-ui-vty0-15] quit

# 完成以上配置后,设备在运行过程中生成的与安全相关的日志将保存到安全日志文件中。

1.4.5  验证配置

# 安全日志管理员使用用户名seclog登录Device。

C:/> telnet 192.168.1.1

* ***************************************************************************** 

* Copyright (c) 2004-2013 Hangzhou H3C Tech. Co., Ltd. All rights reserved.  * 

* Without the owner's prior written consent,                                 * 

* no decompiling or reverse-engineering shall be allowed.                    * 

****************************************************************************** 

                                                                                

login: seclog

Password:

<Device>

# 查看安全日志文件的内容。

<Device> more seclog/seclog.log

%@1%Jan  1 06:49:01:885 2013 Device SHELL/6/SHELL_CMD: -Line=aux0-IPAddr=**-User

=**; Command is local-user seclog                                              

%@2%Jan  1 06:49:08:984 2013 Device SHELL/6/SHELL_CMD: -Line=aux0-IPAddr=**-User

=**; Command is password simple ******                                         

%@3%Jan  1 06:49:15:125 2013 Device SHELL/6/SHELL_CMD: -Line=aux0-IPAddr=**-User

=**; Command is authorization-attribute user-role security-audit               

%@4%Jan  1 06:49:29:023 2013 Device SHELL/6/SHELL_CMD: -Line=aux0-IPAddr=**-User

=**; Command is service-type telnet                                         

%@5%Jan  1 06:49:53:266 2013 Device SHELL/5/SHELL_LOGIN: seclog logged in from

192.168.0.5.

# 将安全日志文件备份到IP地址为192.168.1.2的FTP服务器上。

<Device> ftp 192.168.0.2                                                         

Connected to 192.168.0.2 (192.168.0.2).                                        

220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user          

User (192.168.0.2:(none)): admin                                               

331 Give me your password, please                                              

Password:                                                                      

230 Logged in successfully                                                     

Remote system type is MSDOS.                                                   

ftp> put seclog/seclog.log                                                    

227 Entering Passive Mode (192,168,0,2,9,54)                                   

150 "D:\seclog\seclog.log" file ready to receive in ASCII mode            

226 Transfer finished successfully.                                            

600 bytes sent in 0.000493 seconds (1.16 Mbyte/s)

# 使用安全日志管理员用户登录设备,显示安全日志文件配置信息。

<Device> display security-logfile summary

  Security log file: Enabled                                                   

  Security log file size quota: 10 MB                                          

  Security log file directory: flash:/seclog                                   

  Alarm threshold: 80%                                                         

  Current usage: 1%                                                            

  Writing frequency: 1 hour 0 min 0 sec

以上信息表明,安全日志文件功能已经开启,自动保存频率为每小时一次。

1.4.6  配置文件

1. 系统管理员的配置

#

user-interface vty 0 15

 authentication-mode scheme

 user-role network-operator

#

 info-center security-logfile enable

 info-center security-logfile frequency 3600

#

local-user seclog class manage

 password hash $h$6$z8UZoA2AiM1Uwon5$gZ/PGTMrUOgWZ6hsttIQ/3hFHRE3OlGBhyvJlhsFLGM

ELdFmm/rY2d51I79MAlk+8vVeNyA39ndeB73NBOPefw==

 service-type telnet

 authorization-attribute user-role security-audit

#

2. 安全日志管理员的配置

本配置举例中,安全日志管理员使用的命令行均为一次性生效的命令行,不会保存到配置文件中。

 

 

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

新华三官网
联系我们