Router configuration log information transmission Option Analysis

Source: Internet
Author: User

Store log information in other storage regions

The previously introduced method of sending log information to the line has a drawback. If we do not see the screen output of the connection line, the message is rolled over the screen and exceeds the historical cache of the terminal software, then we will not be able to see the lost messages. To avoid this problem, we often send log information to other storage areas, including the internal cache of the device and system logs.Server, SNMP Management Terminal.

1) Save the log information to the log server

To send the log information to the internal cache of the device, run the following command:

 
 
  1. hostname(config)#logging buffered [buffer_size | security_level] 

This command has two parameters. The first parameter is to set the buffer size in the range of 4096-4294967295 bytes. The second parameter of this command indicates that the log information of the level should be recorded.

To facilitate management and processing, logs from all devices in the network environment are sent to the log server or SNMP management terminal in a centralized manner. The command syntax used to send logs to the log server is as follows:

 
 
  1. hostname(config)#logging on  
  2.  
  3. hostname(config)#logging host {ip_address | host_name}  
  4.  
  5. hostname(config)#logging trap security_level  
  6.  
  7. hostname(config)#logging source-interface interface_type interface_#  
  8.  
  9. hostname(config)#logging origin-id {hostname | ip | string string}  
  10.  
  11. hostname(config)#logging facility facility_type 

The logging on command allows logging to a non-console destination. The logging host command specifies the IP address, host name, or host domain name of the system log server. If the address of multiple log servers is specified, the device sends log information to all log servers multiple times.

The logging trap command specifies the log message level to be sent to the system log server. For more information about these parameters, see.

VroThe interface IP address used to arrive at the system log server as the source IP address of the log information. When multiple interfaces of the router can reach the log server, the source IP address of the log information may be different. We use logging source-interface to specify the source IP address used by log information to keep the log information of all devices consistent, so that we can filter the log information to prevent logs that do not want to be viewed.

The Cisco IOS router supports adding the router identity information to the system log information, so that you can search for or separate information on the log server based on each device. This function is implemented using the logging origin-id command. For identity information, you can select the vro name configured using the hostname command), the IP address sends the interface IP address information of log information), and the string is used to define the vro identity information ).

The logging facility command defines the functions used on the log information server running on UNIX, and the log information is saved on the UNIX server.

2) Send the log information to the SNMP Management Terminal

You can also send the log information to the SNMP Management Terminal. The command used is as follows:

 
 
  1. hostname(config)#snmp-server enable trap syslog 

Then, use three commands to send the log information to the SNMP Management Terminal:

 
 
  1. hostname(config)#logging on  
  2.  
  3. hostname(config)#logging history security_level  
  4.  
  5. hostname(config)#logging history size number 

The first command has been discussed earlier. The second command is to determine which serious log messages should be sent to the SNMP Management Terminal. For severity levels, see the previous introduction. By default, at least one latest System Log message is saved in the history Table by default. You can use the logging history size command to modify this value.

The configuration of storing the log information in other storage areas in the option analysis of the router configuration log information is described. If you want to learn more, please read the router configuration log information Option Analysis: display the log configuration for the line

Edit recommendations]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.