In linux, use TFTP to back up information about Cisco routers-Linux Enterprise applications-Linux server applications. The following is a detailed description. TFTP is the simplest network protocol used to download remote files. It is implemented through UDP.
The tftp development environment for Embedded linux includes two aspects:
First, tftp-server support for linux servers.
Second, tftp-client Support for the Embedded Target System.
The following describes the configuration of tftp-server on the linux server. On the fourth disk of redhat as 4.6, there is a tftp-server Installation rpm package.
(1) Installation
# Mount? T iso9660/dev/hdc/mnt/cdrom // attach a cd
(2) in linux, no matter which super-server, inetd, or xinetd is used, the TFTP service is disabled by default, therefore, you must modify the file to enable the Service.
According to the installation method of (1), you can modify the file/etc/xinetd. d/tftp. It mainly sets the root directory of the TFTP server and enables the service.
The modified file is as follows:
Service tftp {
Socket_type = dgram
Protocol = udp
Wait = yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-s/root/router-c
Disable = no
Per_source = 11
CPIs = 100 2
Flags = IPv4
}
Description: changed to server_args =-s. -C, where The directory can be changed to the root directory of your tftp-server. The parameter-s specifies the chroot, and-c specifies that files can be created.
(3) create the tftp root directory, disable the firewall, and start the tftp-server.
# Mkdir/root/router
# Chmod o + w/root/router
#/Etc/init. d/iptables stop // disable the Firewall
# Service xinetd restart // restart the xinetd service
Restart the xinetd service because the TFTP service is controlled by xinetd. xinetd is a service that manages services and does not open ports.
Verify whether TFTP is up:
# Netstat-nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
You can log on to the local machine to test the following command:
# Tftp your-ip-address
Tftp> get
Tftp> put
Tftp> q
#
# Telnet 192.168.100.1
Telnet router IP
Username :******
Password :******
You can log on to the vro.
AKA-SZ-Router> en
Password :******
AKA-SZ-Route # show run
AKA-SZ-Route # copy running-config tftp (write the configuration file running on the router to the TFTP Server)
Remote host []?
Enter 192.168.100.2 (IP address or Host Name of the TFTP Server)
Name of configuration file to write [route-config]?
Input: ciscoconf (backup the file name of the user configuration file. You can press enter to use the default route-config as the file name of the user configuration)
Write file conf-ciscoconf on host 192.168.100.2 [confirm] (ask the user to confirm whether the host name or host IP address is correct)
If the displayed information is correct, press Enter. The system starts to back up the user configuration file and displays the following information:
Building configuration...
Writing route-config !!! [OK]
It should be emphasized that during the backup process, carefully observe the router backup process and ensure that each package is successfully saved, that is, the Writing route-config and [OK] must be both "!" Otherwise, it is best to rewrite it once. In addition, after the backup is complete, it is best to use the text editing software to open the backup file to confirm whether the backup is successful.
The recovery configuration method is basically the same as the backup method, but the recovery command is different. The recovery configuration command is as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service