Turning On Basic Tracing


The system logging messages give you high-level information about the processes and events that are occurring on the router, but you need specific information about the operation of a routing protocol.


Use tracing to get more details about the operations of your routing protocols. You can start by collecting global information about all the routing operations occurring on your router:

	[edit routing-options]
	aviva@router1# set traceoptions file traceoptions-routing-all world-readable
	aviva@router1# set traceoptions flag all



Basic tracing lets you collect information about all the routing protocols that are actively running on your router. Configuring tracing is almost the same as configuring system logging. You specify the file to which you want to direct information, and you decide whether only the root user or all users can read the file. Here, the filename is traceoptions-routing-all and it is readable by everyone.

This recipe uses the default trace file size of 1 MB and the default of 10 trace files. The JUNOS software handles the tracing files the same way as logging files. When the file reaches its maximum size, it is renamed with a .0 extension. When the file again fills up, the .0 file is renamed with a .1 extension, the newly filled file is renamed with a .0 extension, and so on. Where there are 10 files, the files start getting overwritten.

Use the following commands to change the default file size and number of files:

	[edit routing-options]
	aviva@router1# set traceoptions file size 10M
	aviva@router1# set traceoptions file files 5

The traceoption flags indicate the information to monitor. This recipe traces all routing protocol traffic.

For a router running RIP, IS-IS, and MPLS, you would see messages like this in the tracing file:

	Apr 5 16:09:43 mpls LSP update start
	Apr 5 16:09:43 mpls LSP update complete
	Apr 5 16:12:23 task_timer_dispatch: returned from IS-IS I/O./var/run/ppmd_control_
	PPM Keepalive, rescheduled in 40
	Apr 5 16:12:27 task_receive_packet: task RIPv2 I/O. from 192.168.220
	.18+520 to if t1-0/1/0:0.0 (ix 70) msgix 70 socket 14 length 164

All the messages are timestamped and indicate the protocol or tasks that generated them.

When debugging global routing operations, one or more of the following can be traced:

	[edit routing-options]
	aviva@router1# show traceoptions flag ?
	Possible completions:
	 all Trace everything
	 config-internal Trace configuration internals
	 general Trace general events
	 normal Trace normal events
	 parse Trace configuration parsing
	 policy Trace policy processing
	 regex-parse Trace regular-expression parsing
	 route Trace routing information
	 state Trace state transitions
	 task Trace routing protocol task processing
	 timer Trace routing protocol timer processing

Generally, when you are trying to debug a problem with a routing protocol, you turn on tracing for that protocol only. You can do this for BGP, DVMRP, IGMP, IS-IS, LDP, MPLS, MSDP, OSPF, PGM, PIM, RIP, RIPng, RSVP, SNMP, and VPLS. Throughout this book, in the appropriate protocol chapters, we show how to use tracing to debug problems. You can also use traceoptions to debug interface problems. Tracing all routing operations is not recommended on a busy router because the tracing and routing protocol operations use the same CPU and the processing time required for tracing can slow down the protocol processing. In this case, you should consider tracing a smaller scope of operations, or even not using tracing at all.

Router Configuration and File Management

Basic Router Security and Access Control





Router Interfaces

IP Routing

Routing Policy and Firewall Filters







IP Multicast

JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net