Rancid with Zebra

Alex Bochannek ABochannek at yipes.com
Thu Oct 18 22:00:38 UTC 2001


How about this:

bash-2.03$ diff -c clogin clogin.new 
*** clogin      Wed Oct 17 13:23:17 2001
--- clogin.new  Thu Oct 18 14:58:23 2001
***************
*** 286,295 ****
      # try each of the connection methods in $cmethod until one is
successful
      set progs [llength $cmethod]
      foreach prog [lrange $cmethod 0 end] {
!       if ![string compare $prog "telnet"] {
!           if [ catch {spawn telnet $router} reason ] {
!               send_user "\nError: telnet failed: $reason\n"
!               exit 1
            }
        } elseif ![string compare $prog "ssh"] {
            if [ catch {spawn ssh -c $cyphertype -x -l $user $router} reason
] {
--- 286,297 ----
      # try each of the connection methods in $cmethod until one is
successful
      set progs [llength $cmethod]
      foreach prog [lrange $cmethod 0 end] {
!       if [string match "telnet*" $prog] {
!             regexp {telnet(:(\d+))*} $prog command suffix port
!             if {$port == ""} { set port 23 }
!           if [ catch {spawn telnet $router $port} reason ] {
!              send_user "\nError: telnet failed: $reason\n"
!                exit 1
            }
        } elseif ![string compare $prog "ssh"] {
            if [ catch {spawn ssh -c $cyphertype -x -l $user $router} reason
] {

Alex Bochannek 
Senior Unix/Network Engineer 
Yipes ... that's fast! 
(415) 901-2000 
(415) 901-2090 (direct) 
www.yipes.com
 

 -----Original Message-----
From: 	john heasley [mailto:heas at shrubbery.net] 
Sent:	Thursday, October 18, 2001 10:03 AM
To:	Rizzo, Joe
Cc:	rancid-discuss at shrubbery.net
Subject:	Re: Rancid with Zebra

Thu, Oct 18, 2001 at 09:56:40AM -0700, Rizzo, Joe:
> Is anyone using rancid with zebra (www.zebra.org <http://www.zebra.org> )?
> 
> The interface looks and feels like Cisco IOS.  The problem is that zebra
> listens on tcp port 2601.  Each routing protocol daemon listens on a
unique
> port as well.  Example: ospfd listens on 2604. 
> 
> To completely pull the zebra configs, rancid would need to login to the
same
> system on multiple ports. 
> 
> I could make zebra listen on port 23, but then ospfd, ripd, bgpd, etc
would
> have to listen on another port.

havent used it; but that's nasty.  i've used mrt, but didnt occur to me
to run rancid against since it did poorly with heavy bgp load.  mrt should
collect as :cisco:, since iirc it's identical to the cisco ui.

> I could have 2 hostnames for the system:
> 10.1.1.1 vpn01_zebra vpn01_ospfd
> 
> Then have multiple entries in router.db:
> vpn01_zebra:cisco:up
> vpn01_ospfd:cisco:up
> 
> But, how could I tell rancid to use port 2601 rather that port 23 to
telnet
> to certain hosts?

can't at the moment.  suspect something like

.cloginrc:
add method *	{telnet:24}	{ssh:19}

would be a good way to deal with it.



More information about the Rancid-discuss mailing list