Cisco備份服務器建制(TFTP SERVER ON LINUX)

1、備份服務器地址10.55.1.100,OS位RHEL 6.4

2、yum本地倉庫安裝tftp服務

# yum repolist

Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,

              : subscription-manager, tmprepo, verify, versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Loading support for Red Hat kernel ABI

localrepo                                                                                   | 3.9 kB     00:00 ...

localrepo/primary_db                                                                        | 3.1 MB     00:00 ...

repo id                                               repo name                                              status

localrepo                                             localrepo                                              3,648

repolist: 3,648

[root@wuftp yum.repos.d]# yum info tftp

Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,

              : subscription-manager, tmprepo, verify, versionlock

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Loading support for Red Hat kernel ABI

Available Packages

Name        : tftp

Arch        : x86_64

Version     : 0.49

Release     : 7.el6

Size        : 32 k

Repo        : localrepo

Summary     : The client for the Trivial File Transfer Protocol (TFTP)

URL         : http://www.kernel.org/pub/software/network/tftp/

License     : BSD

Description : The Trivial File Transfer Protocol (TFTP) is normally used only for

            : booting diskless workstations.  The tftp package provides the user

            : interface for TFTP, which allows users to transfer files to and from a

            : remote machine.  This program and TFTP provide very little security,

            : and should not be enabled unless it is expressly needed.


yum -y install tftp xinetd tftp-server


3、配置tftp server

關閉selinux和iptables


~]# vim /etc/xinetd.d/tftp

# default: off

# description: The tftp server serves files using the trivial file transfer \

#    protocol.  The tftp protocol is often used to boot diskless \

#    workstations, download configuration files to network-aware printers, \

#    and to start the installation process for some operating systems.

service tftp

{

    socket_type        = dgram

    protocol        = udp

    wait            = yes

    user            = root     

    server            = /usr/sbin/in.tftpd

    server_args        = -s /networkbackup -c     設定TFTP傳輸的文件保存的路徑 -c鎖定目錄

    disable            = no     disable修改爲no進行開啓

    per_source        = 11

    cps            = 100 2

    flags            = IPv4

}


chmod 777 -R /networkbackup     給備份文件夾授予權限


重啓xientd.d,是進程是tftp服務的父進程

[root@wuftp /]# service xinetd restart

Stopping xinetd:                                           [FAILED]

Starting xinetd:                                           [  OK  ]

查看tftp是否啓動正常

netstat -a | grep tftp

udp        0      0 *:tftp                      *:*   

添加開機自啓動

chkconfig --add tftp


4、cisco設備進行tftp備份

User Access Verification


Username:

Username:

Username: 1080054

Password:

Aging1#copy

Aging1#copy ru

Aging1#copy running-config tf

Aging1#copy running-config tftp:

Address or name of remote host []? 10.55.1.100

Destination filename [aging1-confg]?

!!!

8850 bytes copied in 2.184 secs (4052 bytes/sec)


5、備份完成

[root@wuftp networkbackup]# ll

total 412

-rw-rw-rw- 1 nobody nobody  7742 Jan 19 12:34 172.16.1.2-tfn-confg

-rw-rw-rw- 1 nobody nobody  8065 Jan 19 12:35 172.16.1.3-dyx-confg

-rw-rw-rw- 1 nobody nobody  8850 Jan 19 11:20 aging1-confg

-rw-rw-rw- 1 nobody nobody  8781 Jan 19 11:20 aging2-confg

-rw-rw-rw- 1 nobody nobody  8894 Jan 19 11:19 aging3-confg

-rw-rw-rw- 1 nobody nobody  1663 Jan 19 11:21 ap-warehouse2-confg

-rw-rw-rw- 1 nobody nobody  1647 Jan 19 11:22 ap-warehouse4-confg

-rw-rw-rw- 1 nobody nobody  8672 Jan 19 11:19 caigou-confg

-rw-rw-rw- 1 nobody nobody  4725 Jan 19 11:18 caiwu-confg

-rw-rw-rw- 1 nobody nobody  5410 Jan 19 11:16 chanxiao-confg

-rw-rw-rw- 1 nobody nobody 13745 Jan 19 12:36 core3750-confg

-rw-rw-rw- 1 nobody nobody 38573 Jan 19 12:08 cptw_4507r_lcm1-confg

-rw-rw-rw- 1 nobody nobody 26937 Jan 19 11:24 cptw_4507r_lcm2-confg

-rw-rw-rw- 1 nobody nobody 50960 Jan 19 11:13 cptw_4507r_lcm3-confg

-rw-rw-rw- 1 nobody nobody  8992 Jan 19 11:16 cr1-confg

-rw-rw-rw- 1 nobody nobody  5217 Jan 19 11:15 cr2-confg

-rw-rw-rw- 1 nobody nobody  3426 Jan 19 11:14 cr3-confg

-rw-rw-rw- 1 nobody nobody  5158 Jan 19 11:14 cr4-confg

-rw-rw-rw- 1 nobody nobody  1789 Jan 19 12:18 dmz-confg

-rw-rw-rw- 1 nobody nobody  4565 Jan 19 12:17 dongli-confg

-rw-rw-rw- 1 nobody nobody  3020 Jan 19 12:17 gaswitch-confg

-rw-r--r-- 1 root   root    5224 Jan 19 12:40 GAYBSWITCH-confg

-rw-rw-rw- 1 nobody nobody  4293 Jan 19 12:37 gbyg-confg

-rw-rw-rw- 1 nobody nobody  3766 Jan 19 11:14 hp-e-confg

-rw-rw-rw- 1 nobody nobody  4462 Jan 19 12:07 lcm1-fa-confg

-rw-rw-rw- 1 nobody nobody  5048 Jan 19 12:07 lcm1-oa-confg

-rw-rw-rw- 1 nobody nobody  2860 Jan 19 12:06 lcm1-rac-3750-confg

-rw-rw-rw- 1 nobody nobody  2877 Jan 19 11:12 lcm3jiexi24k-confg

-rw-rw-rw- 1 nobody nobody 13519 Jan 19 11:28 p52-confg

-rw-rw-rw- 1 nobody nobody  1637 Jan 19 11:22 pc-warehouse1-confg

-rw-rw-rw- 1 nobody nobody  1495 Jan 19 11:22 pc-warehouse6-confg

-rw-rw-rw- 1 nobody nobody  5119 Jan 19 11:27 phonerouter-confg

-rw-rw-rw- 1 nobody nobody  1961 Jan 19 11:23 pur-confg

-rw-rw-rw- 1 nobody nobody  4960 Jan 19 11:11 system1-confg

-rw-rw-rw- 1 nobody nobody  9560 Jan 19 11:10 system2-confg

-rw-rw-rw- 1 nobody nobody  1899 Jan 19 11:23 vipap-confg

-rw-rw-rw- 1 nobody nobody  6159 Jan 19 11:09 warehouse-confg

-rw-rw-rw- 1 nobody nobody  3098 Jan 19 11:09 xuniji-confg

-rw-rw-rw- 1 nobody nobody  9190 Jan 19 11:08 yewu-confg

-rw-rw-rw- 1 nobody nobody  2990 Jan 19 12:19 yiwushi-1-confg

-rw-rw-rw- 1 nobody nobody  3691 Jan 19 12:34 yiwushi-2-confg

-rw-rw-rw- 1 nobody nobody  3682 Jan 19 11:26 yiwushi-3-confg




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章