Mailing List Archive

Rancid with Zebra
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.

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?

Thanks,
Joe
Rancid with Zebra [ In reply to ]
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.
Rancid with Zebra [ In reply to ]
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@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.
Rancid with Zebra [ In reply to ]
On Thu, Oct 18, 2001 at 09:56:40AM -0700, Rizzo, Joe wrote:
> Is anyone using rancid with zebra (www.zebra.org <http://www.zebra.org> )?

Are there any commands you can use from the shell to get into these
various parts of zebra? Then you could do something like:
% ssh unix-host
unix-host% zebra_cli
zebra> show conf
zebra> quit
unix-host% ospfd_cli
ospfd> show conf
ospfd> quit
unix-host% exit

--asp
Rancid with Zebra [ In reply to ]
>From: Rizzo, Joe [mailto:JRizzo at ea.com]
>Is anyone using rancid with zebra (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.

Joe,
doesn't the zebra vtysh daemon provide the ability to get to all the routing
protocol daemon cli from a single interface (listening on a single port)?

it's been awhile since i looked at zebra, but the last i remembered, someone
was asking for zebra to include "end" at the end of "write term", so that
RANCID would treat it like a cisco; presumably they were not having problems
getting RANCID to talk to zebra's CLI, so perhaps they were using vtysh to
do this.

-amf
Rancid with Zebra [ In reply to ]
I will have to verify. Maybe that is the way to go.

Thanks for the advice.
Joe

-----Original Message-----
From: Andrew Fort [mailto:afort@staff.webcentral.com.au]
Sent: Friday, October 19, 2001 1:00 AM
To: 'Rizzo, Joe'; rancid-discuss at shrubbery.net
Subject: RE: Rancid with Zebra

>From: Rizzo, Joe [mailto:JRizzo at ea.com]
>Is anyone using rancid with zebra (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.

Joe,
doesn't the zebra vtysh daemon provide the ability to get to all the
routing
protocol daemon cli from a single interface (listening on a single
port)?

it's been awhile since i looked at zebra, but the last i remembered,
someone
was asking for zebra to include "end" at the end of "write term", so
that
RANCID would treat it like a cisco; presumably they were not having
problems
getting RANCID to talk to zebra's CLI, so perhaps they were using vtysh
to
do this.

-amf