CCNP(BSCI)
OSPF, EIGRP Authentication
OSPF 인증 방식에는 2가지가 존재한다.
1. Clear Text 인증방식
2. MD5 인증방식
ClearText 인증방식은 보안상 좋지 않다. 인증내용이 암호화 되지 않고 전송이 되어
중간에 패킷을 따서 열어보면 내용이 적나라하게 드러난다.
하지만 MD5 인증방식을 사용하면 암호화 되어 전송하기 때문에 패킷을 따내어도 뚫기가 힘들다.
그러므로 ClearText 인증방식은 생략하고 MD5 인증방식에 대해서만 공략해보겠다.
1. 네이버에 대해 MD5 인증방식
- 네이버를 맺은 인터페이스로 들어가서 명령을 입력한다.
ip ospf authentication message-digest (MD5 인증방식을 사용하겠다)
ip ospf message-digest 1 md5 cisco (MD5 키는 1, 암호는 cisco)
2. area 에 대해 MD5 인증방식
- OSPF 설정모드로 들어가 명령을 입력한다.
area 0 authentication message-digest (area 0 에 MD5 인증방식을 사용하겠다.)
- area 0 광고를 송신할 인터페이스에 들어가 명령을 입력한다.
ip ospf message-digest 1 md5 cisco (MD5 키는 1, 암호는 cisco)
뭐...대략 끝이 났는데.........................
Virtual-Link 도 인증이 가능하다.
1. Virtual-Link 구성
2. Plain Text Authentication
3. MD5 Authentication
4. Virtual-Link Authentication
1) Virtual-Link 구성
- Area X+1 네트워크 정보가 다른 Area로도 업데이트 되도록 R1-R3, R2-R4 Area X에서 Virtual-Link를 구성하여라.
# R1
en
conf t
!
router ospf 1
area 14 virtual-link 3.3.3.3
end
!
# R3
en
conf t
!
router ospf 1
area 14 virtual-link 1.1.1.1
end
!
# R2
en
conf t
!
router ospf 1
area 14 virtual-link 4.4.4.4
end
!
# R4
en
conf t
!
router ospf 1
area 14 virtual-link 2.2.2.2
end
!
2) Plain Text 인증
- Area 0 구간에 Plain Text 인증을 실시하여라.
# R1
en
conf t
!
router ospf 1
area 0 authentication
!
int s 0/0
ip ospf authentication-key 13
end
!
# R2
en
conf t
!
router ospf 1
area 0 authentication
!
int s 0/0
ip ospf authentication-key 13
end
!
# BB1
en
conf t
!
router ospf 1
area 0 authentication
!
int s 0/0
ip ospf authentication-key 13
end
!
3) MD5 인증
- Area 0 구간에 MD5 인증을 실시하여라.
# R1
en
conf t
!
router ospf 1
area 0 authentication message-digest
!
int s 0
ip ospf message-digest-key 13 md5 cisco
end
!
# R2
en
conf t
!
router ospf 1
area 0 authentication message-digest
!
int s 0
ip ospf message-digest-key 13 md5 cisco
end
!
# BB1
en
conf t
!
router ospf 1
area 0 authentication message-digest
!
int s 0
ip ospf message-digest-key 13 md5 cisco
end
!
4) Virtual-Link 인증
- Area 0 구간에 MD5 인증을 실시하여라.(앞 3번 과정에서 설정이 되어 있는 상태)
- Virtual-Link를 구성할떄 MD5 인증을 실시하여라.
# R1
en
conf t
!
router ospf 1
area 14 virtual-link 3.3.3.3 message-digest-key 13 md5 cisco
end
!
# R3
en
conf t
!
router ospf 1
area 0 authentication message-digest
area 14 virtual-link 1.1.1.1 message-digest-key 13 md5 cisco
end
!
# R2
en
conf t
!
router ospf 1
area 14 virtual-link 4.4.4.4 message-digest-key 13 md5 cisco
end
!
# R4
en
conf t
!
router ospf 1
area 0 authentication message-digest
area 14 virtual-link 2.2.2.2 message-digest-key 13 md5 cisco
end
!
-------------------------------------------------------------------------------------------------------------------------
# OSPF 요약 정리 - 2 -
- Virtual-Link
1) Area 0을 경유하지 않는 Area가 추가될 경우
2) 서로 다른 구간에 Area 0 구간이 존재할때 통합 Area 0으로 구성을 실시할 경우
3) 만약 Area 0 구간에 OSPF 인증이 실행되고 있다면 추가 Area를 가지고 있는 라우터에서도 Area 0에 대한 인증을 실시해야하며,
Virtual-Link 구성에 대한 인증도실시해야 한다.
4) Stub 관련 설정이 있으면 Virtual-Link를 생성할 수 없다.
5) 설정 : Area 0을 갖고 있는 ABR 라우터와 추가 Area를 갖고 있는 ABR 라우터 간에 실시
Router(config)# router ospf 1
Router(config-router)# area x virtual-link [상대방 라우터 아이디]
6) 정보 확인 : show ip ospf neighbor, show ip ospf virtual-link,
추가 Area를 갖고 있는 ABR 라우터에서 'show ip ospf'를 실시하여 Area 0이 생성 됬는지 확인 실시
- Plain Text Authentication
1) 평문 인증
2) Area 단위로 인증 실시
3) 설정 : 프로세서에서 인증을 실시하고 인터페이스에 적용
Router(config)# router ospf 1
Router(config-router)# area 0 authentication
Router(config-router)# exit
Router(config)# interface s 0/0 <- Area 0에 포함된 인터페이스
Router(config-if)# ip ospf authentication-key 13
- MD5 Authentication
1) MD5 해쉬 함수 인증
2) Area 단위로 인증 실시
3) 설정 : 프로세서에서 인증을 실시하고 인터페이스에 적용
Router(config)# router ospf 1
Router(config-router)# area 0 authentication message-digest
Router(config-router)# exit
Router(config)# interface s 0/0 <- Area 0에 포함된 인터페이스
Router(config-if)# ip ospf message-digest-key 13 md5 cisco
- Virtual-Link Plain Text Authenticaion
Router(config)# router ospf 1
Router(config-router)# area x virtual-link [상대방 라우터 아이디] authentication-key 13
- Virtual-Link MD5 Authenticaion
Router(config)# router ospf 1
Router(config-router)# area x virtual-link [상대방 라우터 아이디] message-digest-key 13 md5 cisco
PPP에서 인증 방식에 대해 알아보겠다.
PPP 인증 방식에는 CHAP 방식과 PAP 방식으로 나뉜다.
PAP : Clear Text(평문) 방식으로 암호화 처리,
인증 단계는 two-way-handshake
1) Authentication Request
2) Authentication Ack
CHAP : MD5 Hash에 의한 암호화 처리,
인증 단계는 three-way-handshake
1) Challenge Message
2) Response
3) Accept / Reject
PAP는 평문 인증 방식으로 보내져서 공격에 의해 보호 수단이 없는 단점을 가지고 있어
일반적으로 CHAP 인증 방식을 사용하여 보안성을 강화한다.
간단한 Lab을 통하여 각 인증 방식에 대해 알아 보자.
Router 두 대에 단순히 Serial 만 연결하고 구동하여 보았다.
=============================================================================
[localhost]
[[3725]]
image = D:\IOS\c3725-i-mz.123-1a.bin
ram = 96
slot1 = NM-4T
idlepc = 0x605b6dcc
[[Router R1]]
model = 3725
console = 2001
s1/1 = R2 s1/2
[[Router R2]]
model = 3725
console = 2002
=============================================================================
# CHAP Authentication
1. 설정
R2 Router도 마찬가지로 username, password 와 encapsulation 과 authentication을 설정한다.
2. Debug
R1# debug ppp negotiation <<<<<<< 으로 알아봄
CHAP 인증 단계에 따라 Challenge, Response, Success 3단계로 이루어 진다.
3. Packet
1) Challenge Packet
2) Response Packet
3) Success Packet
위와 같이 PPP CHAP 방식 인증에 대해 설정과 Debug와 Packet을 알아 보았다.
크게 어렵지 않게 인증에 대해 설정할 수 있는 듯 하다. ^^;
# PAP Authentication
1. 설정
sent-username을 설정하는 부분이 조금 모르겠다.
어떤 때에 one-way 방식으로 인증을 하는지...;
Cisco 홈페이지에 찾아 본 봐로는 아래와 같다.
Note: The function of the username command for PAP is different than its function for CHAP. With CHAP, this username and password are used to generate the response to the challenge, but PAP only uses it to verify that an incoming username and password are valid.
For one-way authentication, this command is only required on the called router. For two-way authentication this command is necessary on both sides.
PPP pap sent-username <username> password <password>
사전질을 해서 대충 무슨 말인지 알아 먹겠다만 크게 이해 되지는 않는다. 통과~
2. Debug
3. Packet
1) Authentication-Request
2) Authentication-Ack
Microsoft Office OneNote 2007을 사용하여 작성했습니다.
모든 노트 및 정보를 한 곳에서 볼 수 있습니다.