<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Similar to an idea I scripted up for a previous employer - walk a device with SNMP and grab all interfaces with public addresses on them.</div><div class="">Use the interface type / speed combined with unit / sub interface number and construct something like this:</div><div class=""><br class=""></div><div class=""><type> - <int-id> - <unit/vlan-id> . <device-hostname> . <state/region-code> . <TLDR></div><div class=""><br class=""></div><div class="">E.g:</div><div class=""><br class=""></div><div class=""><a href="http://xe1-203.persgtrt01.wa.myisp.net" class="">xe1-203.</a><a href="http://persgtrt01.wa.myisp.net.au" class="">persgtrt01.wa.myisp.net.au</a> or <a href="http://ae2-144.sydparst01.nsw.myisp.net" class="">ae2-144.</a><a href="http://sydparst01.nsw.myisp.net.au" class="">sydparst01.nsw.myisp.net.au</a> </div><div class=""><br class=""></div><div class="">As you can have both IPv4 and IPv6 addresses on the same interface, you can use the unit / vlan ID irrespective of the addressing type.</div><div class=""><br class=""></div><div class="">Run this once a week and have it push the changes into pdns / bind etc and viola :p</div><div class=""><br class=""></div><div class="">- Tim</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 4 Dec 2014, at 2:05 pm, Nick Pratley <<a href="mailto:nick.pratley@serversaustralia.com.au" class="">nick.pratley@serversaustralia.com.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">+1<div class=""><br class=""></div><div class="">My Proof of Concept code parses the latest configuration file saved by rancid for each switch & router, dumping into a Power DNS cluster.</div><div class=""><br class=""></div><div class="">The downside to the approach I took, was realising that Observium saves all the information (IPs on Layer 3 ports and vlan interconnects), and I could have just pulled all the data for this project from that DB.</div><div class=""><br class=""></div><div class="">I am also happy to answer questions / help with examples of the code parsing the config files if needed.</div><div class=""><br class=""></div><div class="">Just on this note, there is a really awesome python tool I found. Takes the entire text config and converts to JSON.</div><div class=""><a href="https://github.com/knipknap/Gelatin" class="">https://github.com/knipknap/Gelatin</a><br class=""></div><div class=""><br class=""></div></div>
_______________________________________________<br class="">AusNOG mailing list<br class=""><a href="mailto:AusNOG@lists.ausnog.net" class="">AusNOG@lists.ausnog.net</a><br class="">http://lists.ausnog.net/mailman/listinfo/ausnog<br class=""></div></blockquote></div><br class=""></body></html>