Sep 272009
 

This is my first release of ldNetDeviceManager.py. The ldNetManager.py tool gives you the ability to manage your network devices with out having to purchase a product like Cisco’s LMS or go through the planning phase of deploying a product like func. Each of the tools I mentioned before, only have the ability to manage devices in their realm. Func supports Linux devices and Cisco LMS supports only Cisco devices.

This tool has one goal. And that is to update your devices with out deploying any software to your remote devices. All you need is either telnet or ssh access to your devices and Python2.4 or better with Pexpect installed. Once you have those 2 requirements fullfilled, then you are pretty much ready to go.

You will need Python 2.4 or better and Pexpect. ( has not been tested with Python 3+ )

You can get Python from http://python.org and Pexpect ( I’m currently using Pexpect 2.3, which you can get from SourceForge.

Network Device Manager Download
For support. please check the forums, http://www.linuxdynasty.org/forums/LD_Network_Device_Manager .
Here are the release notes..
Revision .21 10/01/2009

  • Can now save output to a file. using the –save option

Revision .20 09/27/2009

  • Support for Cisco Devices and Linux Operating Systems
  • Support for telnet and ssh or both
  • Knows if you passed sudo, su, or enable
  • Can pass either 1 device or multiple devices
  • Can pass 1 command or multiple commands through a text file.
  • Can pass 1 device or multiple devices through a text file.
  • When running show commands on Cisco devices, the script will know to send a ( space bar ) to get more info

Continue reading “HowTo Manage your networked devices using Python and Pexpect” »

Sep 262009
 
At the current place that I work at, we are trying to figure out, how much we are logging on a daily basis. Since my manager is thinking of purchasing Splunk ( I hope he does ). But before we make that leap and spend that much money ( Those of you who have splunk know exactly what I am talking about ). We need to know how much we are logging now and how much we would be logging after all of our devices are in Splunk.

The current issue is that we have over 400 Cisco Network devices, and they are not all in the Cisco LMS ( Lan Management Solution ). We also have Solarwind, but we do not have all of our Networking devices in there either. There is only one way I know of doing that with out using multiple tools like Cisco LMS or Func. So I figured, I should go ahead and write a Python tool that can update all of our devices ( Cisco, Nortel, Foundry,  Linux, BSD, you get the idea.. ).

I wrote a Python tool that utilizes pexpect. The tools is almost complete to release on my site, but I still need to add more functionality. Currently, you can pass a device list and a command list to the script. You can also tell the tool to be verbose and print the output. Also you can tell it to use ssh or telnet or both. The tool is smart enogh to use ssh keys or log into a device you never have logged into before, by accepting the key for you.

I’m currently modifying it so that you can just pass one device and not just a list of devices. Also working on a password changer function. I’ve tested my tool on Linux Servers as well as Cisco devices and so far it works like a charm. I’m thinking about adding threading, but I have not yet decided to do so..

I will post this tool either tonight or tomorrow.. I hope you will find this tool as useful as we do.
Sep 182009
 
We are happy to announce the release of Port Report 1.12. In this release, we can now follow CDP Neighbors while using the –report or -r options. Before when you used the –report option, the script will report on just that one switch. Now if you pass the –follow or -f option with the –report or -r option, port_report will follow the CDP neighbors and create multiple CSV files.
Release notes are below…. If you want to see an example of the Port Report output and how to run it, please check this link
Revision 1.12 09/18/09

  • The report option of the script can now follow cdp neighbors using the –follow option or -f.
    When you run the command below it will create ONE CSV file per cdp neighbor it scanned.
    I was able to scan from my core Switch down to the last neighbor in the line ( 44 Neighbors in just under 20 minutes. )
    Which equaled to a little over 4K Mac Addresses
    For instance…port_report.py -d 192.168.101.1 -c public -r -f

Continue reading “LD Port Report 1.12 update aka the Host and MAC Reporting tool” »

Sep 152009
 
We are happy to announce the release of Port Report 1.11. In this release, we have fixed quite a few bugs that were in the previous release. Included in this release is the ability to follow EtherChannel aka PortChannel Ports using the Port Agreggation Protocol.
Release notes are below…. If you want to see an example of the Port Report output and how to run it, please check this link
LD Port Report == Download
Revision 1.11 09/13/09

  • More code clean up and another increase in speed.
  • Also port_report can now follow EtherChannel
  • Fixed issue, where the matching of the cdp neighbor was not matching correctly
  • Added better verbosity
  • Added Sanity Checking for cdp neighbors

Revision 1.10 09/09/09

  • Code Clean up and a slight increase in speed ( by a few seconds ) during the search by mac or ip

Revision 1.9
Code changes and Added CDP Support

  • Detect CDP Neighbors during the scan for MAC Addresses or IP Addresses

Revision 1.8
Here is a quick update…..

  • I just add dns reverse lookups to the output of this script.

