For When You Can't Have The Real Thing
[ start | index | login ]
start > Juniper > JunOS > Rancid in display set mode

Rancid in display set mode

Created by dave. Last edited by dave, 2 years and 184 days ago. Viewed 4,556 times. #4
[diff] [history] [edit] [rdf]
labels
attachments
(31 January 2013)

Problem

I think in set commands, not the fancy braces that JunOS likes to display. I'd like rancid to output my JunOS configuration diffs in set commands.

Solution for v3.x

In /etc/rancid/rancid/types.base, find the appropriate show configuration line and edit it as so:

juniper;command;junos::ShowConfiguration;show configuration | display set

(h/t from >>here)

Solution for v2.x.x

In jrancid, find the show configuration command and change it to a show configuration | display set command:

[rancid@sawmill bin]$ diff jrancid.display-set jrancid.dist
659c659
<       {'show configuration | display set'             => 'ShowConfiguration'}
---
>       {'show configuration'           => 'ShowConfiguration'}

Discussion

I know that liking the set commands makes me weird. I'm used to that. But in this case I think the benefits outweigh the loss of brace benefits.

When are you going to need the complete config? When your switch has shit itself and you are trying to rush a replacement into service. And in that case, having a complete config that you can jam in via the terminal gets you going faster than the "configure a basic switch", "copy-and-paste the whole config into the web interface" steps do. It is one shot, as opposed to two with some fiddling in between.

Secondly, the individual set commands can show you more clearly what the changes are in a delta. When you add a VLAN to a trunk port you end up with a three-line-long list of VLANs. Try finding the one that's been removed. However with the set output, it is clear. THIS command has been removed. THIS command has been added. Simple.

On the other hand, I've been happily reading ScreenOS config files for years, so this preference probably isn't generalizable.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt