02-16-2011 01:44 PM - edited 03-01-2019 04:37 PM
Your kron job will do a copy run start( or wr mem) every fortnight but will never write the running config to the tftp server.
If you want to do this with a kron job you'll have to issue following command in your kron policy: cli show run | redirect tftp:/172.16.0.30/xxx
But then no more need for the archive command.
Regards.
Alain.
Hi Alain,
YES you are right "never write the running config to the tftp server". I knew about this
I was not aware of redirect command.. i tried to configure redirect and remove archive configuration but it didnot work for me
Check my TFTP server logs.
Write request for file <BACKUP>. Mode octet [15/02 15:36:34.359]
Using local port 1449 [15/02 15:36:34.359]
<BACKUP>: rcvd 0 blk, 0 bytes in 1 s. 0 blk resent [15/02 15:36:35.359]
Thanks & Regards
Ahmed...
Hi,
Can you post output of sh run | be kron and also while kron is active the ouput of debug ip packet 101
where 101 is ACl like this access-list 101 permit udp host "your router IP" host "your tftp server IP".
Regards.
Alain.
Router#sh run | be kron
kron occurrence BACKUP at 20:45 recurring
policy-list BACKUP
!
kron policy-list BACKUP
cli sh run | redirect tftp://172.16.0.30/TFTP
Feb 15 17:45:59.800: IP: tableid=0, s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), routed via FIB
Feb 15 17:45:59.800: IP: s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), len 41, sending
Feb 15 17:46:02.425: IP: tableid=0, s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), routed via FIB
Feb 15 17:46:02.425: IP: s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), len 544, sending
Feb 15 17:46:05.425: IP: tableid=0, s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), routed via FIB
Feb 15 17:46:05.425: IP: s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), len 544, sending
Feb 15 17:46:09.425: IP: tableid=0, s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), routed via FIB
Feb 15 17:46:09.425: IP: s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), len 544, sending
Feb 15 17:46:14.425: IP: tableid=0, s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), routed via FIB
Feb 15 17:46:14.425: IP: s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), len 544, sending
Feb 15 17:46:20.425: IP: tableid=0, s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), routed via FIB
Feb 15 17:46:20.425: IP: s=172.16.0.1 (local), d=172.16.0.30 (FastEthernet0/0.1), len 544, sending
Feb 15 17:46:27.425: %SYS-3-URLWRITEFAIL: redirection url write failed 'Timed out'
TFTP SERVER LOGS
Connection received from 172.16.0.1 on port 52956 [15/02 20:45:56.078]
Write request for file <TFTP>. Mode octet [15/02 20:45:56.078]
Using local port 1167 [15/02 20:45:56.093]
<TFTP>: rcvd 0 blk, 0 bytes in 1 s. 0 blk resent [15/02 20:45:57.093]
interstingly routers CPU goes up to 70%.
When i tried first time, i crashed my router and had to reconfigure again.
Thanks & Regards
Ahmed...
NOTE:dont look at debug time as i forgot to configure timestamp debug command after restoring my router config
Hi,
Can you try a copy run tftp://172.16.0.30 and if it fails can you sniff with wireshark or another software on the tftp server then send pcap file.
if it's ok then retry the kron and sniff on tftp server.
Regards.
Alain.
Hi Alain,
copy tftp was successful. but when i ran wireshark over TFTP server while configuring kron on my router, i got unusual error.few lines of my router were being sent to TFTP server repeatedly and i could see TFTP server received it properly but i could see ICMP Destination unreachable (port unreachable ) from TFTP server to router.
Actually in my pcap file which i ran on my server includes all other sensitives information, so i cant share that file here, please check the screenshots of it.
Thanks
hi,
Can you do the same when doing the copy tftp command and then compare the 2 ways to see any difference.
I don't understand why it's working with the copy command and not with the kron policy.
Regards.
Alain.
Hi,
I pointed out my issue, actually i have configured my NIC of server to be trunk port (intel VLANs option). when i tried same kron configuration to my notebook it worked as desired.
Thanks for i can use ths command for other devices as well.
This document was generated from the following thread: Archive command not backing up the config
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: