Options

Copy config on a Notepad

amb1s1amb1s1 Member Posts: 408
I would like to know if there is a way that I can copy a router config on a notepad, but using a command line. Ex. copy run | notepad. I know that is not a good command but I used it as an example. I know I can use TFTP, but I would like to if there is a simple one line command that I can accomplished this
David G.
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255

Comments

  • Options
    ULWizULWiz Member Posts: 722
    Cant you just cut and past it. I have both my router and my switch copied to a notepad.
    Cant remember exactly how i did it but i am pretty sure i cut and pasted it somehow.

    Actually i think i used hyperterminal connected to the router that way and cut and pasted it from there.
    CompTIA A+ Nov 25, 1997
    CompTIA Network+ March 7, 2008
    MCTS Vista 620 June 14, 2008
    MCP Server 290 Nov 15, 2008
    MCP Server 291 In Progress (Exam 12/28/09)
    Cisco CCENT In Progress
    MCP Server 291 In Progress
    C|EH In Progress
  • Options
    amb1s1amb1s1 Member Posts: 408
    I can copy and paste, but the lines are too long so have to do half and then hit space until it goes to the bottom and then I copy and paste the rest.
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • Options
    larkspurlarkspur Member Posts: 235
    you can use select all.

    from commad prompt telent sessions

    issue sh run

    then space bar until the end of the config appears

    right click in command prompt window

    select all

    hit return ( this copies)

    open notepad

    control v or edit, paste

    hth
    just trying to keep it all in perspective!
  • Options
    NeonNoodleNeonNoodle Member Posts: 92 ■■□□□□□□□□
    See if your terminal emulator will log your session. If it does, start logging and then do a 'show running-config' and then stop logging. I'm not sure if it's the same exact config as you'll get from doing a 'copy run tftp', but it's likely to be close.
    I recognize the lion by his paw.
    --Jacob Bernoulli
  • Options
    amb1s1amb1s1 Member Posts: 408
    When I hit space bar until the end, I see the first line. I know all that my question if there is a command beside TFTP that I can accomplished that
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • Options
    astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    No there is no simple command to copy outside of the router (this is only telnet after all).

    If you're doing this in a command prompt and not in a proper telnet client, click the little [C:\] icon in the top left corner of the window, choose properties, select the layout tab and increase the buffer height to something like 9999 then you can select the line and scroll up to do the copying.

    Or you could just download puTTY or a proper telnet client that will log the session as someone else suggested.
  • Options
    bighornsheepbighornsheep Member Posts: 1,506
    You can use show <command> | redirect <url>

    <command> is the standard command for what you want to see, <url> is the standard IOS file system resource locator. ie. tftp: flash: etc..
    Jack of all trades, master of none
  • Options
    tech-airmantech-airman Member Posts: 953
    amb1s1 wrote:
    I would like to know if there is a way that I can copy a router config on a notepad, but using a command line. Ex. copy run | notepad. I know that is not a good command but I used it as an example. I know I can use TFTP, but I would like to if there is a simple one line command that I can accomplished this

    amb1s1,

    Try typing "#copy run ?" and see what options you have for destinations.
  • Options
    amb1s1amb1s1 Member Posts: 408
    _RTR#sh run ?
    brief configuration without certificate data
    class-map Show class-map information
    flow Global Flow configuration subcommands
    full full configuration
    interface Show interface configuration
    linenum Display line numbers in output
    map-class Show map class information
    policy-map Show policy-map information
    view View options
    vlan Show L2 VLAN information
    | Output modifiers
    <cr>

    _RTR#sh run | ?
    append Append redirected output to URL (URLs supporting append operation
    only)
    begin Begin with the line that matches
    exclude Exclude lines that match
    include Include lines that match
    redirect Redirect output to URL
    section Filter a section of output
    tee Copy output to URL
    David G.
    http://gomezd.com <
    My Tshoot test Blog
    http://twitter.com/ipnet255
  • Options
    joshgibson82joshgibson82 Member Posts: 80 ■■□□□□□□□□
    The easiest way to do this is to issue the "terminal length 0" command...then turn on logging in your putty/crt/whatever window....that will save it out to a file. Then issue the "show run" command and it will copy everything even if it is 100 pages long. You will not have to hit the space bar to get to the end either.

    Thanks
    Josh, CCNP CWNA
  • Options
    gojericho0gojericho0 Member Posts: 1,059 ■■■□□□□□□□
    also, if you are using this to back up a running-config, make sure you explicitly include the "no shut"
    command on your interfaces before you import it otherwise they will be administratively down
  • Options
    tmlerdaltmlerdal Member Posts: 80 ■■□□□□□□□□
    If you have a tftp or ftp server you can copy your config off the router that way:

    copy running-config tftp://xx.xx.xx.xx
  • Options
    KelkinKelkin Member Posts: 261 ■■■□□□□□□□
    gojericho0 wrote:
    also, if you are using this to back up a running-config, make sure you explicitly include the "no shut"
    command on your interfaces before you import it otherwise they will be administratively down

    Looks like someone else got hit by that before :)
  • Options
    Paul BozPaul Boz Member Posts: 2,620 ■■■■■■■■□□
    Man just install a free TFTP server (solarwinds is a good one) and configure your PC with an IP address associated with an interface on your router. Plug your PC into the router's (fast)ethernet port, copy run tftp 192.168.1.2 (address of PC).

    Done.

    Just make sure that the TFTP server isn't set to read-only like most default to.
    CCNP | CCIP | CCDP | CCNA, CCDA
    CCNA Security | GSEC |GCFW | GCIH | GCIA
    pbosworth@gmail.com
    http://twitter.com/paul_bosworth
    Blog: http://www.infosiege.net/
  • Options
    gojericho0gojericho0 Member Posts: 1,059 ■■■□□□□□□□
    Kelkin wrote:
    Looks like someone else got hit by that before :)

    Yup, and it only takes once icon_thumright.gif
  • Options
    tierstentiersten Member Posts: 4,505
    gojericho0 wrote:
    Kelkin wrote:
    Looks like someone else got hit by that before :)

    Yup, and it only takes once icon_thumright.gif
    You usually notice just as you hit the enter key to load it as well icon_redface.gif
  • Options
    KelkinKelkin Member Posts: 261 ■■■□□□□□□□
    Hehe Yea its one of those lessons it only takes once :)
Sign In or Register to comment.