-
4주차 4일 (3/16)네트워크 보안 전문가 과정/4주차 2023. 3. 26. 17:00
문제1. OSPF AREA 종류에는 무엇이 있습니까?
>> OSPF는 계층적인 구조를 가지고있기 때문에 반드시 AREA로 세분화 하게됩니다.
>> Backbone AREA(0) , Non Backbone (1,2,51....)
>> 모든 AREA는 반드시 AREA 0에 연결이되어야 합니다. (ABR은 AREA 0을 가지고 있어야 함)
>> Backbone AREA (Transit Area)
문제2. OSPF AREA의 속성에는 무엇이 있습니까?
(Routing Update, Routing Table을 줄여서 성능이 좋은 Network을 구성)
>> STUB AREA >> LSA TYPE5(E2,E1)
>> Totally STUB AREA >> LSA TYPE5,TYPE3 (E2,E1,IA)
>> Default Route가 자동으로 전파됨
>> NSSA >> STUB와 동일한 기능, AREA ASBR이 존재, TYPE7, (Default 전파)
>> Totally NSSA >> Totally STUB, AREA ASBR이 존재, TYPE7, (자동 Default 전파)
"O, O IA, O E2, O E1, O N1, O N2"
문제3. OSPF Router의 종류에는 무엇이 있습니까?
>> Internal Router (AREA를 하나만 가지고있는 Router)
>> LSDB에 하나의 ARAE의 정보를 생성
>> ABR (2개의 이상의 AREA를 가지고있는 Router) >> 반드시 AREA0가 있어야함
>> LSDB에 다수의 ARAE의 정보를 생성
>> ASBR (다른 AS와 연결된 Router) 재분배 (redistribute)가 적용된 Router
문제4. OSPF LSA TYPE의 종류에 대해 적어 보세요.
-- LSA (OSPF 광고되는 하나의 Network 단위) (LSU안에, LSA가 들어 있습니다.)
1. LSA TYPE1 (O) >> Internal Router (Intra ARAE정보) (AREA를 넘어가지 못함)
2. LSA TYPE 2 >> DR의 정보를 알려주는 기능
3. LSA TYPE3 (O IA) >> ABR (Inter AREA정보) (AREA를 넘어감)
4. LSA TYPE4 >> ASBR의 정보를 알려주는 기능
5. LSA TYPE5 (O E2,E1) >> ASBR, (External AS정보) ( AREA를 넘어감) (재분배)
E2 (Metric 합산안됨)
E1 (Metric 합산)
문제5. OSPF Network TYPE의 종류와 동작 방식에 대해 적어보세요.
OSPF는 L2가 무엇이냐에 따라,
1. Point-to-Point (Serial(HDLC) >> DR선출안함
2. Broadcast (Ethernet) >> DR선출
#show ip ospf interface e0/0
config)#interface e0/0
config-if)#ip ospf network point-to-point
문제6. OSPF에서 DR(Designated Router)를 선출하는 이유와 선출되는 방식에
대해 적어 보세요.
>> Broadcast환경에서는 Routing Update의 중복 수신되는 상황이 발생
>> DR을 통해 update(LSU)를 주고받음
>> 224.0.0.6
>> Priority > Router ID
>> Preempt기능은 없음
1. Summary (축약)
>> Routing Table 및 Routing Update을 줄이기 위하여 사용됨
>> ABR Summary (TEPY3)
>> ABR이 다른 AREA로 경로를 광고하는 경우 사용하는 Summary
router ospf 1
area 41 range 172.16.0.0 255.255.0.0
>> 41은 summary하고자 하는 network이 속해있는 area를 의미
>> ASBR Summary (TYPE5) -> 317Page
router ospf 1
summary-address 172.16.0.0 255.255.0.0
2. OSPF의 Default Route
>> Router는 모르는 목적지로 향하는 Packet이 들어오면 폐기 합니다
>> 그래서 우리 회사의 인터넷 라우터는 전세계의 모든 경로를 알고 있어야함
또는 ISP로 가는 Default Route가 있어야 합니다. !!!
ASBR
config)#ip route 0.0.0.0 0.0.0.0 211.239.123.1
config)#router ospf 1
config-if)#default-information originate (always)
3. OSPF Authentication
>> OSPF를 안전하게 사용하기 위하여, OSPF의 Header에 Password를 설정하는 기능
1. Simple Password
interface e0/0
ip ospf authentication
ip ospf authentication-key cisco
>> 그러나 Wireshark로 보면, passward는 평문으로 노출됨
2. Hash Password
interface e0/0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
>> Wireshark로 보면, password는 노출되지 않음
ospf && ip.addr==11.11.11.1
ospf || ip.addr==11.11.11.1
ospf.auth.type == 2
실습
♦ LAB_13: OSPF configuration (summary)
문제0. 구성도와 같이 구성하고, 통신을 확인합니다.
R4
interface lo 0
ip add 4.4.4.4 255.255.255.0
interface s1/1
ip add 10.1.41.4 255.255.255.0
no shut
router ospf 1
router-id 4.4.4.4
network 4.4.4.0 0.0.0.255 area 1
network 10.1.41.0 0.0.0.255 area 1
R1
interface lo 0
ip add 1.1.1.1 255.255.255.0
interface s1/0
ip add 10.1.12.1 255.255.255.0
no shut
interface s1/1
ip add 10.1.41.1 255.255.255.0
no shut
router ospf 1
router-id 1.1.1.1
network 1.1.1.0 0.0.0.255 area 1
network 10.1.41.0 0.0.0.255 area 1
network 10.1.12.0 0.0.0.255 area 0
R2
interface lo 0
ip add 2.2.2.2 255.255.255.0
interface s1/0
ip add 10.1.12.2 255.255.255.0
no shut
interface s1/1
ip add 10.1.23.2 255.255.255.0
no shut
router ospf 1
router-id 2.2.2.2
network 2.2.2.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 2
network 10.1.12.0 0.0.0.255 area 0
R3
interface lo 0
ip add 3.3.3.3 255.255.255.0
interface s1/1
ip add 10.1.23.3 255.255.255.0
no shut
router ospf 1
router-id 3.3.3.3
network 3.3.3.0 0.0.0.255 area 2
network 10.1.23.0 0.0.0.255 area 2
확인1. R1#show ip ospf neighbor로 2개의 neighbor를 확인합니다.
확인2. R2#show ip ospf neighbor로 2개의 neighbor를 확인합니다.
확인3. R4#ping 3.3.3.3 !!!!! 통신을 확인합니다
문제1. R1에 아래의 Loopback을 선언하고, AREA 0에 포함하세요.
R1 172.16.8.3, 172.16.9.3, 172.16.10.3,172.16.11.3,172.16.12.3,
172.16.13.3,172.16.14.3,172.16.15.3
R1
interface loopback 100
ip add 172.16.8.3 255.255.255.0
ip add 172.16.9.3 255.255.255.0 secondary
ip add 172.16.10.3 255.255.255.0 secondary
ip add 172.16.11.3 255.255.255.0 secondary
ip add 172.16.12.3 255.255.255.0 secondary
ip add 172.16.13.3 255.255.255.0 secondary
ip add 172.16.14.3 255.255.255.0 secondary
ip add 172.16.15.3 255.255.255.0 secondary
ip ospf 1 area 0
확인1. R4#show ip route ospf | in 172 >> 8개 O IA로 보임
확인2. R2#show ip route ospf | in 172 >> 8개 O로 보임
문제2. 위에서 광고한 경로에 대해서, R1에서 Summary를 적용하세요. (ABR Summary)
R4에서 Summary된 경로를 확인 하고 R2에서 Summary되지 않는 이유를 확인 하시오.
R1/R2
router ospf 1
area 0 range 172.16.8.0 255.255.248.0
확인1. R4#show ip route ospf | in 172로 summary된 경로를 확인합니다.
확인2. R2#show ip route ospf | in 172로 summary된 경로를 확인합니다.
>>> R2에서는 Summary 안됨 (TYPE3으로 Summary하기 때문에)
R1이 R2에게 172를 광고할때는 LSA TYPE1임
확인3. R2에서도 Summary를 설정하여, R3에서 Summary가 되도록 설정합니다.
문제3. R3에 아래와 같이 interface를 설정하고, RIP으로 광고하세요.
R3 192.16.16.3,192.16.17.3,192.16.18.3,192.16.19.3,
192.16.20.3,192.16.21.3,192.16.22.3,192.16.23.3
R3
interface loopback 100
ip add 192.168.16.3 255.255.255.0
ip add 192.168.17.3 255.255.255.0 secondary
ip add 192.168.18.3 255.255.255.0 secondary
ip add 192.168.19.3 255.255.255.0 secondary
ip add 192.168.20.3 255.255.255.0 secondary
ip add 192.168.21.3 255.255.255.0 secondary
ip add 192.168.22.3 255.255.255.0 secondary
ip add 192.168.23.3 255.255.255.0 secondary
router rip
network 192.168.16.0
network 192.168.17.0
network 192.168.18.0
network 192.168.19.0
network 192.168.20.0
network 192.168.21.0
network 192.168.22.0
network 192.168.23.0
router ospf 1
redistribute rip metric 20 metric-type 1
확인1. R2#show ip route | in 192로 8개의 경로를 확인합니다. (R1,R4에 동일하게 E1로 보여집니다.)
문제4. R3에서 192.16.16.0/24 ~ 192.16.23.0/24의 경로를 Summary하여, OSPF로 광고하세요. (ASBR Summary)
R2,R1,R4에서 Summary된 E2 경로를 확인 하시오.
R3
router ospf 1
summary-address 192.168.16.0 255.255.248.0
확인1. R2,R1,R4에서 show ip route | in 192로 summary된 경로를 확인합니다.
확인2. R4#ping 192.168.23.3 !!!!!!
(Summary가 되더라도, 통신은 문제없습니다 !!!)
추가문제1. 아래의 경로를 R2에 구성하고 Summary해보세요.
R2
interface lo 100
ip add 200.200.0.2 255.255.255.0
ip add 200.200.1.2 255.255.255.0 secondary
ip add 200.200.2.2 255.255.255.0 secondary
ip add 200.200.3.2 255.255.255.0 secondary
router ospf 1
redistribute connected
summary-address 200.200.0.0 255.255.252.0
확인1. ASBR Summary후에, R1,R3,R4에서 위의 4개의 경로라 1개의 경로로 보이는 것을 확인합니다.
R1,R3,R4#show ip route | in 200
확인2. R1,R3,R4에서 통신을 확인합니다.
R1#ping 200.200.0.2 !!!!!!
R1#ping 200.200.12 !!!!!!
R1#ping 200.200.2.2 !!!!!!
R1#ping 200.200.3.2 !!!!!!
♦ LAB15 OSPF Authentication Configuration
문제1. 구성도와 같이 구성하세요.
R1
interface lo 0
ip add 1.1.1.1 255.255.255.0
ip ospf 1 area 0
interface e0/0
ip add 11.11.11.1 255.255.255.0
ip ospf 1 area 0
no shut
R2
interface lo 0
ip add 2.2.2.2 255.255.255.0
ip ospf 1 area 0
interface e0/0
ip add 11.11.11.2 255.255.255.0
ip ospf 1 area 0
no shut
확인1. R1#show ip ospf neighbor로 1개의 neighbor를 확인합니다.
문제2. R1,R2의 E0/0에 simple password방식으로 인증을 적용하세요. (320Page)
password = cisco
Wireshark로 OSPF Packet의 Header에 인증이 적용된 것을 확인 하세요.
R1
interface e0/0
ip ospf authentication
ip ospf authentication-key cisco
확인1. R2#show ip ospf neighbor로 neighbor down을 확인합니다.
확인2. R2#debug ip ospf adj
*Mar 16 02:36:45.304: OSPF-1 ADJ Et0/0: Rcv pkt from 11.11.11.1 :
Mismatched Authentication type. Input packet specified type 1, we use type 0
확인3. Wireshark로 OSPF Header에 Password를 확인합니다.
ospf && ip.addr==11.11.11.1
ospf && ip.addr==11.11.11.2
확인4. R2의 E0/0에 Password를 구성하고, Neighbor가 성립되는 것을 확인합니다.
문제3. R1,R2의 E0/1에 md5 방식으로 인증을 적용하세요.
key = 1 password = cisco
Wireshark로 OSPF Packet의 Header에 인증이 적용된 것을 확인 하세요.
R1/R2
interface e0/0
ip ospf authentication ?
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 cisco
확인1. Wireshark로 Password가 보이지 않는 것을 확인합니다
(neighbor가 성립되는 것을 확인합니다.)
4. OSPF Virtual Link
R1
router ospf 1
area 1 virtual-link 2.2.2.2
R2
router ospf 1
area 1 virtual-link 1.1.1.1
LAB16: OSPF Virtual - Link
문제1. 구성도와 같이, OSPF를 구성하세요.
(R1의 Router ID 100.100.100.100)
(R2의 Router ID 200.200.200.200)
R4
interface lo 0
ip add 4.4.4.4 255.255.255.0
interface e2/1
ip add 10.1.41.4 255.255.255.0
no shut
router ospf 1
network 4.4.4.0 0.0.0.255 area 2
network 10.1.41.0 0.0.0.255 area 2
R1
interface lo 0
ip add 1.1.1.1 255.255.255.0
interface e2/0
ip add 10.1.12.1 255.255.255.0
no shut
interface e2/1
ip add 10.1.41.1 255.255.255.0
no shut
router ospf 1
router-id 100.100.100.100
network 1.1.1.0 0.0.0.255 area 2
network 10.1.41.0 0.0.0.255 area 2
network 10.1.12.0 0.0.0.255 area 1
R2
interface lo 0
ip add 2.2.2.2 255.255.255.0
interface e2/0
ip add 10.1.12.2 255.255.255.0
no shut
interface e2/1
ip add 10.1.23.2 255.255.255.0
no shut
router ospf 1
router-id 200.200.200.200
network 2.2.2.0 0.0.0.255 area 1
network 10.1.23.0 0.0.0.255 area 0
network 10.1.12.0 0.0.0.255 area 1
R3
interface lo 0
ip add 3.3.3.3 255.255.255.0
interface e2/1
ip add 10.1.23.3 255.255.255.0
no shut
router ospf 1
network 3.3.3.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
문제2. 문제1이 완료된 이후에 (neighbor 정상적으로 성립
R4에서 1.1.1.1로는 통신이 되지만, 2.2.2.2로는 통신이 되지 않는 이유를 확인 하세요
확인1. R1에서 show ip ospf neighbor로 2개의 neighbor를 확인합니다.
확인2. R2에서 show ip ospf neighbor로 2개의 neighbor를 확인합니다.
R4#ping 1.1.1.1 !!!!!
R4#ping 2.2.2.2 .....
R4#ping 3.3.3.3 .....
확인3. R4에서 show ip route ospf로 보면, AREA1, AREA0의 경로(IA)가 없습니다.
>> R1이 AREA1으로 부터 받은 경로를 AREA 2으로 보내지 않기 때문입니다.
(모든 AREA는 AREA0하고만, 경로를 교환합니다.)
문제3. AREA2이 AREA0와 연결되도록, Virtual Link를 설정하세요.
virtual link가 설정된 후 R1에서 아래의 command로 확인 하세요. 또한 R4에서 다른 AREA로 통신이 되는 것을 확인 하세요.
"show ip ospf neighbor"
"show ip ospf virtual-link"
(OSPF Router ID는 #show ip ospf로 확인가능 합니다.)
R1
router ospf 1
area 1 virtual-link 200.200.200.200
R2
router ospf 1
area 1 vitual-link 100.100.100.100
확인1. 아래와 같이 통신을 확인합니다.
R4#ping 1.1.1.1 !!!!!
R4#ping 2.2.2.2 !!!!!
R4#ping 3.3.3.3 !!!!!
확인2. R1#show ip ospf neighbor로 3개의 neighbor를 확인합니다.
(Virtual Link로 OSPF Neighbor가 성립됨)
확인3. R4#show ip route ospf로 보면, AREA1, AREA0의 경로가 보임 !!!!
확인4. R1은 ABR이고, 이제는 AREA1, AREA 2, AREA 0을 모두 가지고 있습니다.
>> R1에는 O IA로 보이는 경로는 없습니다 !!!'네트워크 보안 전문가 과정 > 4주차' 카테고리의 다른 글
4주차 5일 (3/17) (0) 2023.03.26 4주차 3일 (3/15) (0) 2023.03.26 4주차 2일 (3/14) (0) 2023.03.24 4주차 1일 (3/13) (0) 2023.03.23