Revision 1.7
Adds support to the following devices..

  1. Cisco
    • Catalyst 6509 w/ Supervisor 720 running IOS
    • Catalyst 3560
    • Catalyst 3550 (SMI)
    • Cisco CIGESM series Chassis Blades
    • Cisco Catalyst 2960
  2. Foundry
    • Foundry Server Iron
  3. Nortel
    • Nortel Passport 8600
    • Nortel 5520 Ethernet Routing Switch
  4. HP
    • HP Procurve 5406xl

 

Revision 1.6
New additions to this revision ….

  • Support for HP Procurve Switches, ( Tested on the newer versions of HP )
  • combined switch_report.py in port_report.py.
  • Added –verbose flag

Previous Releases….

  • Search by MAC or IP or PORT

 

LD Port Reporter == Download

Sep 102009
 
This new script is for Network Engineers and System Engineers a like. Though I must admit it is more for the System Engineers who do not have access to the command line on the CDP enabled device. Have you ever wanted to know what CDP enabled devces ( and info related to those devices ) that were directly connected to your your Core Switch? But you just do not have the access to get that info. But you do have access to the monitoring system, which has SNMP access to the Core Switch.

Well this is where my script comes into play... Stay tuned for updates, as I'm planning on adding to this script. So you can run it with the detail option and a detail port option. Please post any support related question in the forums here..http://www.linuxdynasty.org/forums/Scripting/scripting/sh_cdp_neighbor_help

Revision 1.2 9/13/2009
  • Catch all CDP connected switches, even if there is more then 1 switch seen through 1 port.

Revision 1.1 9/11/2009

  • Added –type option ( –type=detail )
Revision 1.0 9/10/2009
  • This script is the equivalent of sho cdp nei on a cisco switch, but this is using snmp.
When you log into a switch and run a show cdp neighbor, your info might look a little like this.. show cdp neighborCapability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone Device ID Local Intrfce Holdtme Capability Platform Port ID71_5th_SW1 Gig 10/15 145 S I WS-C2960G-Gig 0/48D_M1001_V180_SW1 Gig 1/42 132 S I WS-C2960G-Gig 0/1D_M1001_V181_SW1 Gig 1/46 136 S I WS-C2960G-Gig 0/1D_M1001_V181_SW2 Gig 1/47 166 S I WS-C2960G-Gig 0/1D_M1001_V180_SW3 Gig 1/43 147 S I WS-C2960G-Gig 0/1D_M1001_V181_SW3 Gig 1/48 158 S I WS-C2960G-Gig 0/1D_M1001_V180_SW2 Gig 1/41 141 S I WS-C2960G-Gig 0/1D_M1001_V181_SW4 Gig 1/44 179 S I WS-C2960G-Gig 0/1D_M1001_V180_SW4 Gig 1/40 145 S I WS-C3560G-Gig 0/1D_M701_V177_SW4 Gig 10/7 174 S I WS-C2970G-Gig 0/25D_M701_V177_SW1 Gig 10/6 154 S I WS-C2970G-Gig 0/25Router Gig 10/1 162 R S WS-C6513 Gig 9/9Router1 Gig 10/14 168 R S WS-C6513 Gig 9/1679_18th_Fl_SW1 Gig 10/12 174 S I WS-C2960G-Gig 0/48D_1700_V187_SW1 Gig 10/13 129 S I WS-C3560G-Gig 0/28D_1700_V187_SW3 Gig 10/10 146 S I WS-C2960G-Gig 0/48D_1700_V187_SW2 Gig 10/9 148 S I WS-C2960G-Gig 0/48D_522_V176_SW1 Gig 10/3 121 S I WS-C2970G-Gig 0/25D_522_V176_SW4 Gig 10/4 125 S I WS-C2970G-Gig 0/25D_CL001_V200_SW1 Gig 10/11 125 S I WS-C2960G-Gig 0/242W_4507R Gig 7/2 147 R S I WS-C4507R Gig 3/9

Now this is how it will look if you run sh_cdp_neighbor.py script…

Continue reading “HowTo get CDP neighbor information through Python and SNMP” »

Sep 082009
 
This Expect script takes as it’s argument, the IP Address of an IOS device that is using AAA Authentication (Username/Password), and returns the OSPF Neighbors of the device.
Usage: ospf_neighbors_script ip address
The script also creates a file with the OSPF Neighbors in the directory it’s run from. The format is “ip address-ospf_neighbors”,
{quickdown:47}
kshort@LinuxStudent:~$ ospf_neighbors_script 10.255.0.26
Username? kshort
Password?
Trying 192.168.0.26…
Connected to 192.168.0.26.
Escape character is ‘^]’.

User Access Verification

Username: kshort
Password:

Test-Router#terminal length 0
Test-Router#sho ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       0   FULL/  -        00:00:38    192.168.0.85     Serial1/0.2
192.168.2.1       0   FULL/  -        00:00:38    192.168.0.25     Serial1/0.1
192.168.3.1       1   FULL/BDR        00:00:39    192.168.2.70     GigabitEthernet0/1
192.168.4.1       1   FULL/BDR        00:00:38    192.168.2.66     GigabitEthernet0/0
Test-Router#


Warning: fopen(/home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.