CCIE Pursuit Blog

March 26, 2009

logging x.x.x.x vs logging host x.x.x.x

Filed under: Cisco,Cisco Certification,IOS — cciepursuit @ 8:00 am
Tags: , , , ,

If you’ve done any syslog configuration on a router, then you’re probably used to setting the syslog server with:

Rack1R2(config)#logging 1.2.3.4

If you’ve looked a little closer at the logging commands, you’ve probably noticed that there is also a ‘logging host’ command.  So what is the difference between using ‘logging x.x.x.x’ and ‘logging host x.x.x.x’?  It turns out that there is no difference*

Rack1R2(config)#logging 1.2.3.4
Rack1R2(config)#logging host 5.6.7.8
Rack1R2(config)#do sh run | i logging
logging 1.2.3.4
logging 5.6.7.8

* As long as you don’t add additional configuration after the IP Address with the ‘logging host’ command

You can use either

Rack1R2(config)#logging host 1.1.1.1 transport tcp port 666
Rack1R2(config)#do sh run | i logging
logging host 1.1.1.1 transport tcp port 666

The one thing you need to keep an eye out for is that once you’ve configured the “Syslog of the Beast”, if you then configure ‘logging 1.1.1.1’ or ‘logging host 1.1.1.1’ by accident, you’ll blow away your existing logging host configuration:

Rack1R2(config)#logging host 1.1.1.1
Rack1R2(config)#do sh run | i logging
logging 1.1.1.1

Command reference: logging host

Core Knowledge Question of the Day: 26 March 2009

What is the primary difference between SNMP traps and SNMP inform requests (informs)?

Highlight for answer: SNMP informs are traps that include a request for confirmation of receipt from the SNMP manager.

Create a free website or blog at WordPress.com.