<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Valentino Vaia</b> <span dir="ltr"><<a href="mailto:valvai81@gmail.com">valvai81@gmail.com</a>></span><br>
Date: 2010/1/29<br>Subject: Re: [rancid] Rancid & Enterasys B2/B3/N3/N7 switch<br>To: <a href="mailto:relychaure@free.fr">relychaure@free.fr</a><br><br><br><br><br><div class="gmail_quote">2010/1/29 <span dir="ltr"><<a href="mailto:relychaure@free.fr" target="_blank">relychaure@free.fr</a>></span><div>
<div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Selon Valentino Vaia <<a href="mailto:valvai81@gmail.com" target="_blank">valvai81@gmail.com</a>>:<br>
<br>
><br>
><br>
><br>
><br>
</div><div><div></div><div>> Il giorno 29/gen/2010, alle ore 15.52, <a href="mailto:relychaure@free.fr" target="_blank">relychaure@free.fr</a> ha scritto:<br>
><br>
> ><br>
> >> in this way in the bin directory you will find a file named<br>
> >> 192.168.1.1.new with the output of the B2login script.<br>
> >> You receive a login timeout from the B2rancid, have you added in the<br>
> >> .clogin.rc file the username and the password of the switch?<br>
> >> for example:<br>
> >> add user 192.168.1.1 your-username<br>
> >> add userpassword 192.168.1.1 your-password<br>
> >><br>
> >><br>
> >><br>
> >><br>
> ><br>
> > No problem to login, .clogin.rc file is ok.<br>
> ><br>
> > rancid@nsradminfedlog:~/bin$ PATH=$PATH:/home/rancid/bin<br>
> > rancid@nsradminfedlog:~/bin$ ./B2rancid -d 192.168.1.1<br>
> > executing B2login -t 90 -c"show config" 192.168.1.1<br>
> > PROMPT MATCH: FED-SW-GSI-003-E1(ro)-><br>
> > HIT COMMAND:FED-SW-GSI-003-E1(ro)->show config<br>
> > In ShowConfig: FED-SW-GSI-003-E1(ro)->show config<br>
> > <a href="http://192.168.1.1" target="_blank">192.168.1.1</a>: End of run not found<br>
> > <a href="http://192.168.1.1" target="_blank">192.168.1.1</a>: End of run not found<br>
> > Error: TIMEOUT reached<br>
> ><br>
> > So I can connect but I have a problem with commands.<br>
> > As I don't have change your script, have you ever had the error ?<br>
> ><br>
> > And 192.168.5.31.new contains :<br>
> > !RANCID-CONTENT-TYPE: Enterasys B2<br>
> > !<br>
> > This command shows non-default configurations only.<br>
> > Use 'show config all' to show both default and non-default<br>
> > configurations.<br>
> > begin<br>
> > !<br>
> > #***** NON-DEFAULT CONFIGURATION *****<br>
> > !<br>
> > !<br>
> > #arp<br>
> > !<br>
> > #arpinspection<br>
> > !<br>
> > #banner<br>
> > !<br>
> > #cdp<br>
> > !<br>
> > #ciscodp<br>
> > !<br>
> > #console<br>
> > !<br>
> > #diffserv<br>
> > !<br>
> > #dhcps<br>
> > !<br>
> > #dhcpsnooping<br>
> > !<br>
> > --More-- <space> next page, <cr> one line, <q> quit<br>
> > Error: TIMEOUT reached<br>
> ><br>
> ><br>
><br>
> Now I understand your problem, I have had the same with allied telesis<br>
> switch. What is your B2's firmware version? I haven't this trouble<br>
> with firmware major than 4. To correct this trouble is necessary<br>
> modify the B2login or change firmware.<br>
><br>
<br>
</div></div>Strange, this B2 switch has a firmware > 4 !!<br>
<div>Chassis Firmware Revision: 04.02.01.0006<br>
</div>But if you have the correction, I'm interested for the other switchs.<br></blockquote><div> </div></div></div><div>I don't understand why yours B2 ask you to press <space>?!? <br>
I have the same firmware and I haven't to press anything?!?<br>
In the script expect B2login you can substitute the procedure run_commands whit this:<br>
<br>
proc run_commands { command } {<br>
global in_proc<br>
set in_proc 1<br>
<br>
set commands [split $command \;]<br>
set num_commands [llength $commands]<br>
for { set i 0 } { $i < $num_commands } { incr i } {<br>
<br>
send "[subst -nocommands [lindex $commands $i]]\r"<br>
expect "->"<br>
expect {<br>
" config" {<br>
send -- " ";<br>
expect {<br>
"<space> next page, <cr> one line, <q> quit " { send -- " "; exp_continue}<br>
"->" { send "\r" }<br>
}<br>
}<br>
"->" { }<br>
}<br>
}<br>
set in_proc 0<br>
}<br>
<br>
<br>
I use a procedure similar for allied telesis and it works.<br>
<br>
After the modification can you post to me the output of?<br>
./B2login -u your-username -p your-password -c "show config" 192.168.5.31<br>
<br>
If the B2login works probably you must change the order of the commands in the command_table in the B2rancid<br>
from this<br>
@commandtable = (<br>
# {'bcc' => 'RunCommand'},<br>
{'show config' => 'ShowConfig'},<br>
{'show version' => 'ShowConfig'},<br>
# {'exit' => 'RunCommand'}<br>
);<br>
to <br>
@commandtable = (<br>
# {'bcc' => 'RunCommand'},<br>
{'show version' => 'ShowConfig'},<br>
{'show config' => 'ShowConfig'},<br>
# {'exit' => 'RunCommand'}<br>
);<br>
<br>
I have done this for Allied switch.<br></div></div><br>
</div>