Page 1 of 1

Backingup Cisco Devices with TFTP

Posted: Tue Oct 31, 2006 5:58 pm
by Red Squirrel
Backing up Cisco Devices with tftp

To get TFTP to work on fedora, install it, and ensure the file /etc/xinetd.d/tftp looks as follows:


# default: off
# description: The tftp server serves files using the trivial file transfer \n# protocol. The tftp protocol is often used to boot diskless \n# workstations, download configuration files to network-aware printers, \n# and to start the installation process for some operating systems.
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s /var/tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}

The –c is especially important as it allows tftp to be writable.

Ensure the directory is chmodded to 777:

[root@dracorp root]# Chmod 777 /var/tftpboot

Test it to see if you can transfer a file through the server:

[root@dracorp root]# tftp 203.203.203.100
tftp> put testfile
Sent 77 bytes in 0.0 seconds

To save router config to tftp On the cisco router issue these commands:

testrouter#copy run tftp://203.203.203.100
Address or name of remote host [203.203.203.100]?
Destination filename [running-config]? cisconet.cfg
!!
534 bytes copied in 5.292 secs (106 bytes/sec)
testrouter#


You may also want to do a copy run start to save to the router as well.

To load a config from the tftp server:


Router>enable
Router#copy tftp start
%Error opening tftp://255.255.255.255/network-confg (Timed out)
Address or name of remote host []? 203.203.203.100
Source filename []? netconfig.cfg
Destination filename [startup-config]?
Warning: copying this config directly into nvram from a network server may
cause damage to the startup config. It is advisable to copy the file
into the running-config first, and then save it using copy run start.
Do you still wish to proceed? [no]: y
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
Accessing tftp://203.203.203.100/netconfig.cfg...
Loading netconfig.cfg from 203.203.203.100 (via Ethernet0): !
[OK - 534/1024 bytes]

534 bytes copied in 10.724 secs (53 bytes/sec)

Router#reload






Archived topic from Iceteks, old topic ID:4588, old post ID:36568