Search Results for 'Command'

1 POSTS

  1. 2008.09.22 라우터 관리를 위한 명령어

라우터 관리를 위한 명령어

Posted 2008. 9. 22. 22:42

>>>>  라우터 관리를 위한 명령들.... <<<<

>>> TFTP Server 설정...

 

>>> running-config 를 TFTP 에 Backup 하기

R1#copy running-config tftp
Address or name of remote host []? 192.168.2.2
Destination filename [r1-confg]? R1-Config
!!
1089 bytes copied in 5.516 secs (217 bytes/sec)
R1#

 

>>> TFTP에서 Running-config를 복구할 때는 먼저 Ethernet Interface에 IP 설정을 해서
      TFTP서버와 통신이 가능한 상태에서 진행한다...
R1#copy tftp running-config
Address or name of remote host []? 192.168.2.2
Source filename []? R1-Config
Destination filename [running-config]?
Accessing tftp://192.168.2.2/R1-Config...
Loading R1-Config from 192.168.2.2 (via Ethernet0): !
[OK - 1089/2048 bytes]

1089 bytes copied in 5.76 secs (217 bytes/sec)
R1#

 

>>> IOS Backup 하기

1. flash에 IOS Name을 체크한다.
R1#sh flash

System flash directory:
File  Length   Name/status
  1   5721700  c2500-i-l.120-8b.bin 
[5721764 bytes used, 2666844 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)

 

2. flash에서 TFTP로 copy 해서 IOS를 백업한다.
R1#copy flash tftp
Source filename []? c2500-i-l.120-8b.bin
Address or name of remote host []? 192.168.2.2
Destination filename [c2500-i-l.120-8b.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5721700 bytes copied in 70.232 secs (81738 bytes/sec)
R1#


>>>  C2500 시리즈 IOS 업그래이드 하기

1. config-register값을 0x1 로 변경한다.
 Router(config)#config-register 0x1
 Router(config)#exit
 Router#reload

 

2. 먼저 enable 한후 설정 상태를 확인한다. TFTP서버와 통신이 되는지 검사...
R1(boot)>en
Password:
R1(boot)#sh ip int bri
Interface        IP-Address      OK?  Method    Status                 Protocol
Ethernet0        192.168.2.1    YES  NVRAM     up                     up     
Loopback0      192.168.1.1    YES  NVRAM     up                     up     
Serial0            192.168.3.2    YES  NVRAM     up                     up     
Serial1            unassigned     YES  not set     administratively down  down   
R1(boot)#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/203/1000 ms


R1(boot)#copy tftp flash

System flash directory:
File  Length   Name/status
  1   5721700  c2500-i-l.120-8b.bin 
[5721764 bytes used, 2666844 available, 8388608 total]
Address or name of remote host [255.255.255.255]? 192.168.2.2
Source file name? c2500-i-l.120-8b.bin
Destination file name [c2500-i-l.120-8b.bin]?
Accessing file 'c2500-i-l.120-8b.bin' on 192.168.2.2...
Loading c2500-i-l.120-8b.bin from 192.168.2.2 (via Ethernet0): ! [OK]

Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]

Copy 'c2500-i-l.120-8b.bin' from server
  as 'c2500-i-l.120-8b.bin' into Flash WITH erase? [yes/no]yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Loading c2500-i-l.120-8b.bin from 192.168.2.2 (via Ethernet0): !!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 5721700/8388608 bytes]

Verifying checksum...  OK (0x788F)
Flash copy took 0:02:50 [hh:mm:ss]
R1(boot)#

 

>>>  Cisco IOS 복원하기 (1600, 1700 , 2600 시리즈등...)
! TFTP 서버를 사용하는 경우
Example
     rommon 1 > IP_ADDRESS=171.68.171.0
     rommon 2 > IP_SUBNET_MASK=255.255.254.0
     rommon 3 > DEFAULT_GATEWAY=171.68.170.3
     rommon 4 > TFTP_SERVER=171.69.1.129
     rommon 5 > TFTP_FILE=c2600-is-mz.113-2.0.3.Q
     rommon 6 > tftpdnld

               IP_ADDRESS: 171.68.171.0
           IP_SUBNET_MASK: 255.255.254.0
          DEFAULT_GATEWAY: 171.68.170.3
              TFTP_SERVER: 171.69.1.129
                TFTP_FILE: c2600-is-mz.113-2.0.3.Q

     Invoke this command for disaster recovery only.
     WARNING: all existing data in all partitions on flash will be lost!
     Do you wish to continue? y/n:  [n]:  y

     Receiving c2600-is-mz.113-2.0.3.Q from 171.69.1.129 !!!!!.!!!!!!!!!!!!!!!!!!!.!!
     File reception completed.
     Copying file c2600-is-mz.113-2.0.3.Q to flash.
     Erasing flash at 0x607c0000
     program flash Location 0x60440000
     rommon 7 >reset

 

! Console 포트를 사용하는 경우
1. 먼저 라우터에 Xmodem 포트 설정을 한다.
rommon 1 > confreg
do you wish to change the configuration? y/n [n]:  y
enable  "diagnostic mode"? y/n  [n]:
enable  "use net in IP bcast address"? y/n  [n]:
disable "load rom after netboot fails"? y/n  [n]:

enable  "use all zero broadcast"? y/n  [n]:
enable  "break/abort has effect"? y/n  [n]:
enable  "ignore system config info"? y/n  [n]:
change console baud rate? y/n  [n]:  y
enter rate: 0 = 9600,  1 = 4800,  2 = 1200,  3 = 2400
            4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200  [7]:  7
change the boot characteristics? y/n  [n]:  y
enter to boot:
 0 = ROM Monitor
 1 = the boot helper image
 2-15 = boot system
    [0]:  0

    Configuration Summary

enabled are:
load rom after netboot fails
console baud: 115200
boot: the ROM Monitor
do you wish to change the configuration? y/n  [n]: n
You must reset or power cycle for new config to take effect

 

2. Xmodem을 초기화 한다.
rommon 2 > xmodem -c c2600-is-mz.122-17.bin
Do not start the sending program yet...
         File size           Checksum   File name
 

3. 명령어를 입력한 다음

Terminal Client 프로그램에서 파일을 전송한다.

 

 

>>> 암호 복구 하기

1. 라우터에 콘솔 연결을 먼저 한다.
2. 라우터에 전원을 켜고 60초 이내에 [Ctrl + Break] or [Ctrl + B]를 누르면 다음 모드로 이동한다.
********************************************************************************************

<<<<< 2500 Serise >>>>>>
Abort at 0x10E5C1E (PC)
>

 

3. Register값을 0x2142로 변경한 후 재시작한다..
    (이 값은 NVRAM을 로드하지 않고 라우터 부팅을 한다.)
>o/r 0x2142
> i

 

<<<<< 16xx, 17xx, 26xx Serise 등 >>>>>>
rommon1>

 

3. Register 값을 0x2142로 변경후 재시작한다.
rommon1>confreg 0x2142
rommon2>reset
********************************************************************************************

 

4. NVRAM을 Pass하고 부팅하기 때문에 Setup Mode로 시작한다. Ctrl + C 로 Setup Mode를
    취소하고 라우터에 CLI Mode로 접근한다...

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]:


Press RETURN to get started!
<생략>
Router>

 

5. 라우터에 Privileged Mode로 이동 후 startup-config 를 running-config로 load 한다.

Router>en
Router#copy startup-config running-config
Destination filename [running-config]?
1089 bytes copied in 4.952 secs (272 bytes/sec)
R1#

 

6. 라우터에 기존에 설정되어 있던 Setting 정보가 복구되면 각 인터페이스 정보를 확인한다.
    startup-config에서 running-config를 강제 복구시 인터페이스가 활성화 되지 않는다.
    직접 각 인터페이스로 이동후 활성화를 한다....no shutdown를 입력해준다...
R1#sh ip int brief
Interface              IP-Address      OK? Method Status                Protocol
Ethernet0             192.168.2.1     YES TFTP   administratively down down   
Loopback0           192.168.1.1     YES TFTP   up                    up     
Serial0                 192.168.3.2     YES TFTP   administratively down down   
Serial1                 unassigned      YES unset  administratively down down   
R1#conf t
R1(config)#int e0
R1(config-if)#no shutdown
R1(config-if)#int s0
R1(config-if)#no shutdown


7. 잃어버린 암호를 다시 설정한다.  (설정하고자 하는 암호를 입력한다.)
Router(config)#enable secret cisco

 

8. Register값을 원래대로 변경한다.  0x2102가 대부분 기본 값이다....
    이 정보는 각 라우터에서 먼저 show version으로 체크한 후에 기록해 놓는 것이 바람직하다..

Router(config)#config-register 0x2102

 

9. 이제 수정된 정보를 저장하고 다시 시작하면 완료된다.

Router#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]

R1#reload
Proceed with reload? [confirm]

 

완료>>>>>

'Network > Cisco' 카테고리의 다른 글

Cisco TFTP 다운  (0) 2008.09.29
Switch Load Balancing  (0) 2008.09.29
Cisco 3750 기본 셋팅  (0) 2008.09.22