■ 1. CLI Mode 기본
User EXEC Mode
Router>
→ 기본적인 확인만 가능
Privileged EXEC Mode
Router#
→ show 명령어, 설정 모드 진입 가능
Global Configuration Mode
Router(config)#
→ 장비 전체 설정
Interface Configuration Mode
Router(config-if)#
→ 특정 Interface 설정
■ 2. enable
User EXEC → Privileged EXEC
Router> enable
Router#
반대로:
disable
Router# disable
Router>
■ 3. configure terminal
Privileged EXEC
→ Global Configuration Mode
Router# configure terminal
Router(config)#
■ 4. exit
현재 Mode에서 한 단계 위로 이동
예:
R1(config-if)# exit
R1(config)#
R1(config)# exit
R1#
⭐ exit = 한 단계 위
■ 5. end / Ctrl + Z
어떤 Configuration Mode에서든
Privileged EXEC Mode로 바로 이동
R1(config-if)# end
R1#
또는:
Ctrl + Z
⭐ exit
→ 한 단계 위
⭐ end / Ctrl+Z
→ 바로 #
■ 6. show
장비의 상태와 설정을 확인할 때 사용.
대표 명령어:
show running-config
→ 현재 실행 중인 설정
show startup-config
→ NVRAM에 저장된 설정
show version
→ IOS 버전 / 장비 정보 / 부팅 정보
show ip interface brief
→ Interface 상태를 요약해서 확인
show interfaces
→ Interface 상세 정보
show ip route
→ Routing Table 확인
show mac address-table
→ Switch MAC Address Table 확인
show arp
→ ARP 정보 확인
■ 7. show running-config
현재 RAM에서 동작 중인 설정 확인.
R1# show running-config
⭐ 줄여서:
show run
또는:
show running-config
■ 8. show startup-config
NVRAM에 저장된 설정 확인.
R1# show startup-config
Running-config와 비교하면
현재 설정이 저장되어 있는지 확인할 수 있다.
■ 9. show version
장비의 기본 정보를 확인.
R1# show version
주요 확인 정보:
- IOS Version
- 장비 모델
- RAM
- Flash
- Uptime
- Configuration Register
- 마지막 Reload 정보
■ 10. show ip interface brief
⭐⭐⭐ 매우 중요 ⭐⭐⭐
Interface 상태를 한눈에 확인.
R1# show ip interface brief
예:
Interface IP-Address Status Protocol
GigabitEthernet0/0 192.168.1.1 up up
GigabitEthernet0/1 unassigned administratively down down
여기서:
Status
→ Layer 1 상태
Protocol
→ Layer 2 상태
⭐ 중요:
up / up
→ 정상적으로 동작
administratively down / down
→ shutdown 상태
down / down
→ 물리적 연결 문제 등을 의심
■ 11. interface
특정 Interface의 설정 모드로 들어간다.
R1(config)# interface gigabitEthernet 0/0
또는:
R1(config)# interface g0/0
결과:
R1(config-if)#
■ 12. ip address
Router Interface 등에 IPv4 주소를 설정.
R1(config-if)# ip address 192.168.1.1 255.255.255.0
구조:
ip address [IP 주소] [Subnet Mask]
■ 13. no shutdown
Interface를 활성화.
R1(config-if)# no shutdown
줄여서:
no shut
반대로 Interface를 비활성화:
shutdown
⭐ 매우 중요:
shutdown
→ Interface 비활성화
no shutdown
→ Interface 활성화
■ 14. description
Interface에 설명을 적는다.
R1(config-if)# description Connection_to_Switch
예:
interface g0/0
description LAN
설정 확인 시:
description LAN
실제 네트워크에서는
"이 포트가 어디에 연결되어 있는지"
기록하는 용도로 사용.
■ 15. hostname
장비 이름 변경.
R1(config)# hostname SW1
결과:
SW1(config)#
예:
Router
↓
hostname R1
↓
R1
■ 16. 설정 삭제
설정 앞에 `no`를 붙이면
해당 설정을 제거할 수 있다.
예:
ip address 192.168.1.1 255.255.255.0
삭제:
no ip address
예:
description LAN
삭제:
no description
⭐ `no` = 설정 제거/비활성화
■ 17. 명령어 축약
Cisco IOS는 명령어를
일부만 입력해도 인식할 수 있다.
예:
configure terminal
→
conf t
show running-config
→
show run
interface gigabitEthernet 0/0
→
int g0/0
no shutdown
→
no shut
⭐ 단, 입력한 부분이 명령어를
유일하게 식별할 수 있어야 한다.
■ 18. ? 사용
모르는 명령어를 확인할 때:
R1# ?
가능한 명령어 목록을 보여준다.
특정 명령어 다음에:
R1# show ?
→ show 다음에 사용할 수 있는 명령어 확인
예:
R1# show ip ?
⭐ Cisco CLI에서 `?`는 매우 중요.
■ 19. Tab 자동완성
명령어를 일부 입력하고:
Tab
→ 자동완성
예:
R1# conf[TAB]
→ configure
■ 20. 명령어 오류
잘못된 명령어를 입력하면:
% Invalid input detected at '^' marker.
`^`
→ IOS가 잘못된 부분을 표시.
■ 21. 명령어 입력 취소
현재 입력 중인 명령어를 취소:
Ctrl + C
예:
R1(config)# interface g0/0
↑
아직 실행 전
Ctrl+C
→ 입력 취소
⭐ Ctrl+C
→ 현재 명령어/작업 취소
■ 22. 이전 명령어
↑ / ↓ 방향키
→ 이전에 입력한 명령어 확인
또는:
show history
→ 명령어 history 확인
■ 23. 설정 저장
설정을 변경하면 Running-config에 적용된다.
저장:
R1# copy running-config startup-config
줄여서:
R1# copy run start
이후 재부팅해도 설정 유지.
■ 24. reload
장비 재부팅:
R1# reload
⭐ reload 전에
Running-config가 Startup-config에 저장되어 있는지 확인하는 것이 좋다.
■ 25. 기본적인 Router 설정 예시
User EXEC
→ Privileged EXEC
→ Global Configuration
→ Interface 설정
→ 저장
예:
Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# interface g0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# exit
R1# copy running-config startup-config
■ 26. 기본적인 Switch 설정 예시
Switch> enable
Switch# configure terminal
Switch(config)# hostname SW1
SW1(config)# interface g0/1
SW1(config-if)# description Connected_to_R1
SW1(config-if)# no shutdown
SW1(config-if)# exit
SW1(config)# exit
SW1# copy running-config startup-config
🔥 시험용 핵심 명령어
enable
→ > → #
configure terminal
→ # → (config)#
interface g0/0
→ Interface 설정
ip address [IP] [Mask]
→ IP 설정
no shutdown
→ Interface 활성화
shutdown
→ Interface 비활성화
show ip interface brief
→ Interface 상태 확인
show running-config
→ 현재 설정 확인
show startup-config
→ 저장된 설정 확인
show version
→ 장비/IOS 정보
show ip route
→ Routing Table
show mac address-table
→ MAC Table
show arp
→ ARP Table
copy run start
→ 설정 저장
reload
→ 재부팅
exit
→ 한 단계 위
end / Ctrl+Z
→ 바로 Privileged EXEC
🧠 초압축 암기
> > enable → #
> # configure terminal → (config)#
> (config)# interface g0/0 → (config-if)#
> (config-if)# ip address IP MASK
> (config-if)# no shutdown
> exit → 한 단계 위
> end → 바로 #
> copy run start → 저장
> show ip int brief → Interface 확인
⚠️ 특히 헷갈리는 것
show running-config
→ "현재 사용 중인 설정"
show startup-config
→ "저장되어 있는 설정"
copy run start
→ "현재 설정을 저장"
shutdown
→ 끄기
no shutdown
→ 켜기
exit
→ 한 단계 위
end
→ 바로 Privileged EXEC