SoFunction
Updated on 2025-04-12

Detailed introduction to the logging function of the router

Some important information about the router can be logged on UNIX hosts on the internal network through the syslog mechanism. The logging function can be achieved by setting the IP address of the log host on the router and making some necessary settings on the corresponding UNIX host.

During the router running, the router will send logs to the log host. Logs include link establishment failure packet filtering log information, etc. By logging in to the log host, the system administrator can understand log events and analyze the logs. Logs can help administrators locate and troubleshoot faults, and can also help administrators manage network security.[

1. Configuration on the router
Table 3-19 Setting up the log host
show loghost                           View log host
no loghost                                       Cancel log host'
loghost loghost-ip-address Set loghost host
Example: Make the router send log information to UNIX workstation with IP address 202.38.160.1
Quidway(config)#loghost 202.38.160.1

2. Configuration on UNIX host
The following configuration example is basically the same as the configuration operations on UNIX operating systems of other manufacturers done on SunOS 4.0.
Step 1: Execute the following command as a super user (root)
#mkdir /var/log/Quidway
#touch /var/log/Quidway/config
#touch /var/log/Quidway/securityR|w:/
The second step is to edit the file /etc/ as a super user (root) and add the following selection/action combinations (selector/action pairs).%x
# Quidway configuration messages/
  /var/log/Quidway/config
# Quidway security messages
/var/log/Quidway/security
Note: When editing /etc/, you should pay attention to the following issues
! Comments are only allowed to be independent lines and start with a character #.
! Selection/action combinations must be separated by a tab and spaces cannot be entered.
! There must be no extra spaces after the file name.
Step 3: When the log file config and security are established and the /etc/ file is modified, syslogd should be rereaded by executing the following command to syslogd to the system daemon syslogd a HUP signal to make syslogd reread its configuration file /etc/.
#ps -ae | grep syslogd
147©
#kill -HUP 147
After performing the above operations, the router can record information in the corresponding log file.

Article entry: csh     Editor in charge: csh