Professional Documents
Culture Documents
com
Hello my friend,
Logs are one of the most valuable (and therefore important) things, which we
have in troubleshooting of our network devices and services. The brief
overview of logs gives us understanding of what and when has happened. This
paradigm is applicable both for production and lab environment, thats why we
proceed further with configuration of logging at Nokia (Alcatel-Lucent) SR OS
and Cisco IOS XR.
Though local logging isnt academic term, it describes the core idea of that
process. The outputs of logging process (actually messages from different
protocols and other parts of operation system) are stored locally to our router,
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 1/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
Nokia (ALU)
Cisco IOS XR Explanation
SR OS
Logs are sent to CLI (command
line interface), where you can
console console observe them in real-time. In
this case console line itself
(serial or USB console).
Logs are sent to CLI, which
session monitor now relates to ssh/telnet
connections.
Logs are stored in routers
memory buffered RAM. They are lost after
reboot of Cisco router.
Logs are stored in file on
file-id archive flash/HDD. They are resistant
to reboot of the device.
Lets review how we can configure all these types of local logging, as well as
how we can see their content. But first of all lets see the default configuration.
Probably we dont have to configure anything. How do you think?
Ive said previously that 100th log has only information about major events.
How have I found it out? In Nokia (Alcatel-Lucent) SR OS (VSR or SR 7750)
we have concept of log filters, which gives you possibility to selectively filter
only interesting information. You can see that Filter ID for 100th log has
value 1001. Lets take a look on that filter:
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 3/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
There is one more important thing, before well switch to Cisco. In Nokia
(Alcatel-Lucent) SR OS there also four types of logs sources in addition to
different destinations. These inputs are specific for SR OS, there is no such
analog in Cisco, thats why I want to spend some time describing it. There four
types are as follows:
RP/0/0/CPU0:XR1#show logging
Fri Jun 17 00:55:50.143 UTC
Syslog logging: enabled (0 messages dropped, 0
flushes, 0 overruns)
Console logging: level warnings, 3093 messages
logged
Monitor logging: level debugging, 4643 messages
logged
Trap logging: level informational, 0 messages
logged
Buffer logging: level debugging, 5496 messages
loggedLog Buffer (2097152
bytes):RP/0/0/CPU0:Jun 16 23:27:29.097 :
config[65695]: %MGBL-CONFIG-6-DB_COMMIT :
Configuration committed by user cisco. Use
show configuration commit changes 1000000147
to view the changes.
RP/0/0/CPU0:Jun 16 23:30:13.155 :
config[65695]: %MGBL-SYS-5-CONFIG_I :
Configured from console by cisco
RP/0/0/CPU0:Jun 16 23:34:27.438 :
config[65695]: %MGBL-CONFIG-6-DB_COMMIT :
Configuration committed by user cisco. Use
show configuration commit changes 1000000148
to view the changes.
In the beginning there are configuration parameters for logging. Here provided
the default levels, which you have at the just new booted router.
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 4/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
*A:SR3>config>log# info
-
log-id 1
description DEBUG_TO_CONSOLE
time-format local
from debug-trace
to console
no shutdown
exit
-
This configuration of log stream will send all low level information (and only
it) to the console, when well activate debug at our Nokia (Alcatel-Lucent)
VSR (or SR 7750). By default all debugging is turned off, just in the same way
as it done at Cisco. What is also interesting is that you can switch off this
stream without deconfiguring it just by typing:
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 5/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
*A:SR3>config>log# info
-
filter 1
default-action drop
entry 1
action forward
match
message eq pattern Interface
exit
exit
exit
log-id 2
filter 1
from main
to session
no shutdown
exit
-
Actually you can add many different entries to the logs filter. Lets test,
whether this configuration works:
Now its time to configure the same logging level in Cisco IOS XR. Its just
one command:
RP/0/0/CPU0:XR1(config)#show conf
logging console debugging
end
After the numerous lines of configuration in Nokia (Alcatel-Lucent) SR OS,
such simplification looks incredible. But in SR OS, Ive configured exactly
what I want: all active debug traces and interface flapping. All other logs arent
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 6/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 7/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
*A:SR3>config>log# info
-
filter 11
default-action drop
description OSPF
entry 1
action forward
match
application eq ospf
exit
exit
exit
log-id 3
description OSPF_TO_TERMINAL
filter 11
from main
to session
no shutdown
exit
-
We cant test it right now as we dont have OSPF configured. But you can
apply it to the configuration from my second article, where Ive briefly
configured OSPF at Nokia (Alcatel-Lucent) VSR (SR 7750) and Cisco IOS
XR.
RP/0/0/CPU0:XR1(config)#show conf
logging monitor notifications
end
To see the output of logs in the vty line, when you are connected to Cisco IOS
XR router, you should activate such function:
RP/0/0/CPU0:XR1#terminal monitor
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 8/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
Logging to buffer
Obviously its impossible to be connected to the device 24/7. On the other hand
very often different issues happen, when we are away from console, so we
need to have a possibility to read about them (from associated logs) afterwards.
Besides logging to syslog server, which isnt covered in this article, the most
common way is to store logs locally in RAM. These logs are stored until the
reboot and completely deleted after it. Usually it isnt problem, because for
long-term purposes the logs are stored either at local disc or to syslog server.
At Nokia (Alcatel-Lucent) VSR (SR 7750) the logging to the memory (RAM)
is activated by default for main issues stream, so we dont have to configure it.
Lets configure the same for the debugging.
*A:SR3>config>log# info
-
log-id 4
description DEBUG_TO_MEMORY
from debug-trace
to memory
no shutdown
exit
-
Now you can to see the logs from main stream using rule configured by default
show log log-id 99 and to see debugs you will use show log log-id 4.
Cisco IOS XR has configured by default all logs of all severity levels to be
logged to the console. You can change it by:
RP/0/0/CPU0:XR1(config)#show conf
logging buffered notifications
end
*A:SR3>config>log# info
-
file-id 1
location cf3:
exit
log-id 10
from main
to file 1
no shutdown
exit
-
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 9/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
To see the content of this log, you dont need to do anything special. Just look
it through as any other log stream.
Now lets take a look at Cisco IOS XR. The configuration of such type of
logging is a much longer comparing to what we have already done there:
RP/0/0/CPU0:XR1(config)#show conf
logging archive
device harddisk
severity warnings
file-size 10
frequency daily
!
end
Though it saves logs to the HDD, you should be careful with it. The main idea
here that it doesnt save logs to the HDD in real time, but rather it archives
them once a day or week depending on the configuration. If your Cisco IOS
XR router was rebooted before such replication of logs to HDD, you will lose
them.
Debugging
The last topic for this article is debugging. It goes hand in hand with logging,
because its output fully depends on configuration of logging. At this point I
assume that all the previous configuration is implemented, including sending of
debug to the console. Actually the activation and deactivation of debugging is
the same in Nokia (Alcatel-Lucent) VSR (SR 7750) and Cisco IOS XR:
Nokia (Alcatel-Lucent) SR
Cisco IOS XR
OS
A:SR3# debug router ip
RP/0/0/CPU0:XR1#debug icmp ipv4
icmp
Lets test how it works by issuing ping from Cisco IOS XR to Nokia (Alcatel-
Lucent) VSR (SR 7750). Cisco side:
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 10/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
A:SR3#
21 2016/07/15 11:58:58.47 UTC MINOR: DEBUG
#2001 Base PIP
PIP: ICMP
instance 1 (Base), interface index 4 (toXR1),
ICMP ingressing on toXR1:
10.0.0.2 -> 10.0.0.1
type: Echo (8) code: No Code (0)
22 2016/07/15 11:58:58.47 UTC MINOR: DEBUG
#2001 Base PIP
PIP: ICMP
instance 1 (Base), interface index 4 (toXR1),
ICMP egressing on toXR1:
10.0.0.1 -> 10.0.0.2
type: Echo Reply (0) code: No Code (0)
If you want to disable debugs, you can do it either selectively for certain
technology or in overall all logging:
Nokia (Alcatel-Lucent)
Cisco IOS XR
SR OS
A:SR3# debug RP/0/0/CPU0:XR1#no debug
router ip no icmp icmp ipv4
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 11/12
5/12/2017 Logging and debugging in Nokia (Alcatel-Lucent) SR OS and Cisco IOS XR | karneliuk.com
! !
A:SR3# no debug RP/0/0/CPU0:XR1#undeb all
Lessons learned
Probably Ive spend too much time on such topic, because my aim is not to
provide command to command parity between Nokia (Alcatel-Lucent) SR OS
and Cisco IOS XR. But what Ive faced during my labs is that absence of
default logging to the console of VSR (SR 7750) confuses me a lot, because
after Cisco Ive expectation to see everything what is going on in real time.
Conclusion
In general the configuration of logging in Nokia (Alctel-Lucent) SR OS can be
more complicated, because it provides you much more options for selectively
logs filtering than Cisco IOS XR. In reality such filtering significantly eases
the troubleshooting, because you can in advance predefine all the necessary
filters (for BGP, ISIS, LDP and so on) and during troubleshooting you will just
per technology check its status. Moreover the structure, where each log stream
is stored separately provides possibility to have older logs per used filter, than
you could have, if all logs are stored together. On the other hand you have
possibility to configure almost the same simple all-inclusive log, as we have
in Cisco. So its totally up to you how you will use this possibility.
BR,
Anton Karneliuk
http://karneliuk.com/2016/07/logging-and-debugging-in-nokia-alcatel-lucent-sr-os-and-cisco-ios-xr/ 12/12