1. cisco 장비 백업 및 ios 전송을 위한 tftp 설정
# 해당 서버는 장비와 udp 통신이 가능해야함
[root@localhost ~]# yum -y install tftp
[root@localhost ~]# yum -y install tftp-server
[root@localhost ~]# vi /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 /var/lib/tftpboot
disable = no #yes->no로 변경
per_source = 11
cps = 100 2
flags = IPv4
}
# 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 /var/lib/tftpboot
disable = no #yes->no로 변경
per_source = 11
cps = 100 2
flags = IPv4
}
[root@localhost ~]# /etc/init.d/xinetd restart
[root@localhost ~]# netstat -atunp | grep xinet
tcp 0 0 :::873 :::* LISTEN 30084/xinetd
udp 0 0 0.0.0.0:69 0.0.0.0:* 30084/xinetd
tcp 0 0 :::873 :::* LISTEN 30084/xinetd
udp 0 0 0.0.0.0:69 0.0.0.0:* 30084/xinetd
[root@localhost ~]# chmod 777 /var/lib/tftpboot/
이제 해당 디렉토리에 업그레이드 해야할 IOS 파일을 업로드 한다 .(업로드는 알아서...)
[root@localhost tftpboot]#cd /var/lib/tftpboot/
[root@localhost tftpboot]# ls -alh s72033-adventerprisek9-mz.151-2.SY4.bin
-rw-r--r-- 1 root root 105M Dec 23 11:12 s72033-adventerprisek9-mz.151-2.SY4.bin
-rw-r--r-- 1 root root 105M Dec 23 11:12 s72033-adventerprisek9-mz.151-2.SY4.bin
2. ciscoo 장비 bootflash 확인
bootflash 용량을 확인 한다.고 했지만.. ios 용량이 없다...
SK-DDOS-B2-MAIN#sh bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. crashinfo 2882FAC4 C0D78 25 265462 Dec 19 2014 17:21:55 +09:00 crashinfo_20141219-082155
65270408 bytes available (265592 bytes used)
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1 .. crashinfo 2882FAC4 C0D78 25 265462 Dec 19 2014 17:21:55 +09:00 crashinfo_20141219-082155
65270408 bytes available (265592 bytes used)
현재 ios 가 있는 disk 0의 용량을 확인후 해당 disk0에 업로드 하기로 한다.
SK-DDOS-B2-MAIN#dir disk0:
Directory of disk0:/
1 -rw- 45455628 Jan 1 2000 09:15:50 +09:00 s72033-psv-mz.122-18.SXD1.bin
255979520 bytes total (169144320 bytes free)
Directory of disk0:/
1 -rw- 45455628 Jan 1 2000 09:15:50 +09:00 s72033-psv-mz.122-18.SXD1.bin
255979520 bytes total (169144320 bytes free)
SK-DDOS-B2-MAIN#copy disk0: tftp:
Address or name of remote host []? 221.139.104.130
Source filename []? s72033-adventerprisek9-mz.151-2.SY4.bin
Destination filename []? s72033-adventerprisek9-mz.151-2.SY4.bin
Destination filename []? s72033-adventerprisek9-mz.151-2.SY4.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
disk 0에 업로드 된 파일을 확인 한다.
SK-DDOS-B2-MAIN#dir disk0:
Directory of disk0:/
1 -rw- 45455628 Jan 1 2000 09:15:50 +09:00 s72033-psv-mz.122-18.SXD1.bin
2 -rw- 109786700 Dec 24 2014 09:53:38 +09:00 s72033-adventerprisek9-mz.151-2.SY4.bin
255979520 bytes total (169144320 bytes free)
Directory of disk0:/
1 -rw- 45455628 Jan 1 2000 09:15:50 +09:00 s72033-psv-mz.122-18.SXD1.bin
2 -rw- 109786700 Dec 24 2014 09:53:38 +09:00 s72033-adventerprisek9-mz.151-2.SY4.bin
255979520 bytes total (169144320 bytes free)
reload전 기존 데이터 및 ios를 백업 받는다.
[root@localhost ~]# cd /var/lib/tftpboot/
[root@localhost tftpboot]# touch s72033-psv-mz.122-18.SXD1.bin
[root@localhost tftpboot]# chmod 777 s72033-psv-mz.122-18.SXD1.bin
[root@localhost tftpboot]# chmod 777 s72033-psv-mz.122-18.SXD1.bin
[root@localhost tftpboot]# touch sk-ddos-b2-main-confg
[root@localhost tftpboot]# chmod 777 sk-ddos-b2-main-confg
[root@localhost tftpboot]# chmod 777 sk-ddos-b2-main-confg
SK-DDOS-B2-MAIN#copy running-config tftp:
Address or name of remote host []? 221.139.104.130
Destination filename [sk-ddos-b2-main-confg]? sk-ddos-b2-main-confg
Destination filename [sk-ddos-b2-main-confg]? sk-ddos-b2-main-confg
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SK-DDOS-B2-MAIN#copy disk0:s72033-psv-mz.122-18.SXD1.bin tftp:
Address or name of remote host []? 221.139.104.130
Destination filename [s72033-psv-mz.122-18.SXD1.bin]? s72033-psv-mz.122-18.SXD1.bin
Address or name of remote host []? 221.139.104.130
Destination filename [s72033-psv-mz.122-18.SXD1.bin]? s72033-psv-mz.122-18.SXD1.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
백업된 파일을 확인 한다.
[root@localhost tftpboot]# ls -al
total 139996
drwxrwxrwx 2 root root 4096 Dec 24 10:11 .
drwxr-xr-x. 29 root root 4096 Dec 24 09:34 ..
-rw-r--r-- 1 root root 109786700 Dec 23 11:12 s72033-adventerprisek9-mz.151-2.SY4.bin
-rwxrwxrwx 1 root root 33554432 Dec 24 10:13 s72033-psv-mz.122-18.SXD1.bin
-rwxrwxrwx 1 root root 3676 Dec 24 10:03 sk-ddos-b2-main-confg
total 139996
drwxrwxrwx 2 root root 4096 Dec 24 10:11 .
drwxr-xr-x. 29 root root 4096 Dec 24 09:34 ..
-rw-r--r-- 1 root root 109786700 Dec 23 11:12 s72033-adventerprisek9-mz.151-2.SY4.bin
-rwxrwxrwx 1 root root 33554432 Dec 24 10:13 s72033-psv-mz.122-18.SXD1.bin
-rwxrwxrwx 1 root root 3676 Dec 24 10:03 sk-ddos-b2-main-confg
3. boot 설정 및 reload
SK-DDOS-B2-MAIN#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SK-DDOS-B2-MAIN(config)#boot system flash disk 0: s72033-adventerprisek9-mz.151-2.SY4.bin
Enter configuration commands, one per line. End with CNTL/Z.
SK-DDOS-B2-MAIN(config)#boot system flash disk 0: s72033-adventerprisek9-mz.151-2.SY4.bin
SK-DDOS-B2-MAIN(config)# reload
##reload 후, sh version 을 통해 버전을 확인
반응형
'network > network-basic' 카테고리의 다른 글
wireshark2.0 geoip 적용을 통한 아이피 국가 및 asn 확인 (0) | 2016.05.23 |
---|---|
Cisco Netflow(IOS) 설정과 flow-capture 를 이용한 분석 (0) | 2016.02.27 |
Cisco NAT,PAT (0) | 2016.02.10 |
PPP(Point-to-Point Protocol) 프로토콜 (0) | 2016.02.10 |
PROXY ARP 와 PROXY ARP에 따른 static 라우팅 (0) | 2016.02.10 |