Options

Line Breaks / Carridge Returns in Config?

aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
Hello,

I have a 2511 access router and would like to set it up using an example config I found on these forums (posted by wildfire, thank you very much)... My only problem is the config posted has carridge returns in it, and when I send the file to the terminal via hyperterminal / teraterm it just doesn't compute with the router and throws up a load of errors.

Anyone know how to go about sending the config to the router with carrige returns / line breaks in things like the message of the day -- The config I'm using can be found here:

http://www.techexams.net/forums/viewtopic.php?p=55047#55047

TIA,

Aidan.

Comments

  • Options
    sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    I'm not sure if this is what you are running into, but I know it stumped me when uploading some configs to a PIX. If I used a config made in Vi or Wordpad it worked fine, but if I used notepad it did not. Like you mentioned, it has to do with the "return" key interpretation.

    I forget which editor used what, but basically one used an EOL followed by CR (end of line/carriage return) while the other only used the EOL.
    All things are possible, only believe.
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    That'd make sense, anyone else able to shed a little more light?

    Thanks for the reply.
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    After a lot of googling... I still can't find an answer to this one - anyone got any suggestions?

    Aidan.
  • Options
    sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    Did you copy/paste from wildfire's post directly to hyperterminal? Did you send as a text file? What method did you use, exactly? Thanks.
    All things are possible, only believe.
  • Options
    bighornsheepbighornsheep Member Posts: 1,506
    I didn't think wordpad/notepad would make a difference because Windows uses UTF encoding by default. You should use a text editor that can encode in ASCII (I've been using EditPad with no problems)
    Jack of all trades, master of none
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    I've tried taking wildfire's post and sending to console by right clicking in hyperterminal / send to console... and also by sending a text file by copying from the post and pasting into notepad, then sending to the console... neither method works icon_sad.gif

    Hope this answers your question,

    Aidan.
  • Options
    tech-airmantech-airman Member Posts: 953
    I've tried taking wildfire's post and sending to console by right clicking in hyperterminal / send to console... and also by sending a text file by copying from the post and pasting into notepad, then sending to the console... neither method works icon_sad.gif

    Hope this answers your question,

    Aidan.

    aidanhammond,

    Each line in either startup_config or running_config is the result of either default, manual configuration of each item, or a configuration download to the networking device. As you're learning, cut & paste configuration doesn't work.

    Before you venture forth into "instantly configuring" a terminal server, I think you need to learn what the following modes are:
    1. User EXEC Mode
    2. Priviledged EXEC Mode

    Post back when you've learned what those modes are.
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    ... As this is a forum to share knowledge, and this question has stumped a few other users, maybe you'd be so kind to share the answer to the question and so assisting not just me, but other members of the forum.
  • Options
    mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    when I send the file to the terminal via hyperterminal / teraterm it just doesn't compute with the router and throws up a load of errors.
    I agree with tech-airman -- it sounds like you didn't go into config mode.

    If that's not the case, copy and past your output from hyperterm showing the errors.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    I can assure you I was in config mode... it applys the config right up to the first line break in which case it cancels back to #, by that I mean IP addresses, interface names, hostname etc etc etc are all set... It follows the config until the first line break.

    I'm afraid I'm not with the kit at the moment, once I am I'll record the session and post the result.

    Aidan.
  • Options
    NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    Have you tried copying and pasting the whole config into notepad and then modify the config so that it is only commands. Delete all the exclamation points and everything that is not a command. Then copy and paste little pieces of the config at a time. IF you try pasting 2 or 3 pages of config into the CLI, it's gonna screw it up.

    We had a technician come in one day when we went live on frame-relay that was trying to do that. He was trying to copy and paste 2 and 3 pages at a time of all kinds of VOIP and DID numbers, and he was wondering why the config wasn't loading correctly.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    When I copy and paste (which I try to never do because of problems like this) I always use notepad. Like Netstudent said to it piece by piece that way if there is a problem it won't mess up the whole config.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    Also I hope you are not trying to put the whole thin in there, some of that is not a config!
    An expert is a man who has made all the mistakes which can be made.
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    I am doing it bit by bit... for instance, the banner motd won't go in when there is a line break... how do you guys over come this - how do you put a line break in when trying to write a multi-line message?

    Aidan.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    Did you put it in notepad?
    An expert is a man who has made all the mistakes which can be made.
  • Options
    wait2dominatewait2dominate Member Posts: 74 ■■□□□□□□□□
    I think what he is running into is that the banner is to long for one line....

    I.E.

    banner motd % Authorized personel only. This is a secure system that you are not allowed to access without proper authorization from a network administrator. If you do not have this access, exit the system or you will be prosecuted %

    Such that the word not is on an additional line in the config that has been posted from a sh run command.

    In any situation, I would end up placing the config in notepad nad editing it into one line without a carrage return, as this should clear up the issue.
    Brake lights are a sign your car doesn't handle well enough.

    CCNP or MCSE is next to come.
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    What I'd like to do is put carridge returns in my config... so i can set the banner motd to say:

    Hello this is my router
    my very special router
    this is on many lines.

    rather than:

    Hello this is my router my very special router this is on many lines.

    Hope this clarifys what I am trying to do...

    Aidan.
  • Options
    NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    or you could always just do the banner manually.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • Options
    aidanhammondaidanhammond Member Posts: 13 ■□□□□□□□□□
    Netstudent... What a wonderful suggestion, but how do you do line breaks / carridge returns?

    Either way, pasting or typing from scratch it'll still bring me back to my original question...

    Aidan.
  • Options
    sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    All right, maybe a long shot as I have not tested this, but I found here:

    http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hcf_c/cfch_bk.pdf
    Changing the End-of-Line Character
    The end of each line typed at the terminal is ended with a CR+LF (Carriage Return plus Line Feed) signal. The CR+LF signal is sent when a user presses Enter or Return. To cause the current terminal line to send a CR signal as a CR followed by a NULL instead of a CR followed by a line feed (LF), use the following command in EXEC mode:
    Router> terminal telnet transparent
    

    Causes the current terminal line to send a CR signal as a CR followed by a NULL instead of a CR followed by an LF.

    This command ensures interoperability with different interpretations of end-of-line handling in the
    Telnet protocol specification.
    All things are possible, only believe.
Sign In or Register to comment.