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

About these ads

1 Comment »

  1. Thanks for this post.. I was google for finding the difference..

    Comment by Thameem — June 21, 2011 @ 1:11 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 111 other followers

%d bloggers like this: