Mailing List Archive

patch suggestion for Cisco Mobile Express
Hi

I am using the 3.9 version for backing up Cisco Mobility Express config on a Cisco Aironet 1830.

I was getting random garbage in the config by using

/etc/rancid/rancid.types.base
cisco-wlc8;script;rancid -t cisco-wlc8
cisco-wlc8;login;wlogin
cisco-wlc8;timeout;120
cisco-wlc8;module;ciscowlc
cisco-wlc8;inloop;ciscowlc::inloop
cisco-wlc8;command;ciscowlc::ShowUdi;show udi
cisco-wlc8;command;ciscowlc::ShowSysinfo;show sysinfo
cisco-wlc8;command;ciscowlc::ShowConfig;show run-config commands

changed ShowConfig from run-config commands to

cisco-wlc8;command;ciscowlc::ShowConfig;show run-config startup-commands

But then ended up with new dates on every diff.
Fixed it by patching wlogin
--- cut ---
--- wlogin.bak 2019-10-08 12:14:31.085325057 +0200
+++ wlogin 2019-10-08 12:58:13.325178327 +0200
@@ -684,6 +684,8 @@
for {set i 0} {$i < $num_commands} { incr i} {
send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
+ -re "^# WLC Config Begin.*\r\n" { exp_continue }
+ -re "^# WLC Config End.*\r\n" { exp_continue }
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
}
--- cut ---

Feel free to add this to the upstream code.

BR,
Bjarne



-- 
Bjarne Saltbæk
System Administrator
Sinch Denmark

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: patch suggestion for Cisco Mobile Express [ In reply to ]
Hi again.

I just realized that a patch in ciscowlc.pm would make more sense:

--- cut ---
--- /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm.org 2019-10-08 13:30:29.894650701 +0200
+++ /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm 2019-10-08 13:48:38.125686723 +0200
@@ -137,6 +137,9 @@
next if (/^\s*rogue ap classify/);
next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);
next if (/^\s*interface nat-address management set -?[0-9]{4,}\./);
+ next if (/^\s*Config generation may take some time .../);
+ next if (/^\s*# WLC Config Begin/);
+ next if (/^\s*# WLC Config End/);

$linecnt++;

--- cut ---


-- 
Bjarne Saltbæk
System Administrator
Sinch Denmark

> -----Original Message-----
> From: Bjarne Saltbæk
> Sent: Tuesday, 8 October 2019 13.12
> To: rancid-discuss@shrubbery.net
> Subject: patch suggestion for Cisco Mobile Express
>
> Hi
>
> I am using the 3.9 version for backing up Cisco Mobility Express config on a
> Cisco Aironet 1830.
>
> I was getting random garbage in the config by using
>
> /etc/rancid/rancid.types.base
> cisco-wlc8;script;rancid -t cisco-wlc8
> cisco-wlc8;login;wlogin
> cisco-wlc8;timeout;120
> cisco-wlc8;module;ciscowlc
> cisco-wlc8;inloop;ciscowlc::inloop
> cisco-wlc8;command;ciscowlc::ShowUdi;show udi cisco-
> wlc8;command;ciscowlc::ShowSysinfo;show sysinfo cisco-
> wlc8;command;ciscowlc::ShowConfig;show run-config commands
>
> changed ShowConfig from run-config commands to
>
> cisco-wlc8;command;ciscowlc::ShowConfig;show run-config startup-
> commands
>
> But then ended up with new dates on every diff.
> Fixed it by patching wlogin
> --- cut ---
> --- wlogin.bak 2019-10-08 12:14:31.085325057 +0200
> +++ wlogin 2019-10-08 12:58:13.325178327 +0200
> @@ -684,6 +684,8 @@
> for {set i 0} {$i < $num_commands} { incr i} {
> send -- "[subst -nocommands [lindex $commands $i]]\r"
> expect {
> + -re "^# WLC Config Begin.*\r\n" { exp_continue }
> + -re "^# WLC Config End.*\r\n" { exp_continue }
> -re "\b+" { exp_continue }
> -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
> }
> --- cut ---
>
> Feel free to add this to the upstream code.
>
> BR,
> Bjarne
>
>
>
> --
> Bjarne Saltbæk
> System Administrator
> Sinch Denmark

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: patch suggestion for Cisco Mobile Express [ In reply to ]
Should an autonomous Aeronet AP have its config in rancid through wlc8? I'd had success (years ago, on older version of rancid and AeroOS) with type cisco. If this is a Aeronet AP on a WLC, then wouldn’t simply backing up the WLC be sufficient?
weylin

?On 10/8/19, 7:51 AM, "Bjarne Saltbæk" <Bjarne.Saltbaek@sinch.com> wrote:

Hi again.

I just realized that a patch in ciscowlc.pm would make more sense:

--- cut ---
--- /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm.org 2019-10-08 13:30:29.894650701 +0200
+++ /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm 2019-10-08 13:48:38.125686723 +0200
@@ -137,6 +137,9 @@
next if (/^\s*rogue ap classify/);
next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);
next if (/^\s*interface nat-address management set -?[0-9]{4,}\./);
+ next if (/^\s*Config generation may take some time .../);
+ next if (/^\s*# WLC Config Begin/);
+ next if (/^\s*# WLC Config End/);

$linecnt++;

--- cut ---


--
Bjarne Saltbæk
System Administrator
Sinch Denmark

> -----Original Message-----
> From: Bjarne Saltbæk
> Sent: Tuesday, 8 October 2019 13.12
> To: rancid-discuss@shrubbery.net
> Subject: patch suggestion for Cisco Mobile Express
>
> Hi
>
> I am using the 3.9 version for backing up Cisco Mobility Express config on a
> Cisco Aironet 1830.
>
> I was getting random garbage in the config by using
>
> /etc/rancid/rancid.types.base
> cisco-wlc8;script;rancid -t cisco-wlc8
> cisco-wlc8;login;wlogin
> cisco-wlc8;timeout;120
> cisco-wlc8;module;ciscowlc
> cisco-wlc8;inloop;ciscowlc::inloop
> cisco-wlc8;command;ciscowlc::ShowUdi;show udi cisco-
> wlc8;command;ciscowlc::ShowSysinfo;show sysinfo cisco-
> wlc8;command;ciscowlc::ShowConfig;show run-config commands
>
> changed ShowConfig from run-config commands to
>
> cisco-wlc8;command;ciscowlc::ShowConfig;show run-config startup-
> commands
>
> But then ended up with new dates on every diff.
> Fixed it by patching wlogin
> --- cut ---
> --- wlogin.bak 2019-10-08 12:14:31.085325057 +0200
> +++ wlogin 2019-10-08 12:58:13.325178327 +0200
> @@ -684,6 +684,8 @@
> for {set i 0} {$i < $num_commands} { incr i} {
> send -- "[subst -nocommands [lindex $commands $i]]\r"
> expect {
> + -re "^# WLC Config Begin.*\r\n" { exp_continue }
> + -re "^# WLC Config End.*\r\n" { exp_continue }
> -re "\b+" { exp_continue }
> -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
> }
> --- cut ---
>
> Feel free to add this to the upstream code.
>
> BR,
> Bjarne
>
>
>
> --
> Bjarne Saltbæk
> System Administrator
> Sinch Denmark



_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: patch suggestion for Cisco Mobile Express [ In reply to ]
Sun, Oct 13, 2019 at 09:53:21AM +0000, Piegorsch, Weylin William:
> Should an autonomous Aeronet AP have its config in rancid through wlc8? I'd had success (years ago, on older version of rancid and AeroOS) with type cisco. If this is a Aeronet AP on a WLC, then wouldn’t simply backing up the WLC be sufficient?
> weylin

I can not answer that, but I am curious to see the diff that was produced
prior to this change. Is it possible that it was terminal control characters
causing the changes?

> ?On 10/8/19, 7:51 AM, "Bjarne Saltbæk" <Bjarne.Saltbaek@sinch.com> wrote:
>
> Hi again.
>
> I just realized that a patch in ciscowlc.pm would make more sense:
>
> --- cut ---
> --- /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm.org 2019-10-08 13:30:29.894650701 +0200
> +++ /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm 2019-10-08 13:48:38.125686723 +0200
> @@ -137,6 +137,9 @@
> next if (/^\s*rogue ap classify/);
> next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);
> next if (/^\s*interface nat-address management set -?[0-9]{4,}\./);
> + next if (/^\s*Config generation may take some time .../);
> + next if (/^\s*# WLC Config Begin/);
> + next if (/^\s*# WLC Config End/);
>
> $linecnt++;
>
> --- cut ---
>
>
> --
> Bjarne Saltbæk
> System Administrator
> Sinch Denmark
>
> > -----Original Message-----
> > From: Bjarne Saltbæk
> > Sent: Tuesday, 8 October 2019 13.12
> > To: rancid-discuss@shrubbery.net
> > Subject: patch suggestion for Cisco Mobile Express
> >
> > Hi
> >
> > I am using the 3.9 version for backing up Cisco Mobility Express config on a
> > Cisco Aironet 1830.
> >
> > I was getting random garbage in the config by using
> >
> > /etc/rancid/rancid.types.base
> > cisco-wlc8;script;rancid -t cisco-wlc8
> > cisco-wlc8;login;wlogin
> > cisco-wlc8;timeout;120
> > cisco-wlc8;module;ciscowlc
> > cisco-wlc8;inloop;ciscowlc::inloop
> > cisco-wlc8;command;ciscowlc::ShowUdi;show udi cisco-
> > wlc8;command;ciscowlc::ShowSysinfo;show sysinfo cisco-
> > wlc8;command;ciscowlc::ShowConfig;show run-config commands
> >
> > changed ShowConfig from run-config commands to
> >
> > cisco-wlc8;command;ciscowlc::ShowConfig;show run-config startup-
> > commands
> >
> > But then ended up with new dates on every diff.
> > Fixed it by patching wlogin
> > --- cut ---
> > --- wlogin.bak 2019-10-08 12:14:31.085325057 +0200
> > +++ wlogin 2019-10-08 12:58:13.325178327 +0200
> > @@ -684,6 +684,8 @@
> > for {set i 0} {$i < $num_commands} { incr i} {
> > send -- "[subst -nocommands [lindex $commands $i]]\r"
> > expect {
> > + -re "^# WLC Config Begin.*\r\n" { exp_continue }
> > + -re "^# WLC Config End.*\r\n" { exp_continue }
> > -re "\b+" { exp_continue }
> > -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
> > }
> > --- cut ---
> >
> > Feel free to add this to the upstream code.
> >
> > BR,
> > Bjarne
> >
> >
> >
> > --
> > Bjarne Saltbæk
> > System Administrator
> > Sinch Denmark
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: patch suggestion for Cisco Mobile Express [ In reply to ]
Hi John and all.

A typical garbage would be:

--- cut ---
wlan flexconnect learn-ipaddr 11 enable
hÖJ5hÖJ5
hÖJ5hÖJ5


wlan wmm require 11
--- cut ---

If it is terminal control characters or not I did not spend time to debug.
The easy fix was to switch command and remove the 3 lines

-- 
Bjarne Saltbæk
System Administrator
Sinch Denmark


> -----Original Message-----
> From: john heasley <heas@shrubbery.net>
> Sent: Tuesday, 15 October 2019 01.33
> To: Piegorsch, Weylin William <weylin@bu.edu>
> Cc: Bjarne Saltbæk <Bjarne.Saltbaek@sinch.com>; rancid-
> discuss@shrubbery.net
> Subject: Re: [rancid] patch suggestion for Cisco Mobile Express
>
> Sun, Oct 13, 2019 at 09:53:21AM +0000, Piegorsch, Weylin William:
> > Should an autonomous Aeronet AP have its config in rancid through wlc8?
> I'd had success (years ago, on older version of rancid and AeroOS) with type
> cisco. If this is a Aeronet AP on a WLC, then wouldn’t simply backing up the
> WLC be sufficient?
> > weylin
>
> I can not answer that, but I am curious to see the diff that was produced prior
> to this change. Is it possible that it was terminal control characters causing
> the changes?
>
> > ?On 10/8/19, 7:51 AM, "Bjarne Saltbæk" <Bjarne.Saltbaek@sinch.com>
> wrote:
> >
> > Hi again.
> >
> > I just realized that a patch in ciscowlc.pm would make more sense:
> >
> > --- cut ---
> > --- /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm.org 2019-10-08
> 13:30:29.894650701 +0200
> > +++ /usr/share/perl5/vendor_perl/rancid/ciscowlc.pm 2019-10-08
> 13:48:38.125686723 +0200
> > @@ -137,6 +137,9 @@
> > next if (/^\s*rogue ap classify/);
> > next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);
> > next if (/^\s*interface nat-address management set -?[0-9]{4,}\./);
> > + next if (/^\s*Config generation may take some time .../);
> > + next if (/^\s*# WLC Config Begin/);
> > + next if (/^\s*# WLC Config End/);
> >
> > $linecnt++;
> >
> > --- cut ---
> >
> >
> > --
> > Bjarne Saltbæk
> > System Administrator
> > Sinch Denmark
> >
> > > -----Original Message-----
> > > From: Bjarne Saltbæk
> > > Sent: Tuesday, 8 October 2019 13.12
> > > To: rancid-discuss@shrubbery.net
> > > Subject: patch suggestion for Cisco Mobile Express
> > >
> > > Hi
> > >
> > > I am using the 3.9 version for backing up Cisco Mobility Express config
> on a
> > > Cisco Aironet 1830.
> > >
> > > I was getting random garbage in the config by using
> > >
> > > /etc/rancid/rancid.types.base
> > > cisco-wlc8;script;rancid -t cisco-wlc8
> > > cisco-wlc8;login;wlogin
> > > cisco-wlc8;timeout;120
> > > cisco-wlc8;module;ciscowlc
> > > cisco-wlc8;inloop;ciscowlc::inloop
> > > cisco-wlc8;command;ciscowlc::ShowUdi;show udi cisco-
> > > wlc8;command;ciscowlc::ShowSysinfo;show sysinfo cisco-
> > > wlc8;command;ciscowlc::ShowConfig;show run-config commands
> > >
> > > changed ShowConfig from run-config commands to
> > >
> > > cisco-wlc8;command;ciscowlc::ShowConfig;show run-config startup-
> > > commands
> > >
> > > But then ended up with new dates on every diff.
> > > Fixed it by patching wlogin
> > > --- cut ---
> > > --- wlogin.bak 2019-10-08 12:14:31.085325057 +0200
> > > +++ wlogin 2019-10-08 12:58:13.325178327 +0200
> > > @@ -684,6 +684,8 @@
> > > for {set i 0} {$i < $num_commands} { incr i} {
> > > send -- "[subst -nocommands [lindex $commands $i]]\r"
> > > expect {
> > > + -re "^# WLC Config Begin.*\r\n" { exp_continue }
> > > + -re "^# WLC Config End.*\r\n" { exp_continue }
> > > -re "\b+" { exp_continue }
> > > -re "^\[^\n\r *]*$reprompt" { send_user --
> "$expect_out(buffer)"
> > > }
> > > --- cut ---
> > >
> > > Feel free to add this to the upstream code.
> > >
> > > BR,
> > > Bjarne
> > >
> > >
> > >
> > > --
> > > Bjarne Saltbæk
> > > System Administrator
> > > Sinch Denmark
> >
> >
> >
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss@shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: patch suggestion for Cisco Mobile Express [ In reply to ]
Hi Weylin.

We do not run the AP's as autonomous.
We have Mobility Express (ME) installed on 2 AP's (one primary and one for secondary).
The ME is the WLC and function as a WLC (and needs to be backed up as a WLC).
My guess is that the ME runs as a Docker image on the AP's (it has its own IP and web interface separated from the AP's).



-- 
Bjarne Saltbæk
System Administrator
Sinch Denmark

> -----Original Message-----
> From: Piegorsch, Weylin William <weylin@bu.edu>
> Sent: Sunday, 13 October 2019 11.53
> To: Bjarne Saltbæk <Bjarne.Saltbaek@sinch.com>; rancid-
> discuss@shrubbery.net
> Subject: Re: [rancid] patch suggestion for Cisco Mobile Express
>
> Should an autonomous Aeronet AP have its config in rancid through wlc8? I'd
> had success (years ago, on older version of rancid and AeroOS) with type
> cisco. If this is a Aeronet AP on a WLC, then wouldn’t simply backing up the
> WLC be sufficient?
> weylin
>

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss