Discussion:
[rancid] Anyway to backup devices with '#' in hostname...other than renaming host?
Jason Humes
2013-08-23 13:22:18 UTC
Permalink
Hi
We've been running with RANCID for a while and have recently come upon a large group of devices we'd like to backup, but they are all numbered with '#' in the hostnames and thus RANCID fails to enter enable mode on these. Is there any way to have RANCID escape the '#' in the hostname?

Thanks

Jason
heasley
2013-08-23 13:27:03 UTC
Permalink
Post by Jason Humes
Hi
We've been running with RANCID for a while and have recently come upon a large group of devices we'd like to backup, but they are all numbered with '#' in the hostnames and thus RANCID fails to enter enable mode on these. Is there any way to have RANCID escape the '#' in the hostname?
put cnames/aliases in your dns/hosts file.
Jason Humes
2013-08-23 13:28:10 UTC
Permalink
Hi
No, I mean the actual device configured hostname...when clogin tries to login, it fails to enter enable mode due to the Switch#1_Site#2 hostname.

Thanks


Jason


-----Original Message-----
From: heasley [mailto:***@shrubbery.net]
Sent: Friday, August 23, 2013 9:27 AM
To: Jason Humes
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Anyway to backup devices with '#' in hostname...other than renaming host?
Post by Jason Humes
Hi
We've been running with RANCID for a while and have recently come upon a large group of devices we'd like to backup, but they are all numbered with '#' in the hostnames and thus RANCID fails to enter enable mode on these. Is there any way to have RANCID escape the '#' in the hostname?
put cnames/aliases in your dns/hosts file.
Jason Humes
2013-08-23 13:44:12 UTC
Permalink
Hahaha, exactly my thoughts!!!

I've written a little script to login to these batch of hosts and update their hostnames replacing the # with _.

Thanks for clearing this up.

Jason

From: bob watson [mailto:***@gmail.com]
Sent: Friday, August 23, 2013 9:43 AM
To: Jason Humes
Cc: heasley; rancid-***@shrubbery.net
Subject: Re: [rancid] Anyway to backup devices with '#' in hostname...other than renaming host?

Jason,

Make life easy for yourself.
RANCID (using PERL and EXPECT) is coded so that RFC 1123 compliant hostnames will be ok. Whoever set the hostname with a # should be sent to CCNA school, or some learning facility that says you can't just dream up esoteric names for devices.


Cheers,

Bob Watson
BAppSci, MACS, CP

<a href="http://au.linkedin.com/in/bobthebaritone">

<img src="Loading Image..." width="160" height="33" border="0" alt="View Robert Watson's profile on LinkedIn">

</a>

On 23 August 2013 23:28, Jason Humes <***@acs.on.ca<mailto:***@acs.on.ca>> wrote:
Hi
No, I mean the actual device configured hostname...when clogin tries to login, it fails to enter enable mode due to the Switch#1_Site#2 hostname.

Thanks


Jason


-----Original Message-----
From: heasley [mailto:***@shrubbery.net<mailto:***@shrubbery.net>]
Sent: Friday, August 23, 2013 9:27 AM
To: Jason Humes
Cc: rancid-***@shrubbery.net<mailto:rancid-***@shrubbery.net>
Subject: Re: [rancid] Anyway to backup devices with '#' in hostname...other than renaming host?
Post by Jason Humes
Hi
We've been running with RANCID for a while and have recently come upon a large group of devices we'd like to backup, but they are all numbered with '#' in the hostnames and thus RANCID fails to enter enable mode on these. Is there any way to have RANCID escape the '#' in the hostname?
put cnames/aliases in your dns/hosts file.
heasley
2013-08-23 13:45:10 UTC
Permalink
Post by Jason Humes
Hi
No, I mean the actual device configured hostname...when clogin tries to login, it fails to enter enable mode due to the Switch#1_Site#2 hostname.
you'd have to alter the regexes in the login script to match the initial
prompt and build the full match regex.

just fix the hostnames.
Post by Jason Humes
Thanks
Jason
-----Original Message-----
Sent: Friday, August 23, 2013 9:27 AM
To: Jason Humes
Subject: Re: [rancid] Anyway to backup devices with '#' in hostname...other than renaming host?
Post by Jason Humes
Hi
We've been running with RANCID for a while and have recently come upon a large group of devices we'd like to backup, but they are all numbered with '#' in the hostnames and thus RANCID fails to enter enable mode on these. Is there any way to have RANCID escape the '#' in the hostname?
put cnames/aliases in your dns/hosts file.
Jason Humes
2013-08-23 13:46:04 UTC
Permalink
Yes, that's what I mean by script...it just automated the process of me re-configing so many devices by hand.

Cheers


Jason
-----Original Message-----
From: heasley [mailto:***@shrubbery.net]
Sent: Friday, August 23, 2013 9:45 AM
To: Jason Humes
Cc: heasley; rancid-***@shrubbery.net
Subject: Re: [rancid] Anyway to backup devices with '#' in hostname...other than renaming host?
Post by Jason Humes
Hi
No, I mean the actual device configured hostname...when clogin tries to login, it fails to enter enable mode due to the Switch#1_Site#2 hostname.
you'd have to alter the regexes in the login script to match the initial prompt and build the full match regex.

just fix the hostnames.
Post by Jason Humes
Thanks
Jason
-----Original Message-----
Sent: Friday, August 23, 2013 9:27 AM
To: Jason Humes
Subject: Re: [rancid] Anyway to backup devices with '#' in hostname...other than renaming host?
Post by Jason Humes
Hi
We've been running with RANCID for a while and have recently come upon a large group of devices we'd like to backup, but they are all numbered with '#' in the hostnames and thus RANCID fails to enter enable mode on these. Is there any way to have RANCID escape the '#' in the hostname?
put cnames/aliases in your dns/hosts file.
bob watson
2013-08-23 13:43:05 UTC
Permalink
Jason,

Make life easy for yourself.
RANCID (using PERL and EXPECT) is coded so that RFC 1123 compliant
hostnames will be ok. Whoever set the hostname with a # should be sent to
CCNA school, or some learning facility that says you can't just dream up
esoteric names for devices.


Cheers,

Bob Watson
BAppSci, MACS, CP

<a href="http://au.linkedin.com/in/bobthebaritone">

<img src="
http://www.linkedin.com/img/webpromo/btn_viewmy_160x33.png" width="160"
height="33" border="0" alt="View Robert Watson's profile on LinkedIn">

</a>
Post by Jason Humes
Hi
No, I mean the actual device configured hostname...when clogin tries to
login, it fails to enter enable mode due to the Switch#1_Site#2 hostname.
Thanks
Jason
-----Original Message-----
Sent: Friday, August 23, 2013 9:27 AM
To: Jason Humes
Subject: Re: [rancid] Anyway to backup devices with '#' in
hostname...other than renaming host?
Post by Jason Humes
Hi
We've been running with RANCID for a while and have recently come upon a
large group of devices we'd like to backup, but they are all numbered with
'#' in the hostnames and thus RANCID fails to enter enable mode on these.
Is there any way to have RANCID escape the '#' in the hostname?
put cnames/aliases in your dns/hosts file.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...