Cisco CCNA (200-301)IP ServicesHard
A network engineer wants to configure a Cisco switch to send system messages (syslog) to a central syslog server at IP address 192.168.1.200. The engineer also wants to ensure that critical messages (level 2) are logged to the console. Which set of commands achieves this configuration?
- Alogging host 192.168.1.200 logging trap critical logging console critical
- Blogging 192.168.1.200 logging trap critical logging console critical
- Clogging host 192.168.1.200 logging trap warnings logging console alerts
- Dlogging server 192.168.1.200 logging trap 2 logging console 2
Show answer & explanationAnswer & explanation
Correct answer: A. logging host 192.168.1.200 logging trap critical logging console critical
The `logging host <IP>` command sends syslog messages to a specified server. `logging trap <level>` sets the minimum severity level for messages sent to the syslog server. `logging console <level>` sets the minimum severity level for messages displayed on the console. 'critical' corresponds to severity level 2.
Why the other options are wrong
- B. `logging 192.168.1.200` is an older or incorrect command form; it should be `logging host`. Otherwise, the trap/console levels are correct.
- C. `logging trap warnings` (level 4) is not 'critical' (level 2), and `logging console alerts` (level 1) is not 'critical' (level 2).
- D. While `logging trap 2` and `logging console 2` use the numeric severity level, `logging server` is not the correct command; it should be `logging host`.
Cisco Syslog Configuration
Configuring a Cisco device to send system messages to a remote syslog server and control local logging.
- `logging host <IP>`: directs syslog messages to a server.
- `logging trap <level>`: sets minimum severity for syslog server messages.
- `logging console <level>`: sets minimum severity for console messages.
- Severity levels: 0-7 (emergencies to debugging).
Memory trick: Log to a Host, Trap for Server, Console for Me.