Mailing List Archive

How to extract all routes?
Hi all,

Greetings :)

I would like to extract all routes from m20 for analysis. Has anyone done
this before? Any way to dump all routes and tftp to a server?

Thanks,
Wei Keong
How to extract all routes? [ In reply to ]
On Thu, 4 Mar 2004, Wei Keong wrote:
> I would like to extract all routes from m20 for analysis. Has anyone done
> this before? Any way to dump all routes and tftp to a server?

Run 'start shell', create a nice script which does some nice commands,
like, 'cli show route', redirected to a file, and run tftp to upload
them. Put the script in cron.

Been there, done that, wrote a Master's Thesis based on the
information gathered :-)

(make sure of redirecting stdin to /dev/null.)

--
Pekka Savola "You each name yourselves king, yet the
Netcore Oy kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
How to extract all routes? [ In reply to ]
Hi Wei,

Easiest would be to use snmpget/snmpwalk and extract the right OID's
containing statics, BGP etc.

Cheers,

Erik

On Thu, 2004-03-04 at 12:52, Wei Keong wrote:
> Hi all,
>
> Greetings :)
>
> I would like to extract all routes from m20 for analysis. Has anyone done
> this before? Any way to dump all routes and tftp to a server?
>
> Thanks,
> Wei Keong
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp
--
Erik Haagsman
Network Architect
We Dare BV
tel: +31(0)10-7507008
fax: +31(0)10-7507005
http://www.we-dare.nl
How to extract all routes? [ In reply to ]
> Greetings :)

Greetings.

> I would like to extract all routes from m20 for analysis. Has anyone done
> this before? Any way to dump all routes and tftp to a server?

here's one way to do it with ftp...

show route | save ftp://your_user_name@your_host/filename

works with scp as well...

show route | save your_server:filename

I think to do it using tftp would require (as Pekka suggested)
starting a shell, and doing a multi-step.

HTHs.
How to extract all routes? [ In reply to ]
On Thu, 4 Mar 2004 08:24:02 -0500
Dave Curado <davec@weezel.net> wrote:

> I think to do it using tftp would require (as Pekka suggested)
> starting a shell, and doing a multi-step.

A twist to what others have already suggested is to pull the data
rather than push it. You could setup an account on the juniper using
a SSH public key that does not require a password (protect the key!)
and run commands from a remote cron job. You could then do something
like this from script on a management station:

ssh user@juniper.example.com "show route | save ..."
scp user@juniper.example.com:[filename] .

John
How to extract all routes? [ In reply to ]
On 04.03.2004 07:35:53 +0000, John Kristoff wrote:
> On Thu, 4 Mar 2004 08:24:02 -0500
> Dave Curado <davec@weezel.net> wrote:
>
> > I think to do it using tftp would require (as Pekka suggested)
> > starting a shell, and doing a multi-step.
>
> A twist to what others have already suggested is to pull the data
> rather than push it. You could setup an account on the juniper using
> a SSH public key that does not require a password (protect the key!)
> and run commands from a remote cron job. You could then do something
> like this from script on a management station:
>
> ssh user@juniper.example.com "show route | save ..."
> scp user@juniper.example.com:[filename] .

Use the jlogin(1) script from RANCID <http://www.shrubbery.net/rancid/>
and then:

$ /usr/local/rancid/bin/jlogin -c "show route tabel inet.0" -p SECRET -u joe router.example.com | tee output.save

The above will login (telnet or ssh) to the router 'router.example.com'
as joe/SECRET and run the command 'show route tabel inet.0'.

If you're picky about security you can create a login user on
router.example.com, only able to execute allow commands.

/Michael

--
Michael Lyngb?l -- michael at lyngbol dot dk
Network Architect, AS3292 TDC, IP?backbone