As a matter of fact I do have experience with Net::Telnet::Cisco in particular and telnet'ing into routers and switches.

A while back I wrote a rather convoluted and re-entrant script to update our MAC address pools in QIP.

Just as an aside: QIP as an IP address management product sucks. It just sucks less than its competition.

The way my script worked was when run on a machine it first looked at the routing table on that machine and figured out what the default router was. The default route could actually be a switch.

Then we dumped the arp cache for that device and stored it and then dumped the devices routing table to find its neighbors. Then for each neighbor we recursed until we ran out of unique neighbors and had the whole list of ARP addresses for the enterprise.

Doing this not only allowed us to update our global MAC pools, but it help us discover routers and switches that were not supposed to be there. After all this is a school campus and college students will play!

Net::Telnet::Ciso worked very will for this. What I did discover though was I had to make my login algorithm somewhat intelligent because different devices posed different behavior upon login so my script had to be sensitive to that.


Peter L. BergholdBrewer of Belgian Ales
Peter@Berghold.Netwww.berghold.net
Unix Professional

In reply to Re: Telnet into Cisco switches by blue_cowdawg
in thread Telnet into Cisco switches by primus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.