Skip to content

Instantly share code, notes, and snippets.

vrf definition RED
!
interface Ethernet2
no switchport
vrf forwarding RED
ip address 10.10.0.6/31
!
ip routing vrf RED
!
ipv6 unicast-routing vrf RED

jamess-mbp:tmp jtdub$ cat test/__init__.py

from os.path import dirname, basename, isfile, join
import glob
import importlib


modules = glob.glob(join(dirname(__file__), "*.py"))
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
graph LR
A{Host}
B{Running}
C{Compiled}
D{Remediation}

A --> B
A --> C
B --> D
--- (MV)
D(ft) / 33 + 1 = D(ATA)
D(ATA) * SAC = V

--- (Example at 90 ft with .75 SAC)
90 / 33 + 1 = 3.72
3.72 * .72 = 2.79

--- (Max Distance Known - Swimming)

In my last blog, I hinted at a network configuration life cycle management library called hierarchical_configuration. I've been meaning to write about it for a while, but we've been super busy at work. I also wanted to ensure that we get our latest version of the library out in the public for general consumption before I wrote about it.

As your fleet routers and switches grow, it's becomes pretty natural to place these devices into a set of categories. For example, core, aggregation, and access. Each of these categories typically have a standard configuration. Hopefully each of these standard configurations exists as templates, so that you can quickly roll out new deployments. But, what about making changes to the templates? Do you make changes to these templates, then continue to roll them out to new deployments, leaving the existing install base with an outdated configuration? Or do you return to the install base and remediate the devices with the updated configuration? What if you have thousands of device

@jtdub
jtdub / ssh_helper.py
Created February 12, 2016 05:46
FB SSH_HELPER
#!/usr/local/bin/python3
# Copyright 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE-examples file in the root directory of this source tree.
""" SSH Connection Handler for Network Devices
@jtdub
jtdub / cmd-test.yml
Last active October 31, 2015 01:05
sample playbook
---
- name: test command module as audit
hosts: netdevices
gather_facts: False
connection: local
tasks:
- name: gather facts
ntc_show_command: