본문 바로가기

메모

CISCO 스위치 패스워드 복구 요령

스위치 패스워드 복구 요령

1) IOS 방식 스위치 패스워드 복구요령

- 적용 스위치: Catalyst 2900XL, 3500XL, 2950 and 3550 Series Switches

전원 OFF (Unplug the power cable) -> Mode 버튼 누름 & 전원 ON -> flash_init -> load_helper -> rename -> boot -> rename (복원) -> copy -> 암호 설정 및 저장

패스워드를 복구하기 위해서는 패스워드가 포함되어 있는 config.text 라는 화일을 무시한 후 부팅을 해야 한다. (show flash: 명령어로 플래시 메모리의 내용을 확인할 수 있음.)

1단계: 전원 OFF, Mode 버튼 누름 & 전원 ON
먼저 해당 장비의 콘솔 포트에 노트북이나 PC를 연결한 상태에서 전원을 OFF 한다.
Catalyst 2900등의 스위치 기종은 전원 스위치가 없으므로 전원 케이블을 빼면 된다.
참고로, 콘솔의 터미널 에뮬레이션 설정은 9600, No Parity, 8 data, 1 stop, No flow control 로 한다.

스위치 프론트 패널(Front Panel) 앞쪽의 왼쪽에 위치한 모드(Mode) 버튼을 누르고 있는 상태에서 전원을 켜거나 전원 케이블을 삽입한다. 스위치의 1번 포트의 LED가 더 이상 깜빡이지 않은 후 1~2초 후에 모드 버튼에서 손을 뗀다.

2단계: flash_init -> load_helper
flash_init 명령어는 플래쉬 화일 시스템을 초기화 한다. 일반적인 부팅 기간 동안에 플래쉬 화일 시스템은 자동으로 초기화된다.
load_helper 명령어는 부트 로더(boot loader)의 기능을 확장하고 패치하는, 하나 또한 그 이상의 helper 이미지들을 로드하고 초기화한다.

3단계: rename config.text
dir flash: 명령어로 플래쉬 메모리의 내용을 확인할 수 있다. (맨뒤에 콜론(:)임을 명심하라)
아래와 같이 패스워드가 포함되어 있는 config.text 의 화일명을 다른 것으로 변경한다.

rename flash: config.text flash: config.old

4단계: 재부팅한다.
boot 명령어로 리부팅하도록 한다.
Continue with the configuration dialog? [yes/no] 의 대화형 모드가 나타나면 no 을 입력하고 들어간 후에 en 명령어로 enable 모드로 들어가도록 한다.

5단계: config.text 복원 및 copy
rename 명령어로 원래 화일명인 config.text 로 변경한다.
Switch#rename flash:config.old flash:config.text
Destination filename [config.text]

!--- Press Return or Enter.

Switch#

변경 내용이 적용 되도록 설정 화일을 메모리에 복사한다.
Switch#copy flash:config.text system:running-config
Destination filename [running-config]?

!--- Press Return or Enter.

1131 bytes copied in 0.760 secs
Switch#

6단계: 암호 설정 및 저장
패스워드를 삭제 혹은 변경한 후 저장한다.

Switch#configure terminal
Switch(config)#no enable secret

!--- This step is necessary if the switch had an enable secret password.
!--- 여기서 enable secret password 로 secret 패스워드를 입력할 수 있다.
Switch(config)#enable password Cisco
Switch#(config)#^Z

!--- Control/Z.

copy running-config startup-config 명령이나 write memory 명령어로 설정을 저장한다.
Switch#write memory
Building configuration...
[OK]
Switch#

2) CatOS 방식 스위치 패스워드 복구요령

CatOS 방식의 스위치 (4000/5000/6000 시리즈 등)는 IOS 방식과는 전혀 다른 방식으로 되어 있는 데 한가지 주의할 점은 다음의 과정을 모두 30초 안에 수행해야 된다는 것이다. 만약 30초가 경과하면 다시 처음부터 다시 시작해야 된다.

1단계: 스위치의 전원을 OFF 했다가 다시 ON 으로 한다.
2단계: 스위치가 부팅 된 후 Cisco Systems Console 이라는 메시지가 나오고 그 다음에 Enter
Password: 라는 말이 나오는 데 여기서 반듯이 [Enter] 키를 쳐야 한다. 그렇지 않으면 다시 스위치를 껏다 켜야 된다.
3단계: Console> 프롬프트가 나오면 enable 명령후 [Enter] 키를 친다. (가상으로 enable 모드 전환)
4단계: set password 와 set enablepass 를 치고 null password (그냥 [Enter] 키만 치면 된다.)


요약


I. Catalyst 1200, 2900, 2926, 2948G, 4000, 5000, 6000 Password 복구
   1. Console PC를 Switching 장비의 console port에 연결하고, 다음 사항을
       Setting한다.
       9600 baud rate 
       no parity 
       8 data bits 
       1 stop bit
  2. 장비 전원 ON
  3. Enter password:   (30 초 동안 Null Password)
  4. Enable mode로 들어가려면
  5. Console>enable  (press Enter)
  6. Password prompt에서 Enter를 친다. (30 초 동안 Null Password)
  7. Enter password:
  8. 다음과 같이 Password를 바꿔주면 된다.
      Console> (enable) set password
      Enter old password: (press Enter)
      Enter new password: (type your new password)
     Retype new password: (type your new password)
 
      Console> (enable) set enablepass
      Enter old password: (press Enter)
      Enter new password: (type your new password)
      Retype new password: (type your new password)
줸좡... ㅡㅡ;;
이것도 역시 퍼옴..