Mailing List Archive

Pushing config changes
All,

I'm new to RANCID (and UNIX for that matter) and need help with RANCID.
I have successfully issued the following command to add a configuration
change to a single Juniper router:

$ jlogin -x ./Update_File/Policy_1 192.168.100.1

What I need to do is push this file to ~80 additional devices. Is there
a way to have a host list used rather than just the single host of
192.168.100.1?

Thanks for any help you can offer!

--
Daniel Evans <zpiggy1 at skwire.net>
Pushing config changes [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

it isn't pretty (mostly because my scripting is limited), but it
works:

- - create a file with a list of all the ip addresses
- - have your ready-made config changes in a file

for routers in `cat /rancid/router.list`
do
jlogin -x /Update_File/Policy_1 $routers
done

hth

/joshua

> >-----Original Message-----
> >From: Daniel Evans [mailto:zpiggy1 at skwire.net]
> >Sent: Friday, January 09, 2004 09:56
> >To: RANCID
> >Subject: Pushing config changes
> >
> >
> >All,
> >
> >I'm new to RANCID (and UNIX for that matter) and need help
> >with RANCID.
> >I have successfully issued the following command to add a
> >configuration
> >change to a single Juniper router:
> >
> >$ jlogin -x ./Update_File/Policy_1 192.168.100.1
> >
> >What I need to do is push this file to ~80 additional
> >devices. Is there
> >a way to have a host list used rather than just the single host of
> >192.168.100.1?
> >
> >Thanks for any help you can offer!
> >
> >--
> >Daniel Evans <zpiggy1 at skwire.net>
> >
> >

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBP/7Che4482rKSzocEQJvfwCfX6G7iXzXwImDe1nlhe8+1oSTmkYAn375
w8bYnhp8u+QGv12mWDsrrzcN
=s+Yx
-----END PGP SIGNATURE-----
Pushing config changes [ In reply to ]
Hi,

Joshua Sahala <JSahala at fusiontel.com> writes:
> it isn't pretty (mostly because my scripting is limited), but it
> works:
>
> for routers in `cat /rancid/router.list`
> do
> jlogin -x /Update_File/Policy_1 $routers
> done

I just keep it all on the command line, and also pipe it to tee so that I
can go back and see what happened if something goes wrong.

$ jlogin -x ./Update_File/Policy_1 `cat /rancid/router.list` | tee Policy_1-output


Cheers,

Alastair
Pushing config changes [ In reply to ]
Thanks for the quick help. I'll give this a shot...


On Fri, 9 Jan 2004 10:02:29 -0500
Joshua Sahala <JSahala at fusiontel.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> it isn't pretty (mostly because my scripting is limited), but it
> works:
>
> - - create a file with a list of all the ip addresses
> - - have your ready-made config changes in a file
>
> for routers in `cat /rancid/router.list`
> do
> jlogin -x /Update_File/Policy_1 $routers
> done
>
> hth
>
> /joshua
>
> > >-----Original Message-----
> > >From: Daniel Evans [mailto:zpiggy1 at skwire.net]
> > >Sent: Friday, January 09, 2004 09:56
> > >To: RANCID
> > >Subject: Pushing config changes
> > >
> > >
> > >All,
> > >
> > >I'm new to RANCID (and UNIX for that matter) and need help
> > >with RANCID.
> > >I have successfully issued the following command to add a
> > >configuration
> > >change to a single Juniper router:
> > >
> > >$ jlogin -x ./Update_File/Policy_1 192.168.100.1
> > >
> > >What I need to do is push this file to ~80 additional
> > >devices. Is there
> > >a way to have a host list used rather than just the single host of
> > >192.168.100.1?
> > >
> > >Thanks for any help you can offer!
> > >
> > >--
> > >Daniel Evans <zpiggy1 at skwire.net>
> > >
> > >
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBP/7Che4482rKSzocEQJvfwCfX6G7iXzXwImDe1nlhe8+1oSTmkYAn375
> w8bYnhp8u+QGv12mWDsrrzcN
> =s+Yx
> -----END PGP SIGNATURE-----

--
Daniel Evans <zpiggy1 at skwire.net>
Pushing config changes [ In reply to ]
under bash:

$ clogin -x config_file $(cat routers_list_file)
Pushing config changes [ In reply to ]
Fri, Jan 09, 2004 at 10:02:29AM -0500, Joshua Sahala:
> it isn't pretty (mostly because my scripting is limited), but it
> works:
>
> - create a file with a list of all the ip addresses
> - have your ready-made config changes in a file
>
> for routers in `cat /rancid/router.list`
> do
> jlogin -x /Update_File/Policy_1 $routers
> done

or

for routers in `cat /usr/local/rancid/*/router.db | grep :rancid:up | cut -d' ' -f 1`
do
echo $routers >> log
jlogin ... $routers >> log
done
Pushing config changes [ In reply to ]
All,

Thanks! It's working exactly like I need it to!

-Daniel


On Fri, 9 Jan 2004 17:53:44 +0200
"Yuval Ben-Ari" <yuvalba at netvision.net.il> wrote:

> under bash:
>
> $ clogin -x config_file $(cat routers_list_file)
>

--
Daniel Evans <zpiggy1 at skwire.net>