Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Blue

Significance of ^C char around MOTD in IOS config?

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: Significance of ^C char around MOTD in IOS config?

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 REPLY
Hall of Fame Super Silver

Re: Significance of ^C char around MOTD in IOS config?

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

203
Views
0
Helpful
1
Replies