router.db(5)
π router.db(5) β the rancid group configuration file, bestie edition π
okay so this is router.db, and it lives in the File Formats Manual section of the router.db(5) man page. it's the file where a rancid group writes down every device it's supposed to care about. control_rancid(1) literally reads this file to build the list of devices it should go collect from. she's the roster, she's the guest list, she's the group chat member list. π
β¨ SYNTAX β¨
one device per line, and the shape of a line is:
<device_name>;<device_type>;<state>[;comments]
like, for example:
scooby.shrubbery.net;cisco;up
and here's what each field actually means, field by field π«Ά
the fields
<device_name>
the name of the device. it must resolve via gethostbyname, and it's the thing that gets handed as the argument to telnet(1), rsh(1), or ssh(1) when connecting to the device. once it's been converted to lower-case, it also becomes the name of the file where the config gets stored, under $BASEDIR/<group>/configs. two jobs, one string, main character energy honestly.
ngl, experience has shown that using the device's FQDN (Fully Qualified Domain Name) works best β just like in the example up there. π
<device_type>
the kind of device, picked from this whole set. yes, all of them. no skipping. π
agmβ a Cisco Anomaly Guard Module (aka Riverhead). suspect that at some point the UI will become more cisco-like and it can be merged with the IOS rancid module.alteonβ an Alteon WebOS switches.arcosβ an Arrcus router.aristaβ an Arista Networks device.baynetβ a Bay Networks router.bigipβ a F5 device running BIG-IP >= v11.cat5β a Cisco catalyst series 5000 and 4000 switches (i.e.: running the catalyst OS, not IOS).ciena-wsβ a Ciena Waveserver.ciscoβ a Cisco router, PIX, or switch such as the 3500XL or 6000 running IOS (or IOS-like) OS, but not IOS-XR, NX-OS or Cisco small business devices.cisco-sbβ a Cisco small business devices.cisco-nxβ a Cisco Nexus switch/router.cisco-xrβ a Cisco device running IOS-XR.cisco-wlc4β a Cisco Wireless Controller versions up to 4.cisco-wlc5β a Cisco Wireless Controller versions 5 and above.cssβ a Cisco content services switch.enterasysβ an enterasys NAS. this is currently an alias for theriverstonedevice type.erxβ a Juniper E-series edge router.fss2β a Fujitsu FSS2/1finity device.dellβ a Dell switch. known working models areDES-3010F,DES-3052P,DES-3526, andDES-3550. note that Dell OEMs some equipment and has purchased some companies, so a Dell product may not work with thedellrancid module but may work withsmcorforce10. π«extremeβ an Extreme switch.ezt3β an ADC-Kentrox EZ-T3 mux.f5β a F5 BigIP switch.force10β a Force10 router.fortigateβ a Fortinet firewall.fortigate-fullβ a Fortinet firewall with all defaults shown.foundryβ a Foundry router, switch, or router-switch. this includes HP Procurve switches that are OEMs of Foundry products, such as theHP9304M.hitachiβ a Hitachi router.hpβ a HP Procurve switch such as the 2524, 4108 or J9086A (aka. 2610) procurve switches, J9091A, and J8698A. also see thefoundrytype.juniperβ a Juniper router.mrtdβ a host running the (Merit) MRTd daemon.mrvβ a MRV optical device; including NC316, OptiSwitch 904, OptiSwitch 906G, OptiSwitch 912C, OptiSwitch 940.netscalerβ a Netscaler load balancer.netscreenβ a Netscreen firewall.paloaltoβ a Palo Alto Networks device.redbackβ a Redback router, NAS, etc.riverstoneβ a Riverstone NAS or Cabletron (starting with version ~9.0.3) router.routerosβ a Mikrotik RouterOS router.smcβ a SMC switch, which also account for some Dell OEMs. including Dell PowerConnect 35xx (3524, 3524P, 3548, 3548P) and 7048.srosβ a Nokia (Alcatel-Lucent) router, such as the 7750 SR.xirrusβ a Xirrus array.zebraβ Zebra routing software.
<state>
the state is either "up", or some other arbitrary value, e.g. "down". and listen β if the device is not marked "up", the device's configuration will not be collected. that's the whole vibe check of this field. π₯
it is highly recommended that comments are made for any router not listed as up, so as to indicate the reason a router is not to be polled, e.g.:
dial1.paris;cisco;up;
core1.paris;cisco;down;in testing until 5/5/2001.
core2.paris;cisco;ticketed;Ticket 6054234, 5/3/2001
border1.paris;juniper;up;
also!! the script downreport in util/ can be used to produce a report of routers in router.db that are not marked "up". she's got you covered. π§
[comments]
freeform string to describe the current state of the router. say whatever, it's your moment.
πΈ little extra rules πΈ
a ``#'' at the beginning of a line is a comment; the entire line is ignored. bye bestie, not today. π
if a device is deleted from the router.db file, then rancid will clean up by removing the device's config file from $BASEDIR/<group>/configs. the device will be removed from the revision control system. and β highkey iconic β it is possible, in most cases, to resurrect or check-out copies of deleted device configurations. so it's not gone-gone. πβ¨
π¦ FILES π¦
$BASEDIR/<group>/router.dbβ configuration file described here, where<group>is a device group name defined in the variableLIST_OF_GROUPSwithin$BASEDIR/etc/rancid.conf.
π SEE ALSO π
control_rancid(1), rancid(1), rancid.conf(5)
π HISTORY π
in RANCID releases prior to 3.0, router.db used colons (:) as its field separator. this was changed to allow IPv6 addresses to be used in router.db. glow-up for a genuine reason, we love to see it. π
and that's the page, bestie β signed off from the 5 May 2020 edition of router.db(5) in the File Formats Manual. mwah. ππ
π¦ where this page comes from
- alpine 3.24: rancid-doc 3.14-r0 Β· BSD-3-Clause-No-Nuclear-License-2014
- epel 9: rancid 3.13-7.el9 Β· BSD with advertising
- fedora 43: rancid 3.13-16.fc43 Β· BSD-3-Clause
- fedora 43: rancid 3.14-1.fc43 Β· BSD-3-Clause
- fedora 44: rancid 3.13-17.fc44 Β· BSD-3-Clause
- fedora 44: rancid 3.14-1.fc44 Β· BSD-3-Clause
- nixos 26.05: rancid 3.13
- nixpkgs unstable: rancid 3.13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms