Main Flow
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# hostname LAB-D
LAB-D(config)# line console 0
LAB-D(config-line)# password cisco
LAB-D(config-line)# line vty 0 4
LAB-D(config-line)# password cisco
LAB-D(config-line)# enable password class
LAB-D(config)# no ip domain-lookup
LAB-D(config)# interface Fastethernet0/0
LAB-D(config-if)# ip address 210.93.105.1 255.255.255.0
LAB-D(config-if)# no shutdown
00:06:24: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
00:06:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to u
LAB-D(config-if)#
LAB-D(config-if)# interface Serial0/1
LAB-D(config-if)# ip address 204.204.7.2 255.255.255.0
LAB-D(config-if)# bandwidth 56
LAB-D(config-if)# clockrate 56000
LAB-D(config-if)# no shutdown
LAB-D(config-if)#
00:08:16: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
00:08:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
LAB-D(config-if)#
LAB-D(config-if)# interface Serial0/0
LAB-D(config-if)# no ip address
LAB-D(config-if)# shutdown
LAB-D(config-if)#
LAB-D(config-if)# exit
LAB-D(config)#
00:08:46: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down
LAB-D(config)#
LAB-D(config)#
LAB-D(config)# router rip
LAB-D(config-router)# network 204.204.7.0
LAB-D(config-router)# network 210.93.105.0
LAB-D(config-router)# exit
LAB-D(config)# ip http server
LAB-D(config)#
LAB-D(config)# ip host pc 210.93.105.3
LAB-D(config)# ip host lab-e 210.93.105.2
LAB-D(config)# ip host lab-c 204.204.7.1
LAB-D(config)#
LAB-D(config)# no ip classless
LAB-D(config)# line con 0
LAB-D(config-line)# exit
LAB-D(config)# banner motd #
Enter TEXT message. End with the character '#'.
Welcome to DWSEO's Router
LAB-D(config)# exit
00:13:02: %SYS-5-CONFIG_I: Configured from console by con
LAB-D#
LAB-D#
LAB-D#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
LAB-D#
Router User Interface
LAB-D>enable
Password:
LAB-D#
LAB-D#disable
LAB-D>
LAB-D> exit
- User EXEC mode : 조회 모드 Router>
- Privileged EXEC mode : 설정 가능 모드 . Router#
- Setup mode - 콘솔에서 문답식으로 표시
- Global configuration mode -구체적으로 설정 모드로 진입할 수 있는 상태 Router(config)#
- Other configuration modes - 좀 더 구체적인 모드 Router(config-if)#
- RXBoot mode - maintenance mode, 패스워드 복구 시에도 쓰임
show interfaces
show version
show protocols
CDP (Cisco Discovery Protocol)
- 라우터에 인터페이스와 직접 연결된 장비들의 설정 값들에 대한 요약 정보 등을 확인(2계층)
cdp enable
LAB-D>show cdp neighbor
LAB-D>show cdp neighbors detail
LAB-D>show cdp entry LAB-C
LAB-D>show cdp interface
네트워크 테스트
- Console : debug. Undebug all
- Telnet : terminal monitor
LAB-D>ping 210.93.105.2
LAB-D>connect 210.93.105.2
LAB-D>telnet 210.93.105.2
LAB-D>210.93.105.2
LAB-D>trace 210.93.105.2
LAB-D>show arp
LAB-D>show ip route ; 라우팅 테이블 보기
LAB-D>show interface Serial0/1 ; 인터페이스 통계정보 보기
clear count: 누적 값 0으로 초기화
실시간 트래픽 점검
라우터 초기 과정
1. 라우터의 하드웨어를 테스트한다.
2. 운영체제로 사용할 시스코 ISO를 찾고 읽어 들여야 한다.
3. 초기 설정 파일을 찾고 프로토콜 기능과 인터페이스 주소를 포함한 설정 명령들을 적용
- Load Bootstrap : from ROM
- Locate and load OS : from Flash, TFTP Server, ROM
- Locate and load Config file or Enter "setup" mode : NVRAM, TFTP Server, COnsole
Startup sequence
Router#show startup-config
Router#show running-config
Router#erase running-config
Router#reload
Router#setup
Router Configuration
configure terminal ; 콘솔에서 정적으로 라우터를 설정할 수 있다.
configure memory ; NVRAM에서 설정 정보를 로딩한다.
Router#show startup-config
Router#show running-config
Router#erase running-config
Router#copy tftp running-config
Router#copy running-config startup-config
Router#copy running-config tftp
- copy (->)
- tftp : TFTP Server
- running-config : RAM
- startup-config : NVRAM
인터페이스 설정
LAB-D(config)#interface Serial0/1
LAB-D(config-if)#shutdown ; 인터페이스 비활성화
LAB-D(config-if)#no shutdown ; 인터페이스 활성화
DCE로 설정된 시리얼 인터페이스의 경우 클럭신호화를 설정해야 한다.
- LAB-D(config-if)# bandwidth 56 ; 단위 K
- LAB-D(config-if)#clockrate 56000 ; 단위 bps
패스워드 설정
1) 콘솔
LAB-D(config)#line console 0
LAB-D(config-line)#login
LAB-D(config-line)#password cisco
2) 텔넷
LAB-D(config)#line vty 0 4
LAB-D(config-line)#login
LAB-D(config-line)#password cisco
3) Enable Password (privileged EXEC mode로의 제한)
LAB-D(config)#enable password class
4) Password 암호화
LAB-D(config)#service password-encryption
LAB-D(config)#no service password-encryption
라우터 Identification Configuration
1) 라우터 이름
Router(config)# hostname LAB-D
LAB-D(config)#
2) Login Banner "message-of-the-day banner to be displayed on all connected terminals
LAB-D(config)#banner motd #
IOS 이미지
라우터가 IOS 이미지를 찾는 순서 : configuration register에 설정된 boot field 참조
Configuration Register Value
exam) Configuration register is 0x2102 (>show ver)
0x---0 : Use ROM monitor mode
0x---1 : Automatically boot from ROM
0x---2 ~ 0x---F : Examine NVRAM for boot system command.
(for passwd recovery use 0x42)
LAB-D(config)#config-register 0x2102
Bootstrap Options in Software
(라우터가 부팅될 때 읽어야 할 시스템 이미지 지정)
1) LAB-D(config)#boot system flash gsnew-image
2) LAB-D(config)#boot system tftp test.exe 172.16.13.111
3) LAB-D(config)#boot system rom
Locating Cisco IOS Software
o Configuration Registers(in NVRAM)
o Boot system commands not found in NVRAM
o Get default Cisco IOS software from flash
o Flash memory empty
o Get default Cisco IOS software from TFTP server.
Cisco's IOS naming conventions
exam) flash:c2600-d-mz.122-5d.bin (>show ver)
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-D-M), Version 12.2(5d), RELEASE SOFTWARE (fc1)
1) Hardware Product Platform : c2600(Cisco 2600)
2) Feature Capability
3) Run Location Compressed Status : mz(RAM, zip compressed)
LAB-D#show flash ; 메모리 공간 확인
LAB-D# copy flash tftp
LAB-D# copy tftp flash
LAB-D# reload ; 재부팅
패스워드 복구
부팅시 Ctrl + Break
rommon 3 > confreg 0x42 ; 플레시 메모리로부터 부팅되도록 한다.(원 값: 0x2102)
rommon 4 > i 라우터가 재부팅하지만 설정 값을 참조하지 않는다.
Would you like to enter the initial configuration dialog? [yes/no]: no
Router>enable
Router#
/* password 확인 (show start) or 변경 */
Router#config-register 0x2102
IP 주소 설정
LAB-D(config-if)# ip address 210.93.105.1 255.255.255.0 ; 인터페이스에 IP 주소와 서브넷을 할당
AB-D(config)#interface FastEthernet0/0
LAB-D(config-if)#ip address 210.93.105.1
% Incomplete command.
LAB-D(config-if)#ip address 210.93.105.1 255.255.255.0
LAB-D(config-if)#no shutdown
LAB-D(config-if)#
00:20:24: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
00:20:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
LAB-D(config-if)#^Z
00:21:47: %SYS-5-CONFIG_I: Configured from console by console
LAB-D#show interface
LAB-D(config)# ip host LAB-E 210.93.105.2 2.0.0.8 ; 라우터의 내부 설정화일에 host name과 ip address간의 mapping 넣어줌
LAB-D(config)# ip name-server server-address
LAB-D(config)# no ip domain-lookup ; name-to-address 변환 하지 않음.
LAB-D# show hosts
라우팅 프로토콜
1) 정적 경로 설정
ip route network [mask] {address | interface } [distance]
network : 목적지 네트워크 또는 서브넷
[mask] : 서브넷 마스크
{address : 다음 목적지의 IP 주소
| interface } : 목적지 네트워크로 가기 위해 사용할 인터페이스 이름
[distance] : 관리자가 설정한 거리(클수록 신뢰도 떨어짐)
2) 디폴트 경로
ip default-network network-number
3) 동적 경로
LAB-D(config)#router rip ; 라우팅 프로토콜 설정하기
LAB-D(config-router) # network network-number ; 라우팅 갱신을 위하여 직접 연결된 네트워크를 명시한다.
팁(Tip)
- ? 입력하여 추가적으로 필요한 명령 볼 수 있다.
- Ctrl+P, 위 화살표 : 방금 친 명령 표시
'라우터 (Router)' 카테고리의 다른 글
라우터 초기화 (0) | 2015.12.24 |
---|---|
라우터 트러블 슈팅 (0) | 2015.12.24 |
Router Status Command #3 (0) | 2015.12.24 |
Router Status Command #2 (0) | 2015.12.24 |
Router Status Command #1 (0) | 2015.12.24 |