Sie sind auf Seite 1von 3

The default logging device is the console; all messages are displayed on the console unless otherwise specified.

Logging on: To enable message logging to all supported destinations other than the console

no logging on: To direct logging to the console terminal only and disable logging output to other destinations

logging console level : limits the logging messages displayed on the console terminal to messages up to and including the
specified severity level

logging monitor level: limits the logging messages displayed on terminal lines other than the console line to messages with
a level up to and including the specified level argument. Requires terminal monitor command

logging buffered: copies logging messages to an internal buffer instead of writing them to the console terminal. Use show
logging.

Logging trap notification: limits the logging messages sent to syslog servers to messages with a level up to and
including the specified level argument

Logging trap notification


logging source-interface FastEthernet0/1
logging 192.168.100.42

This Basics of logging and SNMP Commands document is for all the beginners who wants to be in expertise in Netorking
Field

Introduction
Did you ever notice how the router knows when the equipment attached to it changes or when it has got problems or any body
changes the config via the console or if circuit has a problem?
Routers or Switches displays some messages or alerts whenever it sees any kind of change. All these kinds of alerts and
messages are because of having the following commands in the configuration.
• Logging Commands
• SysLog Commands
• SNMP Commands
Because of the presence of these commands in the configuration, the router dumps messages and alerts on to the console so
that the administrator can figure out what has exactly happened.
The router can store logging messages locally; also can send these messages to another system for safekeeping.
Logging Commands:
These commands are used to monitor and manage the network; first, one needs to know how to configure them, and how to
make most of it. To use this system you have to decide what level of logging you would like.
Cisco follows SysLog standards for logging levels there are eight degrees of severity.
The level can be defined as an indication of importance or severity of individual message.
The eight levels are as follows:-
Debugging: Displays the normal debugging messages, level of severity is 7, Syslog definition LOG_DEBUG

Informational: Displays general Information messages with 6 as its severity level, SysLog definition LOG_INFO
Notification: Events that may require special handling but or not errors.5 as level of severity and LOG_NOTICE as SysLog
definition.
Warnings: Minor Errors with 4 severity level and defined as LOG_WARNING
Errors: It is 3rd level of severity and are Real Errors. LOG_ERR
Critical: Critical errors with level of severity as 2. LOG_ALERT.
Alerts: Errors that require immediate corrective action. level of severity is 1, Syslog definition LOG_ALERT
Emergency: Router is now inoperable; this is a high urgency situation when the system is unusable with 0 severity. Defined as
LOG_EMERG.
The router will log all the messages of the above severity level when specified. The router stores messages locally, which
allows you to check that the router events on the system.
Configuring basic logging commands:
Router #conf t
Router(config)# service log timestamps date time local time
Router(config)#logging history debugging
The above commands tell the router to provide basic logging services as well as dated time stamps in the local time. Now, you
can tell the router to perform logging, keeping the history on the local system and end with the lowest level of severity or
greater messages u wish to record.
To view the log entries do show logging
Router # show logging

To remove logging use the no form followed by the command.


The important thing to remember is that the amount of space on the router for log messages is strictly limited and varies
between different routers. However, what if one wants to keep more log messages. There is where it evolves the need for
SysLog.
SysLog Basics:
This protocol requires a separate sever to receive the messages from the router, the server runs the syslog daemon or
syslogd. There are 8 local facilities viz. local 0-local 7.
A Facility is a category provides d by the daemon for group, the group of programs to log to the same place.

Enabling syslog logging on the router:


Router #config t
Router (config) #logging trap debug
Router (config) #logging facility local 3
Router (config) # logging abc.axb.def.xyz
The above stated commands are enough for a router to understand and send traps.Logging traps are messages sent by the
router.
The router will transmit any kind of log messages of debugging severity or greater to our syslog server (these levels are
exactly same as those used in local logging)
Router (config) #login facility local 3: This command is used to define the level of facility-here local 3
Router (config) # logging abc.axb.def.xyz: Here the IP address of the logging server is defined.
Now you can see syslog messages arrive at your login server.
SNMP:
SNMP or Simple Network Management Protocol is used to gather and accumulate network and device performance
information.SNMP can be used both read-only and in read-write modes.SNMP-enabled devices uses a community name, like
a password, to provide basic community.
Router#config t
Router (config)# snmp-server community name RO
Router (config)# snmp-server community name RW
Router(config)# snmp-server enable traps type
Type of SNMP trap to be enabled/disabled.
There are different traps types.Some of them are:
bgp – To enable/disable the BGP Traps
environment – To Enable/disable SNMP Environment Traps
link-up-down - Enable/disable Link Up/Down Traps
module – To Enable/disable Module Traps
pim – To Enable/disable PIM Traps
ldp – To Enable/disable LDP Traps
qos – To Enable/disable QoS Traps
Conclusion:
With SNMP support, logging and SysLog timekeeping the router and network both are capable of being successfully
monitored and managed.
NTP

Clock time-zone Dubai 4

ntp authentication-key 1 md5 m@w@rid123


ntp authenticate
ntp trusted-key 1
ntp server 192.168.100.1 key 1

Das könnte Ihnen auch gefallen