erase and write CLI ?

Unanswered Question
Dec 21st, 2007

If an admin erase the information in the CLI. Is there any posibility to rebuild this infromation of his last entered commands?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Richard Burts Fri, 12/21/2007 - 05:41

simon

I am not sure that I fully understand the question that you are asking. If an admin has erased information in the config file, and if you get to it while that admin is still logged in, then the history buffer may allow you to recover at least some of the recently entered commands. If you maintain a backup copy of the config on some device outside the router (as is best practice) then you should be able to recover from the backup copy.

I am not clear whether you are talking about erasing things in the running config, or in the startup config, or something else. If they have erased parts of the running config and if the startup config is still intact then you should be able to recover the running config from the startup config. If they have erased the startup config then you can write the startup config from the running config easily. If it is something else then we need some clarification about the issue.

HTH

Rick

simon.dejonghe Fri, 12/21/2007 - 06:12

thx for respond,

What I mean is,

If I build a network and i do the configuration in the CLI of the router. Everything is fine and works. 5 minutes later I switch the DTE en DCE. So the serial interface is now down because the clockrate is wrong... If I check the CLI this command will appear: "%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to down". Now I delete (erase is maby not the correct term) the content of the CLI. So the CLI is now empty... Now my question, If it's possible to rebuild the content of the cli... So i can see my config command + I can see the message "%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to down"

Regards,

Simon

Richard Burts Fri, 12/21/2007 - 06:27

Simon

If I am understanding your question correctly then when the CLI is empty you should be able to use the up arrow (or the CTL P keystroke combination) to display previous commands. The router maintains a history buffer of recently executed commands (containing 10 commands by default) which you should be able to recall.

HTH

Rick

simon.dejonghe Fri, 12/21/2007 - 06:47

That's true, but is there any way to recall messages from the IOS? for example "%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to down"

Regards,

Simon

Richard Burts Fri, 12/21/2007 - 08:55

Simon

Apparently I still had not understood your question well in my previous response. So with a new understanding let me try again. The messages such as %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to down are written to syslog. Depending on how you have configured syslog processing on the router you may be able to recall these messages or you may not. The easiest answer is that if you have configured logging buffered, then these messages are in the buffer established for syslog messages. You can display the content of the buffer using the command: show log. Note that the logging buffer is treated as a circular buffer and newer messages over-write the oldest messages. So depending on the size that you configure for the buffer, and the volume of messages being generated there is a time limit for how long these messages will remain available in the buffer.

Another possibility is that you can write the syslog messages to a syslog server in your network. If the messages have been written to the server then you may be able to get copies of the messages from the server.

HTH

Rick

simon.dejonghe Fri, 12/21/2007 - 09:51

Idd that is what i mean :)

thx for info man:)

I tried in Packet Tracer 4.1 but He gives a fault...

Router(config)#logging 192.168.1.10

^

% Invalid input detected at '^' marker.

Syntax-fault? Or the simulationprogram is not supporting logging?

Regards,

Simon

Richard Burts Fri, 12/21/2007 - 10:11

Simon

I would assume that it is an issue in the simulator. The syntax looks correct to me and should work in an IOS device.

HTH

Rick

Actions

This Discussion