ADN - Awk Defined Networking
Because I have yet to transition to a completely software-defined network in which everything configures itself (wink wink), I still have to do tasks like bulk VLAN changes.
Thanks to a recent innovation called ADN, or "AWK Defined Networking", I can do this in a shorter time window that the average bathroom break. For example, I just had a request to change all ports on a large access switch stack that are currently in VLAN 76 to VLAN 64:
# ssh switch_name.foo.com 'show int status | i _76_' | grep Gi | awk '{print "int ",$1,"\n","description PC/Phone","\n","switchport access vlan 64"}'
Password: ***
int Gi1/0/25
description PC/Phone
switchport access vlan 64
int Gi1/0/26
description PC/Phone
switchport access vlan 64
[many more deleted]
Then I copied and pasted the results into config mode. Back to lounging on the beach.
Not even any Python skills required!
Thanks to a recent innovation called ADN, or "AWK Defined Networking", I can do this in a shorter time window that the average bathroom break. For example, I just had a request to change all ports on a large access switch stack that are currently in VLAN 76 to VLAN 64:
# ssh switch_name.foo.com 'show int status | i _76_' | grep Gi | awk '{print "int ",$1,"\n","description PC/Phone","\n","switchport access vlan 64"}'
Password: ***
int Gi1/0/25
description PC/Phone
switchport access vlan 64
int Gi1/0/26
description PC/Phone
switchport access vlan 64
[many more deleted]
Then I copied and pasted the results into config mode. Back to lounging on the beach.
Not even any Python skills required!