Please consider reading "How (Not) To Ask A Question" before your next post. Especially the part about formatting. I'm having a real tough time reading your post.

I'm at a loss for understanding what you mean by "virtual router" in your post. Is this some entity that exists only in software? Secondly, the "system" function may not be what you need to make things happen. Normally (and I've done this quite a bit) a router or other network element has a management interface of some sort either via console or some type of web interface.

In the case of a serial console I'd recommend reading up on the CPAN modules Net::Telnet and/or Net::Telnet::Cisco. These modules do an excellent job of allowing one to programatically manipulate a router.

In the case of a web interface I would look at LWP::UserAgent or WWW::Mechanize but I'll warn you that will be a bit more complicated.

All system() does is send things to the command line from whatever shell you invoked the Perl script from. Unless you are running the Perl code on your router, which would surprise me, this isn't going to have the affect you're after.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

In reply to Re: Configuring static router by blue_cowdawg
in thread Configuring static router by zaki

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.