<

Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Enabling Traceoptions in Juniper Router and monitoring the trace.

Published on
16,626 Points
10,626 Views
Last Modified:
Hello ,

This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router .

The following demonstrates a traceoptions configuration on a Juniper router which has ospf enabled on it and we will be tracing for ospf .

First this is to go into a mode to make this happen Below is the command from the start of the router .

login: lab
Password:

--- JUNOS 9.6R2.11 built 2009-10-06 20:56:00 UTC
lab> configure 
Entering configuration mode
Users currently editing the configuration:
  lab terminal d0 (pid 1359) on since 2011-06-11 00:48:19 IST, idle 12:27:15
      [edit]
  lab terminal p2 (pid 1510) on since 2011-06-11 14:40:34 IST, idle 05:10:52
      [edit]

[edit]
lab# 

Open in new window


Now that you have done this we will go ahead and configure the protocol

[edit]
lab# set protocols ospf area 0 interface all 

[edit]
lab# commit 
commit complete

[edit]
lab# 

Open in new window


how would you enable traceoptions ? well traceoptions are protocol specific and not device specific . In the sense you would have traceoptions for ospf , rip , and protocols not for the entire router itself

let us enable traceoptions for ospf

[edit]
lab# edit protocols ospf 

[edit protocols ospf]
lab# set traceoptions file testtrace 

[edit protocols ospf]
lab# set traceoptions flag all 

[edit protocols ospf]
lab# commit 
commit complete

[edit protocols ospf]
lab# 

Open in new window


Now , how would you monitor it ... simple

[edit]
lab# exit 
Exiting configuration mode

lab> monitor start testtrace 

lab> 
*** testtrace ***
Jun 11 21:23:51.316731 task_timer_dispatch: calling OSPF_internal timer, late by 0.000
Jun 11 21:23:51.316798 task_timer_dispatch: returned from OSPF_internal timer, rescheduled in 0
Jun 11 21:23:51.875790 task_process_events: recv ready for OSPF I/O./var/run/ppmd_control
Jun 11 21:23:51.875864 task_process_events: recv ready for OSPF I/O./var/run/ppmd_control
Jun 11 21:23:51.875898 task_timer_uset: timer OSPF I/O./var/run/ppmd_control_PPM Hold <Touched> set to offset 2:00 at 21:25:51
Jun 11 21:23:51.875912 OSPF periodic xmit from 22.1.1.2 to 224.0.0.5 (IFL 78 area 0.0.0.0)
Jun 11 21:23:53.415544 task_process_events: recv ready for OSPF I/O./var/run/ppmd_control
Jun 11 21:23:53.415634 task_process_events: recv ready for OSPF I/O./var/run/ppmd_control
Jun 11 21:23:53.415663 task_timer_uset: timer OSPF I/O./var/run/ppmd_control_PPM Hold <Touched> set to offset 2:00 at 21:25:53
Jun 11 21:23:53.415677 OSPF periodic xmit from 10.141.227.1 to 224.0.0.5 (IFL 3 area 0.0.0.0)

monitor stop 

lab> 

Open in new window


one thing to keep in mind though , you can type monitor stop at anytime to stop the trace.

You can also see the log file which gets generated along with this

lab> file list /var/log | match testtrace 
testtrace

lab> 

Open in new window


The same thing is with protocol rip or any other protocol . So what are all the options available under ospf traceoptions

lab# set traceoptions flag ?
Possible completions:
  all                  Trace everything
  database-description  Trace database description packets
  error                Trace errored packets
  event                Trace OSPF state machine events
  flooding             Trace LSA flooding
  general              Trace general events
  graceful-restart     Trace graceful restart
  hello                Trace hello packets
  ldp-synchronization  Trace synchronization between OSPF and LDP
  lsa-ack              Trace LSA acknowledgment packets
  lsa-analysis         Trace LSA analysis
  lsa-request          Trace LSA request packets
  lsa-update           Trace LSA update packets
  normal               Trace normal events
  nsr-synchronization  Trace NSR synchronization events
  on-demand            Trace demand circuit extensions
  packet-dump          Dump the contents of selected packet types
  packets              Trace all OSPF packets
  policy               Trace policy processing
  route                Trace routing information
  spf                  Trace SPF calculations
  state                Trace state transitions
  task                 Trace routing protocol task processing
  timer                Trace routing protocol timer processing
[edit protocols ospf]
lab# set traceoptions flag    

Open in new window


if you can see , you can do a trace for each and every type of state ospf has , my suggestion if you are learning ospf and if you are in a lab environment then we can go with traceoptions which has 'state' tag enabled so that we can see the state information of the protocol , 'timers' which is self explanatory protocol timers

if we wanted to go for the protocol state only , then we would do the following
set protocols ospf traceoptions flag state

Open in new window


Hope this helps and please feel free to post any suggestions or comments that might make this a better Article, or, maybe a follow up Article.
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
0 Comments

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month