< Home

info-center loghost

Function

The info-center loghost command configures the device to output information to a log host.

The undo info-center loghost command disables the device from outputting information to a log host.

By default, no information is output to the log host.

Format

info-center loghost ip-address [ channel { channel-number | channel-name } | facility local-number | language language-name | { vpn-instance vpn-instance-name | public-net } | local-time | log-counter { disable | enable } | port port | security-log | operation-log | { source-ip source-ip-address } | transport { udp | tcp ssl-policy policy-name } ] *

info-center loghost ipv6 ipv6-address [ channel { channel-number | channel-name } | facility local-number | language language-name | local-time | log-counter { disable | enable } | port port | security-log | operation-log | transport { udp | tcp ssl-policy policy-name } ] *

undo info-center loghost ip-address [ vpn-instance vpn-instance-name ]

undo info-center loghost ipv6 ipv6-address

info-center loghost domain domain-name [ vpn-instance vpn-instance-name ] [ channel { channel-number | channel-name } | facility local-number | language language-name | log-counter { disable | enable } | local-time | port port | security-log | operation-log | transport { udp | tcp ssl-policy policy-name } ] *

undo info-center loghost domain domain-name [ vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value

ip-address

Specifies the IPv4 address of the log host.

The value is in dotted decimal notation.

channel { channel-number | channel-name }

Specifies the channel used to send information to a log host.

  • channel-number: specifies the number of a channel.
  • channel-name: specifies the name of a channel. The name can be the default or user-defined channel name.

The value of channel-number is an integer that ranges from 0 to 9.

The value of channel-name is a string of 1 to 30 case-insensitive characters. The value consists of letters or numbers and must start with a letter.

facility local-number

Specifies a syslog server facility that is used to identify the log information source. You can use this parameter to plan a local value for the log information of a specified device, so that the syslog server can handle received log information based on the parameter.

The value ranges from local0 to local7. The default value is local7.

language language-name

Displays the language in which logs are recorded.

Currently, the value can only be English.

vpn-instance vpn-instance-name

VPN instance.

The value must be an existing VPN instance name.

public-net

Indicates that the log host is connected in the public network.

-

local-time

Indicates the local time when logs are sent to the log host.

-

log-counter { disable | enable }

Disables or enables the log counter function.

-

port port

Specifies the port number of a log host.

The value is an integer that ranges from 1 to 65535

security-log

Configures a device to send security logs to a specified log host.

-

operation-log

Configures a device to send operation logs to a specified log host.

-

source-ip source-ip-address

Specifies the source IP address used to send information to the log host.

The value is in dotted decimal notation.

transport

Indicates the information transport mode.

-

udp

Indicates the UDP transport mode.

NOTE:

The default transport mode is UDP if no transport mode is specified.

-

tcp

Indicates the TCP transport mode.

NOTE:

The default transport mode is UDP if no transport mode is specified.

-

ssl-policy policy-name

Specifies a Secure Sockets Layer (SSL) policy in the TCP transport mode.

This parameter is recommended to improve log transmission security.

The value is a string of 1 to 23 case-insensitive characters without spaces.

ipv6 ipv6-address

Specifies the IPv6 address of the log host.

The value is a 32-digit hexadecimal number.

domain domain-name

Specifies a DNS domain name of a log host.

The value is a string of 1 to 255 case-sensitive characters, spaces not supported.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To query information generated on the Switch deployed remotely, configure the Switch to export information to a log host so that you can view device information on the log host. Run the info-center loghost command to configure the Switch to export information to a log host.

To configure the Switch to output information to different log hosts using different channels, specify the channels used to send information to the log hosts. For example, you can configure the Switch to output information to log hosts at 192.168.0.1 and 192.168.0.2 using channels 7 and 8 respectively.

Precautions

The Switch can output information to eight log hosts including IPv4 and IPv6 hosts to implement backup among log hosts.

To transfer logs to the log hosts using TCP and encrypt logs using SSL, create an SSL policy first.

If the set net-manager vpn-instance command is run to configure the NMS to manage network elements through a VPN instance, either of the following situations occurs.
  • If vpn-instance is configured, the system accesses the log host in the VPN instance.

  • If public-net is configured, the system accesses the log host on the public network.

If the transport tcp ssl-policy policy-name parameters are specified to enable logs to be transmitted in TCP mode through SSL encryption, perform the following operations:
  • Run the ssl-policy policy-name command to configure an SSL policy and enter the SSL policy view.
  • Run the trusted-ca load command to load trusted-CA files (cacert and rootcert files) of the SSL client.
  • On the log server, load trusted-CA files (serverkey and servercert files) of the SSL server.
  • Run the display tcp status command to check that the TCP connection status of port 6514 is Established.

Example

# Configure a device to use channel 6 to output information to the log host at 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] info-center loghost 10.1.1.1 channel channel6 

# Configure the source IP address used to send information to the log host is Loopback1.

<HUAWEI> system-view
[HUAWEI] info-center  loghost source LoopBack1

# Configure the Switch to send information to the log host at FC00:0:0:3001::1/64.

<HUAWEI> system-view
[HUAWEI] info-center loghost ipv6 fc00:0:0:3001::1

# Configure the Switch to send information to the host with the IPv4 address 192.168.2.2 and VPN instance name vpn1.

<HUAWEI> system-view
[HUAWEI] info-center loghost 192.168.2.2 vpn-instance vpn1
# Configure a device to send information to a log host with the domain name set to www.test.com.
<HUAWEI> system-view
[HUAWEI] info-center loghost domain www.test.com
# Configure a device to send information to the log host at 192.168.2.2 in TCP mode, using the SSL policy huawei123 that has been created in the system.
<HUAWEI> system-view
[HUAWEI] ssl policy huawei123
[HUAWEI-ssl-policy-ftps_der] trusted-ca load pem-ca 1_cacert_pem_rsa.pem
[HUAWEI-ssl-policy-ftps_der] trusted-ca load pem-ca 1_rootcert_pem_rsa.pem
[HUAWEI-ssl-policy-ftps_der] quit
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >