4

I want to feed a Juniper router a set of routes via BGP and measure how long it takes the router to process them, including time spent on prefix filters and RPKI origin validation.

Cisco IOS XR routers keep timers that measure the amount of time they spend processing routes, so it's fairly easy to do.
I can do it like so:

# show bgp neighbor performance-statistics
... output omitted ...
Processed 101900 inbound update messages (time spent: 3.646 secs)

Is there any way to do this on a Juniper router? The Juniper router model is mx240 and it's running Junos 14.2R1.9.

2

I don’t believe Juniper platforms have any compatible show outputs that allow access to that information and it doesn’t look like show bgp neighbor fits the bill quite right. They do, however, have some appealing logging options within the traceoptions stanza that log to /log directory. Although I can’t confirm the configuration below gives you exactly what you’re used to receiving with performance-statistics, I’m confident it will provide more.

I would test this myself, but my organization might frown on me self-initiating BGP route updates for thousands of routes (event soft resets).

Give this a try:

[edit protocols bgp]
user@host:A# show
traceoptions {
    file bgp-perf size 10k;
    flag update detail;
    flag all;
}

Juniper TechLibrary - Understanding Trace Operations for BGP Protocol Traffic


Just as a warning, detailed and all flag options are extremely CPU intensive and are only amplified in larger deployments. Use them sparingly (if at all) in production networks. The flags emphasized below are the ones that should be most relevant towards what you’re trying to achieve.

BGP protocol-specific trace options:

  • 4byte - as-4-byte AS events.
  • bfd - BFD protocol events.
  • damping - Damping operations.
  • graceful-restart - Graceful restart events.
  • keepalive - BGP keepalive messages.
  • nsr-synchronization - Nonstop active routing synchronization events.
  • open - BGP open packets. These packets are sent between peers when they are establishing a connection.
  • packets - All BGP protocol packets.
  • refresh - BGP refresh packets.
  • update - BGP update packets. These packets provide routing updates to BGP systems.

Global tracing options:

  • all - All tracing operations
  • general - All normal operations and routing table changes (a combination of the normal and route trace operations)
  • normal - Normal events
  • policy - Policy processing
  • route - Routing information
  • state - State transitions
  • task - Routing protocol task processing
  • timer - Routing protocol timer processing

Trace options flag modifiers:

  • detail - Detailed trace information.
  • filter - Filter trace information. Applies only to route and damping tracing flags.
  • receive - Packets being received.
  • send - Packets being transmitted.

Good luck!

2

The way that I ended up doing this was imperfect; it had a lot of potential for noise, and only works if you have a clear start and end time, but at the time it was the best way I could come up with.
I did it by executing the command

show system processes extensive

then feeding the router the routes, then executing the command again and summing up the differences in time for each process except the idle process between the two execution of the command.

It may be possible to get a more accurate number by only counting the difference in time for the rpd process, but for my own purposes this wasn't adequate because the time didn't seem to increase if I fed the router routes which it already had.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.