>python dup_conf.py
If you're on a Mac or Linux system, Python should be installed by default. On Windows, you'll need to install it or run Cygwin. Note that in the default version, the script ignores SVIs and Gigabit interfaces; uncomment the appropriate lines to include them.
The output looks like this:
in config file c3750-1A.txt
interfaces
interface FastEthernet1/0/35
configured like
switchport trunk encapsulation dot1q
switchport trunk native vlan 76
switchport mode trunk
switchport voice vlan 65
no logging event link-status
srr-queue bandwidth share 10 10 60 20
srr-queue bandwidth shape 10 0 0 0
mls qos trust device cisco-phone
mls qos trust dscp
auto qos voip cisco-phone
no mdix auto
spanning-tree portfast
**************************************************
interfaces
interface FastEthernet1/0/11
interface FastEthernet1/0/12
configured like
switchport trunk encapsulation dot1q
switchport trunk native vlan 80
switchport mode trunk
switchport voice vlan 65
srr-queue bandwidth share 10 10 60 20
srr-queue bandwidth shape 10 0 0 0
mls qos trust device cisco-phone
mls qos trust dscp
auto qos voip cisco-phone
no mdix auto
spanning-tree portfast
**************************************************
interfaces
interface FastEthernet1/0/1
interface FastEthernet1/0/2
interface FastEthernet1/0/3
interface FastEthernet1/0/4
interface FastEthernet1/0/5
interface FastEthernet1/0/6
interface FastEthernet1/0/7
interface FastEthernet1/0/8
interface FastEthernet1/0/9
interface FastEthernet1/0/10
interface FastEthernet1/0/13
interface FastEthernet1/0/14
interface FastEthernet1/0/15
interface FastEthernet1/0/16
configured like
switchport access vlan 64
switchport voice vlan 65
srr-queue bandwidth share 10 10 60 20
srr-queue bandwidth shape 10 0 0 0
mls qos trust device cisco-phone
mls qos trust dscp
auto qos voip cisco-phone
no mdix auto
spanning-tree portfast
**************************************************
3 comments:
You could also substitute something like this, and list the files to check on the command line:
filenames = [sys.argv[1:]]
Yeah, I thought about that but all my files were already named with a consistent pattern so I just embedded it into the script. For anyone who wants to use Mike's suggestion, just remember to add "import sys" at the top.
It's great that you are telling us about these things.
one night
Post a Comment