Skip to content

Instantly share code, notes, and snippets.

View ngschmidt's full-sized avatar

Nick Schmidt ngschmidt

View GitHub Profile
@ngschmidt
ngschmidt / fullbogons.py
Last active January 23, 2022 20:22
Fullbogon population with VMware NSX-T
#!/usr/bin/python3
# Python NSX-T Fullbogon lists
# This implementation has a maximum of 4,000 entries
# Nicholas Schmidt
# 24-Dec-2021
# System Calls
import os
import sys
@ngschmidt
ngschmidt / o365_nsgroups.py
Created January 24, 2022 05:21
NSX-T Microsoft 365 Inventory Group Lifecycle Management
#!/usr/bin/python3
# Python NSX-T Microsoft 365 Address Group Collector
# This implementation has a maximum of 4,000 entries
# Nicholas Schmidt
# 23 Jan 2022
# System Calls
import os
import sys
@ngschmidt
ngschmidt / create_segment.yml
Last active March 6, 2022 16:53
VMware NSX-T Ansible Segment Creation Example
---
- hosts: localhost
tasks:
- name: "Creating segment {{ segment_name }}!"
vmware.ansible_for_nsxt.nsxt_policy_segment:
hostname: "{{ nsx_manager }}"
username: '{{ lookup("env", "APIUSER") }}'
password: '{{ lookup("env", "APIPASS") }}'
validate_certs: False
state: present
@ngschmidt
ngschmidt / update-managed-machines.yml
Created March 19, 2022 17:39
Install Root CA Ansible Playbook (Debian)
---
- hosts: debian_machines
tasks:
- name: "Ansible Self-Test!"
ping:
- name: "Update Apt!"
apt:
name: "*"
state: latest
update_cache: true
@ngschmidt
ngschmidt / ciscopvrst-dissected.txt
Last active April 16, 2022 23:49
Per-VLAN Spanning Tree Packet Captures
No. Time Source Destination Protocol Length Info
6 2.989606 RealtekU_00:00:00 PVST+ STP 68 RST. Root = 16384/10/52:54:00:00:00:00 Cost = 0 Port = 0x8001
Frame 6: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Mar 27, 2022 16:59:32.723771000 Alaskan Daylight Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1648429172.723771000 seconds
[Time delta from previous captured frame: 0.283004000 seconds]
[Time delta from previous displayed frame: 0.283004000 seconds]
No. Time Source Destination Protocol Length Info
1 0.000000 Routerbo_13:ea:0e Spanning-tree-(for-bridges)_00 STP 60 RST. Root = 57344/0/2c:c8:1b:13:ea:0d Cost = 0 Port = 0x8001
Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Apr 10, 2022 08:17:09.270737000 Alaskan Daylight Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1649607429.270737000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
No. Time Source Destination Protocol Length Info
7 2.600011 VMware_bc:45:07 PVST+ STP 68 RST. Root = 32768/200/00:50:56:18:91:ae Cost = 0 Port = 0x8001
Frame 7: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Apr 16, 2022 14:52:59.034144000 Alaskan Daylight Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1650149579.034144000 seconds
[Time delta from previous captured frame: 0.599754000 seconds]
[Time delta from previous displayed frame: 0.599754000 seconds]
No. Time Source Destination Protocol Length Info
2 0.253355 RealtekU_00:00:00 Spanning-tree-(for-bridges)_00 STP 167 MST. Root = 32768/0/52:54:00:00:00:00 Cost = 0 Port = 0x8001
Frame 2: 167 bytes on wire (1336 bits), 167 bytes captured (1336 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Apr 17, 2022 15:19:24.396329000 Alaskan Daylight Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1650237564.396329000 seconds
[Time delta from previous captured frame: 0.253355000 seconds]
[Time delta from previous displayed frame: 0.253355000 seconds]
@ngschmidt
ngschmidt / 99_qinvni_example_segment.yml
Created April 29, 2022 18:51
NSX-T Q-in-VNI Example
- hosts: localhost
tasks:
- name: "eng-lab-vn-example-trunk"
vmware.ansible_for_nsxt.nsxt_policy_segment:
hostname: ""
username: '{{ lookup("env", "APIUSER") }}'
password: '{{ lookup("env", "APIPASS") }}'
validate_certs: False
state: present
display_name: "eng-lab-vn-example-trunk"
@ngschmidt
ngschmidt / lab.yml
Created April 30, 2022 01:00
CML with NSX-T Bridge Example
lab:
description: ''
notes: ''
title: Router to Outside Lab
version: 0.0.5
nodes:
- id: n0
label: csr1000v-0
node_definition: csr1000v
x: 678