05-05-2008 11:44 AM
Due to a lack of proper command authorization to execute "copy running tftp", I'm using an Expect script to retrieve some IOS configs by reading the "show running" output into expect_out(buffer). The only difference between using this method and copying via tftp appears to be the former yields "banner motd ^C" while the tftp'ed config has "banner motd ". I'm wondering: Would the former cause any problem if it were to be restored to the device? Is there any way to rectify this discrepany with Expect?
Solved! Go to Solution.
05-05-2008 12:25 PM
Yi
That character is the delimiter for the banner. (the delimiter marks where the banner starts and where it ends). show running will show the delimiter as ^C while the TFTP version has some unprintable character.
The effect of using the Expect output and restoring it to the device is that the parser will see ^C and will interpret ^ as the delimiter and will put the C as the first character of the banner, which results in an extra letter showing up at the beginning of the banner which was not in the original. Whether that is a problem or not depends on how sensitive management is to a slight addition to the banner.
HTH
Rick
05-05-2008 12:25 PM
Yi
That character is the delimiter for the banner. (the delimiter marks where the banner starts and where it ends). show running will show the delimiter as ^C while the TFTP version has some unprintable character.
The effect of using the Expect output and restoring it to the device is that the parser will see ^C and will interpret ^ as the delimiter and will put the C as the first character of the banner, which results in an extra letter showing up at the beginning of the banner which was not in the original. Whether that is a problem or not depends on how sensitive management is to a slight addition to the banner.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide