[python]Detect changes in configuration of ASA

Three python scripts were written for doing specific tasks. conn_asa.py - this script is responsible for generating two outputs hostname and md_now (md is short for message digest) statechange.py - this script writes the hash generated from conn_asa.py into database. compare_change.py - this script compares the hash stored in db with the current hash generated … Continue reading [python]Detect changes in configuration of ASA

Advertisements

[python]Automating OSPF configuration of two routers

Network diagram There are two vIOS which are R1 and R2, they have their gi0/2 and gi0/3 connected to the R5 switch, the configuration is pushed from the cloud through their gi0/2 and gi0/3 to configure their gi0/0 to become OSPF neighbours. Objective To configure the two routers to become ospf neighbors, the OSPF configuration … Continue reading [python]Automating OSPF configuration of two routers

[python]Convert show ip int brief into structured json data

Cisco IOS commands output is unstructured in the perception of scripting, the output format made sense only to engineers, however if you need to program such output is difficult if the output is not processed. One of the better way to structure the unstructured cisco output is to check each row of the output, then … Continue reading [python]Convert show ip int brief into structured json data

Extending the python script to configure OSPF with ncclient

Previously I have successfully download the configuration from the netconf enabled router, now i have extended support to configure ospf. This is a simple lab to further extend and get myself familiarize and comfortable with netconf. During the lab I was careless, I inadvertently left a space on my netconf snippet that breaks my script … Continue reading Extending the python script to configure OSPF with ncclient

Testing menu and netmiko in python

Background This is a testing code to try out on a simple interactive text menu with two options, download cisco config and quit. I want to extend this config to have an interactive menu and prompt to configure cisco routers. Here's the code: The output Invalid selection ------------------------------ Menu ------------------------------ 1. Download Current Config 2. … Continue reading Testing menu and netmiko in python

Anyconnect VPN using local account

Network diagram Configure inside and outside interface ciscoasa(config)# int gi0/1 ciscoasa(config-if)# nameif outside INFO: Security level for "outside" set to 0 by default. ciscoasa(config-if)# ip address dhcp setroute ciscoasa(config-if)# no shut ciscoasa(config-if)# int gi0/0 ciscoasa(config-if)# nameif inside INFO: Security level for "inside" set to 100 by default. ciscoasa(config-if)# ip address 172.18.1.1 255.255.255.224 ciscoasa(config-if)# no shut … Continue reading Anyconnect VPN using local account

Cisco Systems: Spanning tree inconsistent port

Problem The topology is arranged in a star, a links terminate at a pair of Cisco 4503-E switches, problem occurred that some switches could not reach the Cisco 4503-E switches after the 4503 switches became primary and secondary root. Solution Desg BKN*4 the port is blocked although it should be forwarding. The blocking is due … Continue reading Cisco Systems: Spanning tree inconsistent port