21.1K
오라일리가 시스코 라우터에 대한 힌트와 팁을 담은 책을 써달라는 요청을 해왔을 때 필자는 시스코 IOS 디바이스의 다양한 특징들을 모두 다루는 리스트를 만드는 작업이 결코 쉽지는 않을 것이라는 예상은 이미 했었다.
Router1#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#hostname MyRouter
MyRouter(config)#^Z
MyRouter#
보다시피 라우터의 이름이 즉각적으로 처리되어 MyRouter로 바뀌었다. 이 개념은 라우터 설정 모드에서는 언제든지 적용할 수 있다.
! Here is an interface description.
! Document as much about the interface as possible
interface Serial0
description Connection To Irvine: Wan ID [23499]
이용할 수 있는 베너 메시지로는 오늘의 메시지(MOTD), 로그인, 곧 출시 등등이 있다. 각각의 설명은 문서화된 자료를 참고하거나 『Cisco IOS in a Nutshell』을 참고하기 바란다. 아래에 있는 예제는 MOTD 배너로서 디바이스에 접속하여 처음으로 보게 될 메시지이다.
MyRouter(config)#banner motd #
Enter TEXT message. End with the character "#".
Welcome to MyRouter.
Some legalese should go here about unauthorized access.
#
접근-리스트에 있는 remark 선언은 상대적으로 새로운 특징이다. 이것은 IOS 버전 12.0(2)T에 처음으로 선보인 특징이다. 이 간편한 명령은 여러분이 성취하고자 하는 것을 묘사하는 접근-리스트에 있는 엔트리를 만들 수 있도록 해준다. 명령은 100자 정도의 길이까지도 적을 수 있다. REMARK 선언은 숫자로 된 이름이 붙여진 접근-리스트에서 작동된다.
access-list 1 remark Permit our private network through the list
access-list 1 permit 10.1.1.0 0.0.0.255
access-list 1 remark Just deny everything else
access-list 1 deny any
왜 "!" 표시로 설정에 주석을 달았는지 궁금할 것이다.
![]() |
||
| Cisco IOS in a Nutshell | ||
MyRouter#reload in 3
Reload scheduled in 3 minutes
Proceed with reload? [confirm]y
일단은 우리가 해야만 할 일을 할 수 있는 3분의 여유는 가지게 된 셈이다. 접근-리스트를 serial0에 적용하고 있다고 말해보자.
MyRouter#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
MyRouter(config)#interface serial0
MyRouter(config-if)#ip access-group 110 in
MyRouter(config-if)#^Z
MyRouter#
약간의 변화를 주었지만 모든 것은 여전히 잘 작동되고 있다(확실히 모든 것이 잘 작동되고 있다고 말할 수는 없지만 최소한 접속이 끊어지는 사태는 막지 않았는가?). 이제 우리가 해야 할 작업은 아래의 명령어로 곧 시작될 리로딩을 취소하는 것이다.
MyRouter#reload cancel
그렇지않고 접근-리스트 업데이트가 정말로 라우터의 접속을 끊어버릴 경우 우리가 해야 할 작업은 라우터가 온라인 상태로 되돌아오기 전에 3분(추가로 라우터의 리로딩 시간도 더해야 함) 정도 기다리는 것이다. 리로딩이 끝나면 라우터는 접근-리스트가 변경되기 전에 저장된 원래 설정을 사용할 것이다.
! Enable service password-encryption if it isn"t already.
service password-encryption
! Here is our enable password, which is ok
! but not too secure.
enable password 7 141B171F01012325
! Here is our enable secret, much better.
enable secret 5 $1$99Jc$dxVXUkwMM3Edvj7f0SUrL/
"enable secret 패스워드"가 "enable 패스워드"를 오버라이드 한다는 사실을 잊지 말자. 안전하게 enable secret 명령어를 사용해라. enable secret 명령어는 패스워드를 인코드하는데 있어 더 향상된 암호화 방법을 사용한다.
MyRouter#shwo
Translating "shwo"...domain server (10.1.1.2)
% Unknown command or computer name, or unable to find computer address
MyRouter#
위에서 잘못한 것은 show를 "shwo"로 잘못 썼다는 것 뿐이다. 우리는 디바이스가 "shwo"로 잘못 이름 붙여지기를 원하는 것은 아니다. 이러한 상황을 처리할 방법은 앞서있었던 전송 메소드를 변경하는 것이다.
! Console port
line con 0
transport preferred none
! VTY Ports
line vty 0 5
transport preferred none
우리가 잘못 기입한 키워드 때문에 실패했던 접속 불량을 출력해 준다.
MyRouter#shwo
^
% Invalid input detected at "^" marker.
! allow pings into the network
access-list 110 permit icmp any any echo
! allow ping responses
access-list 110 permit icmp any any echo-reply
! allow ICMP source-quench
access-list 110 permit icmp any any source-quench
! allow path MTU discovery
access-list 110 permit icmp any any packet-too-big
! allow time-exceeded, which is useful for traceroute
access-list 110 permit icmp any any time-exceeded
! deny all other ICMP packets
access-list 110 deny icmp any any
두 번째로 말할 접근-리스트 함정은 내부 네트워크에서 제공자의 DNS 서버로 DNS를 허용하도록 하는 것을 잊어버릴 때 발생한다. 이러한 것은 주로 내부 DNS 서버 실행이 없을 수도 있는 가정용 또는 작은 사무실용 라우터에서 문제가 된다.
access-list 110 permit udp host 172.16.1.1 eq domain any gt 1023
access-list 110 permit udp host 172.30.1.1 eq domain any gt 1023
Control A 라인의 처음으로 Control E 라인의 끝으로 Control K 커서 오른쪽에 있는 것은 모두 삭제 Control P 히스토리 버퍼에 있는 선행 명령 환원 Control N 히스토리 버퍼에 있는 차기 명령 환원
interface serial0
encapsulation frame-relay
이제 하위-인터페이스를 생성해보자.
interface serial0.1 point-to-point
description This is our first sub interface for serial1
interface serial0
description This is a 56k link
bandwidth 56
이제 여러분이 알고 있어야 할 아주 기초적인 열 가지 사항에 대해 거의 다 말한 것 같다. 필자는 이 팁들로 여러분들이 시스코 IOS 디바이스를 다루는데 있어 흔하게 저지를 수 있는 실수들을 미리 방지할 수 있길 바란다.
댓글