利用TFTP管理路由配置

实验五 利用TFTP管理路由配置


实验1 从tftp服务器恢复路由器配置
【实验名称】
从TFTP服务器恢复路由配置
【实验目的】
能够从TFTP服务器恢复路由器配置
【背景描述】
假设某台路由器培植文件由于误操作或其忙某种原因破坏了,现在需要TFTP服务器上的备份配置文件中恢复.
本实验一一太R4624路由器为例,路由器命名为RouterA.一太PC几通过串口(Com)连接到路由器的控制(con
sole)端口,同过网卡(NIC)连接都路由器的fastethemet0端口.假设PC几的IP地址和网络掩码分别为192.16
8.0.137,255.255.255.0,路由器的fastetnernet0断口的IP地址和网络掩码分别为192.168.0.138,255.255.255.0.
【实验功能】
使网络管理员可以将已有的路由器配置恢复到路由器上.
【实验拓扑】
【实验设备】
R2624(一台)
【实验步骤】
步骤1.在路由器上配置aastetnernet0端口的IP地址.
RouterA(config)* inerface fastethernet0 !进入路由器的配置模试
RouterA(config)* ipaddress 192.168.0.138 255.255.255.0 !配置路由器管理借口IP地址
RouterA(config)* no shutdown !开启路游器 fasterthnet0 接口
验证测试:验证路游器接口fasterthnet0的IP地址已经配置和开启, PC几与路游器有网络连通性
RouterA(config)* ip interface fasternet 0 !验证接口fasterthnet0 的磅 地址已经配置和开启
Fastethnet0 is up, line protocol is up
Internet address is 192.168.0.138/24
Broadcast address is 255.255.255.255
Address detmined bu setup command
MTU is 1500 bytes
Helper addressis not set
Dirceted broadcast forwarding is disabled
outgoing access list is not set
Inbound access list is not set
Frowxy ARP is enabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables ate always sent
IP fast switching is enabled
IP fast switfhing on the same interface is disabled
IP multiscast fast switching is enabled
Router Discovery is disabled
IP output packet accounting is disabled
IP access violation accouting is disabled
TCP/IP header conmperssionis disable
Policy routing is disabaled

Routera#show ip interface brief
Inerface IP-Address ok?MethodStatus Protocol
FastEthernet0 192.168.0.138 YES manual up up
FastEthernet1 unassigned YES unset administratively down
FastEthernet2 unassigned YES unset administratively down
FastEthernet3 unassigned YES unser administratively down
RouterA#ping 192.168.0.137
Type escape sequence to abort.
Sending 5,100-byte ICMP Echoes to 192.168.137, timeout is 2 seconds:
!!!!
Success rate is 100percent (5/5), roud-trip min/avg/max=1/1/1 ms
步骤2.恢复路由器配置
Roiutera#copy tftp runnuning-config !恢复配置到路由器的 当前配置文件中
服务器的IP

地址
Nameofconfigurationfile [routera-confg]? !悬着输入配置文件名
Configure using routera-confg from 192.168.0.167、 [confirm]
Loading toutera-confg from 192.168.0.137 (via FastEthernet0):!
[ok - 608/32727 bytes]
RouterA#copy tftp startup-config !保存配置到路由器的当前配置文件

RouterA#copy tftp startup-config !恢复配置到路由器的初始配置文件中
Address of remote hose [192.168.0.137]?
Name of configuration file [routera-confg]?
Configure using routera-confg from 192.168.0.137/ [confirm]
Loading routera-confg from 192.168.0.137 (via FastEthernet0):!
[OK - 608/32727 bytes]
[ok]
RouterA# copy startup-config runing - config !将初始配置文件拷贝到路由器的当前配置文件中
验证测试:验证路由器已经更改为新的配置
RouterA#show running-config ! 验证路由器的当前配置文件为新的文件
 或:
 RouterA#show startup-config ! 验证路由器的当前配置文件为新的文件
 !
!
hostname "RouterA"
!
enable secret 5 $l$J.MN$6eZYYdYsJMhhEUdtT3ZXGO
enable password star
!
ip subnet-zero
!
interface FastEthernet0
ip address 192.168.0.138 255.255.255.0
!
interface FastEthernet1
ip address 192.168.1.138 255.255.255.0
interface FastEthernet2
no ip address
shutdown
!
interface FastEthernet3
no ip address
shutdown
!
interface serial0
no ip address
shutdown
!
interface Serriall
no ip address
shutdown
!
!
voice-port 0
!
voice-port 1
!
voice-port 2
!
voice-port 3
ip classless
!
line con 0
line 1 8
line aux 0
line vty 0 4
password star
login
!
end
[注意事项]
在恢复配置到路由器上之前,须验证路由器与这PC机(TFTP Server)具有网络连通性。
[参考配置]
RouterA #show running-config
current configuration
Building configur
!
hostname"RouterA"
!
enble secret 5 $l$J.MN$6eZYYdYsJMHHEUdtT32XG0
enble password star
!
ip subnet-zero
!
interface FastEthernet0
ip address 192.168.0.138 255.255.255.0
!
interface FastEthernet1
ip address 192.168.1.138 255.255.255.0
!
interface FastEthernet2
no ip address
shutdown
!
interface FastEthernet3
no ip address
shutdown
!
interface Serial0
no ip address
shutdown
!
interface Seriall
no ip address
shutdown
!
!
voice-port 0
!
voice-port 1
!
voice-port 2
!
voice-port 3
ip classless
!
line con 0
line 1 8
line aux 0
line vty 0 4
password star
login
!
end

实验2 备份路由器配置到TFTP服务器
[实验名称]
备份路由器配置到TFTP服务


[实验目的]
能够将路由器配置文件备份到TFTP服务器
[背景描述]
作为网络管理员,你在路由器上做好配置后,需要将其配置文件做备份,以备将来需要时用。
本实验以一台R2624路由器为例,路由器命名为RouterA.一台PC机通过串口(Com)连接到路由器
的控制(Console)端口,通过网卡(NIC)连接到路由器的fastethernet0端口。
假设PC机的IP地址和网络掩码分别为192.168.0.137,255.255.255.0,路由器的astethernet0端
口的IP地址和网络掩码分别为192.168.0.138,55.255.255.0



相关文档
最新文档