Linux下备份cisco路由配置
环境:服务器A :rhas11
客户机B: rhas101
首先用rpm –qa | grep tftp看一下tftp有没安装,没有的话安 装一下。
A:在服务器端设置
#vi /etc/xinetd.d/tftp
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /test
per_source = 11
cps = 100 2
flags = IPv4
}
#service xinetd restart 从启xinetd服务,因为TFTP服务受控与xinetd, xinetd是管服务的服务,它是不开端口的。
验证一下TFTP是否起来了:
[root@rhas11 tftp]# netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN 3122/rpc.statd
tcp 0 0 127.0.0.1:32781 0.0.0.0:* LISTEN 4035/xinetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 3103/portmap
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3324/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3255/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3213/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3295/sendmail: acce
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 3415/0
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 3324/httpd
udp 0 0 0.0.0.0:32768 0.0.0.0:* 3122/rpc.statd
udp 0 0 0.0.0.0:69 0.0.0.0:* 4035/xinetd
udp 0 0 0.0.0.0:69 0.0.0.0:* 4012/in.tftpd
udp 0 0 0.0.0.0:111 0.0.0.0:* 3103/portmap
udp 0 0 0.0.0.0:754 0.0.0.0:* 3122/rpc.statd
udp 0 0 0.0.0.0:631 0.0.0.0:* 3213/cupsd
#cd /test
[root@rhas11 test]# ls -l
总用量 4
-rw-r--r-- 1 root root 19 5月 15 18:26 file
[root@rhas101 tmp]# tftp 172.31.0.11
tftp> get 1
Received 72 bytes in 0.0 seconds
tftp>
[root@rhas101 client]# ls -l
总用量 4
-rw-r--r-- 1 root root 15 5月 20 21:49 aaa
tftp> put aaa
Error code 1: File not found
tftp>
哦,原来服务器/test目录下没有文件aaa,那就touch一个吧
[root@rhas11 test]# touch aaa
[root@rhas11 test]# ls -l
总用量 4
-rw-r--r-- 1 root root 0 5月 15 18:46 aaa
-rw-r--r-- 1 root root 19 5月 15 18:26 file
[root@rhas101 client]# tftp 172.31.0.11
tftp> put aaa
Error code 1: File not found
tftp> put aaa
Error code 2: Access denied
tftp>
细心的读者一定想到这是权限问题
再到服务器上设置
(===========================================================================
小插曲:#chown -R nobody.nobody /test
#vi /etc/xinetd.d/tftp
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -u nobody -s /test
per_source = 11
cps = 100 2
flags = IPv4
}
chmod 777 -R /test
===========================================================================
)
[root@rhas11 test]# ls -l
总用量 4
-------rwx 1 root root 0 5月 15 18:46 aaa
-rw-r--r-- 1 root root 19 5月 15 18:26 file
tftp> put aaa
Error code 1: File not found
tftp> put aaa
Error code 2: Access denied
tftp> put aaa
Sent 16 bytes in 0.0 seconds
tftp>
在局域网环境中,如果有Cisco 路由器和Linux服务器。也许你需要利用Linux的
TFTP服务去下载Cisco router配置文件 startup-config,在服务器上编辑后再上载
到路由器,在实现中有一些特别注意的地方。
所用软、硬件:Redhat Linux AS 3.0 ,Cisco 2611 路由器
Address or name of remote host []? 172.31.0.11
Destination filename [beijing-confg]? beijing-route
!!
1968 bytes copied in 0.581 secs (3387 bytes/sec)
BEIJING#copy tftp flash
Address or name of remote host []? 172.31.0.11
Source filename []? beijing-route
Destination filename [beijing-route]?
Accessing tftp://172.31.0.11/beijing-route...
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
Loading beijing-route from 172.31.0.11 (via FastEthernet0/0): !
[OK - 1968 bytes]
1968 bytes copied in 0.285 secs (6905 bytes/sec)
BEIJING#
用tftp传输大文件时的带宽显示情宽
ping 192.168.111.1能通
我用ftp 192.168.111.1也可以,当然之前用了/etc/rc.d/init.d/vsftpd start命令
我想知道是否使用tftp之前也要启动什么服务?不能直接使用tftp?
tftp: /usr/bin/tftp /usr/share/man/man1/tftp.1.gz
[root@netsrv21 09:25:43 /mnt/jzsale/98/recv]# rpm -qf /usr/bin/tftp
tftp-0.28-2
从以上结果可以看出,tftp是一个单独的包,安装一下就ok了
下个
inetutils-1.4.2
编 装
比单一的tftp包好
转载于:https://blog.51cto.com/tosail/63890
Linux下备份cisco路由配置相关推荐
- LINUX下的APACHE的配置
今天写一下LINUX下的APACHE的配置方法. APACHE是作为WEB服务器的.它的优点在于用缓存方式来加快网页的搜索速度. APACHE缺省只支持静态网页 LINUX下有APACHE的RPM包 ...
- linux下apache服务器的配置和管理(启动、重启、中断服务)
2019独角兽企业重金招聘Python工程师标准>>> linux下apache服务器的配置和管理 一.两个重要目录: Apache有两个重要的目录: 1.配置目录/etc/http ...
- Linux下Apache虚拟主机配置
说明: Apache版本:httpd-2.2.31 Apache安装目录:/usr/local/apache 目的: 配置Apache虚拟主机 具体操作: 1.修改Apache主配置文件 cp /us ...
- linux apache部署php,Linux下apache虚拟主机配置多版本php同时运行 | 系统运维
学习本教程须掌握: 1.Linux下指定版本编译安装LAMP 2.Linux下Apache虚拟主机配置 3.CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5 ...
- Linux下Tomcat的安装配置
Linux下Tomcat的安装配置 一.下载安装对应的jdk,并配置Java环境. 官网下载地址: http://www.oracle.com/technetwork/java/javase/down ...
- linux下pptpd的安装配置(×××)
linux下pptpd的安装配置(×××)--单网卡×××实现 (本文部分内容摘自互联网,特此声明!) 环境介绍:Linux(redhat) 2.6.18 +PPP+PPTPD ...
- Linux下备份系统
Linux下备份系统 "那我该用什么来备份我的系统呢?"不像Windows,Linux不限制根用户存取任何东西,因此,你完全可以把一个分区上每一个的文件放入一个TAR文件中. 来实 ...
- Linux下使用Google Authenticator配置SSH登录动态验证码
说明: 1.一般ssh登录服务器,只需要输入账号和密码. 2.本教程的目的:在账号和密码之间再增加一个 验证码,只有输入正确的验证码之后,再输入 密码才能登录.这样就增强了ssh登录的安全性. 3.账 ...
- Linux下的NFS搭建配置
Linux下的NFS搭建配置 一.NFS介绍 1.NFS简介 2.NFS特点 二.环境介绍 三.服务端配置 1.创建共享目录 2.检查NFS包是否安装 3.安装nfs相关包 4.编辑配置文件 5.重启 ...
最新文章
- C/C++中constkeyword
- Josephus问题
- 【周末阅读】10年内,19个关键技术将改变世界
- python扩展库安装
- 开始使用Nuxt.js
- 把nc v6的源码看懂
- 724. 寻找数组的中心索引
- 边界布局BorderLayout源码解析
- python 移动文件位置-python工具-文件及文件夹移动及处理
- 智能车四轮组打工日记(二)——单电机驱动硬件设计
- 计算机相关的俚语,现代俄语计算机俚语的构成方式.pdf
- 《计算机组成与设计(ARM版)》读书笔记-第二章指令1
- PTC指定位置安装许可服务器,PTC安装在终端服务器上的問題
- 不能不用也不可乱用的标准化和归一化处理
- ulipad 无法安装使用、无法调试、64位版本问题 ImportError: No module named comtypes 整体解决方案!
- plc输出类型有哪些?
- 获取windows系统时间
- 图片大小如何调整到100k?如何把图片改成100kb以内?
- 惠普服务器怎么挂载虚拟光驱,惠普服务器SPP包制做方法
- fun在matlab里面啥意思_下面是个MATLAB程序,请问fun,和feval,是什么,如何写fun,如何代表这个函数...
热门文章
- 《小马哥Spring Cloud系列》十五:分布式应用追踪-视频笔记
- java 微信支付实现
- 记linux_centOS安装as86过程
- IDEA基于kotlin开发android程序配置小结
- 大页内存(HugePages)
- ini_set(display_errors,On);和error_reporting(E_ALL);
- 流水线问题--计算机体系结构
- JS----JavaScript中函数
- matlab音频基频的提取,(620512681) 自相关基频提取算法的MATLAB实现
- 微前端之single-spa