Significance of ^C char around MOTD in IOS config?

Answered Question
May 5th, 2008
User Badges:
  • Gold, 750 points or more

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?



Correct Answer by Richard Burts about 9 years 3 weeks ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Richard Burts Mon, 05/05/2008 - 12:25
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

Actions

This Discussion