CISCO 장비 및 부팅과정 파헤치기

mcyoo.log·2022년 6월 24일
0

Network

목록 보기
3/14
post-thumbnail

라우터 안에는

① RAM - IOS, 프로토콜(TCP/IP), 버퍼(송신/수신), 메모리 자원들, 휘발성

② ROM - 하드웨어를 운영하기 위한 기본사항, 부트스트랩 코드, Mask ROM(수정 불가)

③ Flash Memory - IOS를 압축한 상태로 가지고 있음, 메모리로 로딩될 때 압축이 풀려서 RAM으로 운반, 전원이 나가도 지워지지 않는다.(비휘발성)

④ NVRAM - 비휘발성, 29KByte ~ 32 KByte, Config가 들어가 있다. 라우터 설정값

⑤ Config Register - 16Bit로 되어있는 부팅 상에 과정을 나타내는 코드, CMOS에 들어있는 값들을 보관

⑥ Interface - 이더넷, ATM, 모뎀, 토큰링 인터페이스 등

등이 살고 있다.

< ROM의 구성 및 기능 >

① 부팅을 관장하는 마이크로 코드

② Bootstrap Code - IOS, Config 레지스터를 참조 Config 체크

③ POST - 내부 컴포넌트 동작 여부 체크

④ Mini IOS - FLash에는 (Full 버전 IOS), 응급용, 명령어의 서브셋 보관

⑤ ROM Monitor - IOS가 깨졌을 경우, 최소한의 명령어를 보관

부팅 순서를 큰 그림으로 보면

① POST -> 라우터의 내부 자원, ROM, RAM, Interface(Port) 테스트, ROM에 POST를 실행하는 프로세스(마이크로코드를 램에 로드)에 따라 테스트

② Bootstrap Code : 부팅을 관장하는 코드, OS 호출, ROM에 존재, 설정 사항(Configuration) 호출 - 파워가 오프 되기 전에 변경된 환경설정,

③ IOS : 라우터의 운영체제를 호출 및 메모리로 로딩

④ 구성 설정 및 로딩

⑤ 사용자 프롬프트 - 커서

자세히 부팅 순서를 보면

전원 공급하고
POST(장비 점검) -> NVRAM에 저장돼있는 BootStrap Code를 RAM으로 로딩 -> START

① Boot field : Config register에서 맨 마지막 비트 4개

② 0X0 -> Hexa 값으로 0 -> ROM 모니터로 부팅, 1-> ROM에 있는 IOS를 사용-> IOS를 로딩

즉, Boot field가 0이거나 1이면 정상적인 부팅이 안 된다.

③ 0 또는 1 이외의 값(2~15) -> 정상적인 프로세스(start-up config)

start-up config : NVRAM에 저장되어 있는 Config

④ Boot System Command : PC의 듀얼 부팅, 사용자가 설정해놓은 사항

⑤ Yes -> Do what they say, No -> FLash에 유효한 IOS가 존재합니까?

⑥ Yes -> IOS 사용 -> Load IOS(IOS 사용), NO -> 네트워크상에서 IOS를 받아옴(TFTP 서버)

⑦ Yes -> Success -> 네트워크상에 file을 사용, No -> Config register 13번째 비트가 1인가?

⑧ Yes -> 5번 실패?, Yes -> ROM에 IOS를 사용(RXBoot mode) -> Load IOS

⑨ Config register 6번 비트가 1이면(NVRAM에 있는 Config는 이용하지 않겠다) -> Setup 다이얼로그

⑩ 6번 비트가 1이 아니면 config 가 없으면 No -> Setup 다이얼로그

⑪ Valid config가 Yes -> NORMAL 하게 configuration 을 불러서 호출

※ config register : 공장초기화 값 -> 0x2102(0010 0001 0000 0010)

콘솔 스피트 -> 12번, 11번 비트 : 00(9600 bps), 01(4800 bps) , 10(1200 bps), 11(2400 bps)

Ox41 -> 6번 비트가 1 이면 NVRAM에서 configration 을 가지고 오지 않는다.(패스워드 복구 모드)

0x42 -> flash에서 IOS를 호출하면서 NVRAM configuration을 가지고 오지 않음

이건 부트 시스템까지 가서의 로딩 과정(위에 과정에 포함되어 있음)

① Boot System Command - 관리자 설정

② Flash Memory

③ TFTP(Net Boot) - 네트워크상에 부팅, 5번 시도, 라우터를 허브에 연결

④ ROM(Mini IOS)

⑤ ROMMON - IOS가 전혀 없는 경우, ROM Monitor

설정 명령어

Configuration Register Values 변경
Router(config)#config-register 0x100

부트 시스템 명령어
Router(config)#boot system flash 파일명.bin
Router(config)#boot system tftp 파일명.bin ip주소
Router(config)#boot system rom

Router(config)#copy r s

간단 정리
config-register 0x2142 (NVRAM 제외) - 비밀번호 복구시 사용
config-register 0x2102 (Flash로 부팅)
config-register 0x2100 (ROM 부팅)
config-register 0x2101 (ROM에 있는 mini IOS 부팅) - flash 에 IOS 손상시 복구용

레지스터 먼저 확인하고 그 다음에 부트시스템 !! 다음에 레지스터 6번째 비트

Bit Number	Hex	Meaning
00-03	0x0000-0x000F	Boots Field Parameters:0x0000 - Stays at the system bootstrap prompt.
0x0001 - Boots the first system image in onboard Flash memory (EPROM).
0x0002-0x000F- Specifies a default netboot filename. Enables boot system commands that override the default netboot filename.
06	0x0040	Ignore NVRAM contents
07	0x0080	Disable boot messages
08	0x0100	Break disabled
09	0x0200	Causes the system to use the secondary bootstrap. This is typically not used (set to 0).
10	0x0400	IP broadcast with all zeros
5,11,12	0x0020, 0x0800, 0x1000	Console line speed
13	0x2000	Boots default ROM software if network boot fails
14	0x4000	IP broadcasts do not have net numbers
15	0x8000	Enables diagnostic messages
Ignores NVRAM contents
Configuration Register Setting	Router Behavior
0x102	Ignores break
9600 console baud
0x1202	1200 baud rate
0x2101	Boots into bootstrap
Ignores break
Boots into ROM if initial boot fails
9600 console baud rate
0x2102	Ignores break
Boots into ROM if initial boot fails
9600 console baud rate default value for most platforms
0x2120	Boots into ROMmon
19200 console speed
0x2122	Ignores break
Boots into ROM if initial boot fails
19200 console baud rate
0x2124	NetBoot
Ignores break
Boots into ROM if initial boot fails
19200 console speed
0x2142	Ignores break
Boots into ROM if initial boot fails
9600 console baud rate
Ignores the contents of Non-Volatile RAM (NVRAM) (ignores configuration)
0x2902	Ignores break
Boots into ROM if initial boot fails
4800 console baud rate
0x2922	Ignores break
Boots into ROM if initial boot fails
38400 console baud rate
0x3122	Ignores break
Boots into ROM if initial boot fails
57600 console baud rate
0x3902	Ignores break
Boots into ROM if initial boot fails
2400 console baud rate
0x3922	Ignores break
Boots into ROM if initial boot fails
115200 console baud rate

참고
http://egloos.zum.com/knyatom/v/1464427

https://m.blog.naver.com/PostView.nhn?blogId=thescream&logNo=200361699&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

0개의 댓글