rancid.types.conf(5)

πŸ“¦
version 3.14 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– rancid.types.conf πŸ’–

okay bestie, so this is the manual page for rancid.types.conf(5) β€” a File Formats Manual situation β€” and it's literally the file that tells rancid what kinds of devices exist. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

rancid.types.conf β€” the rancid device type configuration file. that's the whole name, no notes. πŸ’…


🌸 DESCRIPTION 🌸

so rancid.types.conf is full of formatted configuration lines that define the device types you're allowed to use in the <device_type> field of the router.db(5) configuration file. yes, that field. iconic.

the rancid.types.base configuration file follows the exact same format, but it defines the base types that get described in router.db(5). twins, basically. 🫢

STRONG WARNING, no cap: users are STRONGLY discouraged from altering this file or overriding the base types in rancid.types.conf. like, don't. instead, if you really need to change a type definition, copy it out of rancid.types.base into rancid.types.conf and use a different <device_type> name. periodt.

πŸŽ€ SYNTAX πŸŽ€

one directive per line, and the syntax is one of these:

          <device_type>;alias;<alternate_device_type>
          <device_type>;command;<filter_function>;<device_command_string>
          <device_type>;inloop;<input_loop_function>
          <device_type>;login;<login_program>
          <device_type>;module;<perl_module_name>
          <device_type>;prescript;<rancid_script> XXX temporary knob?  add this?
          <device_type>;postscript;<rancid_script> XXX temporary knob?  add this?
          <device_type>;script;<rancid_script>
          <device_type>;timeout;<login_program_timeout>

for example, bestie, look:

          cisco;login;clogin
          cisco;timeout;120
          cisco;module;rancid::ios
          cisco;inloop;ios::inloop
          cisco;command;ShowVersion;show version
          juniper;login;/usr/local/bin/jlogin
          juniper;module;rancid::junos
          juniper;inloop;junos::inloop
          juniper;command;ShowVersion;show version
          srx;alias;juniper

<device_type> is a lower case name used in the router.db(5) file. and the way that it's forced to lower case when reading the configuration files? yeah. it does not care about your capital letters, sorry not sorry.

each <device_type> may have the following directives defined. the login and script directives are required, unless it's an alias. iykyk.

  • alias β€” defines an alias for another <device_type>, and it does NOT augment it. like, it's a whole replacement vibe, not a glow-up. the <device_type> target may be defined in either device type configuration file.
  • command β€” defines commands to run for the <device_type> and the function that will process the input. two jobs, one line, main character energy.
  • inloop β€” intended for rancid(1), inloop defines a function to loop over the input from the device. it must have the calling signature f($INPUT, $OUTPUT) β€” no exceptions, that's the vibe check.
  • login β€” defines the login script used for the <device_type>. it does not need to be an FQPN, but then it must be found in the path.
  • module β€” loads a rancid perl module to supply functions used in the command directives for the <device_type>. multiple module lines may exist for a device type, and they are loaded in the order they appear. first come, first served. 🌈
  • script β€” defines the rancid script used for the <device_type>. it does not need to be an FQPN, but then it must be found in the process' path.
  • timeout β€” defines the rancid login script timeout in seconds. in general, the default is 90 seconds, but some modules themselves alter this. sneaky little modules. πŸ‘€

πŸ¦‹ FILES πŸ¦‹

  • /etc/rancid/rancid.types.conf β€” configuration file described here. (yes, the one we've been yapping about this whole time πŸ’€)
  • /etc/rancid/rancid.types.base β€” configuration file described here.

πŸ‘‘ SEE ALSO πŸ‘‘

control_rancid(1), rancid(1), rancid-run(1), router.db(5), rancid(3)

go read those too, bestie, they're all part of the same little universe. ✨


okay that's the whole page, we ate and left no crumbs πŸŽ€ this was the rancid.types.conf(5) page from the File Formats Manual, dated 24 March 2020 β€” mwah, bye bestie, go configure responsibly πŸ’–πŸ§š