Limetime's TimeLine
article thumbnail
반응형

알아두면 좋은 라우터 명령어

  • more : Spacebar를 사용해 한 줄 씩 이동이 가능하다.
  • Context sensitive help : 처음 넣는 글자에 따라 도움말이 바뀐다. 물음표(?) 사용
    • ex) Router# cl? → clear clock
      • 글자에 붙여쓰면 그 글자로 시작하는 명령어를 찾아준다.
    • ex) Router# clock ? → set Set the time and date
      • 한 칸 띄어 쓰면 그 명령에서 줄 수 있는 옵션을 알 수 있다.
  • Router# configure memory
    • NVRAM에 있는 백업 구성파일을 현재 RAM에서 동작하고 있는 구성파일 위에 덮어 쓴다.
      • ex) 구성파일을 고치기 전으로 되돌리고 싶을 때 (단, NVRAM에 저장 안했어야 한다.)
  • Router# copy running-config startup-config // RAM 구성파일 → NVRAM 저장
    • = Router# write memory (IOS 10.3 이하는 write memory만 사용 가능)

 

라우터 구성하기 - 직접 구성하기

Router(config)# hostname Cisco-R
Cisco-R(config)# enable secret korea
Cisco-R(config)# enable password cisco
Cisco-R(config)# line vty 0 4 // 0~4 5개 동시 텔넷 가능
Cisco-R(config-line)# login // 로그인 시 패스워드 체크 (안하면 패스워드 안물어봄)
Cisco-R(config-line)# password korea // 텔넷은 패스워드를 설정하지 않으면 접속 불가능.
Cisco-R(config-line)# exit
Cisco-R(config)# interface ethernet 0
Cisco-R(config-if)# no shutdown // 인터페이스 활성화
	00:37:34: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up
Cisco-R(config-if)# ip address 172.16.92.1 255.255.0.0
Cisco-R(config-if)# exit
Cisco-R(config)# ipx routing // Novell IPX 사용
Cisco-R(config)# interface ethernet 0
Cisco-R(config-if)# ipx network 1 // 노벨 IPX 네트워크 번호
Cisco-R(config-if)# exit
Cisco-R(config)# Serial 0
Cisco-R(config-if)# ip address 152.100.10.67 255.255.0.0
Cisco-R(config-if)# no shutdown
	00:38:02: %LINK-3-UPDOWN: Interface Serial0, changed state to down
    // down인 이유는 회선이 죽었거나 DSU/CSU를 라우터와 연결하지 않은 경우
Cisco-R(config-if)# exit
Cisco-R(config)# router igrp 200 // 라우팅 프로토콜 IGRP / AS : 200
Cisco-R(config-router)# network 172.16.0.0
Cisco-R(config-router)# network 152.100.0.0
Cisco-R(config-router)# ^Z // Ctrl + Z
	00:54:11: %sys-5-config_I: Configured from console by console
Cisco-R# show running-config // 이 때 까지 설정한 구성 파일
Building Configuration...
	Current Configuration:
    !
    version 12.0
    Service timestamps debug uptime
    Service timestamps log uptime
    no service password-encryption
    !
    hostname cisco-R
    !
    enable scret 5 $1$g722... // korea를 Encryption
    enable password cisco // 평문
    !
    ip subnet-zero // Default 값. 빼고 싶으면 앞에 no 붙이면 된다.
    ipx routing 00e0.1e5e.1e9c
    !
  	interface Ethernet0
    ip address 172.16.92.1 255.255.0.0
    no ip directed-broadcast
    ipx network 1
    !
    interface Serial0
    ip address 152.100.10.67 255.255.0.0
    no ip directed-broadcast
    no ip mroute-cache
    no fair-queue
    !
    router igrp 200
    	network 152.100.0.0
        network 172.16.0.0
    !
    ip classless
    ...
    line con 0
    	transport input none
    line 1 8
    line aux 0
    line vty 0 4
    	password cisco
        login
    !
    end
    ipx network 1

반드시 'copy running-config startup-config'나 'write memory'로 저장하기!

반응형
profile

Limetime's TimeLine

@Limetime

포스팅이 좋았다면 "공감❤️" 또는 "구독👍🏻" 해주세요!