OSPF
* 강사님 정리 노트
- 내가 한거
* 실습 자료
* 참고 자료
* link state
1> OSPF
: interface bandwidth
topology table(링크 상태 파악), 연산 소스를 전송 → 연산 부하 ↑
// TIP. 연산 부하를 고민해야 한다.
1. 계층구조 관리 ***
1. 연동되는 라우터들 사이에서
DR(designated router) /BDR(backupDR) - DRother
1-1. 링크 효율 1-2. 통신 일관성
2. area 만들기 [backbone area = area 0 /normal area]
DR / DP / DIS / D ..., = boss
2> ospf packet
(224.0.0.5 : DR/BDR -> DRouter / 224.0.0.6 : DRother -> DR/BDR)
1) hello [10/40, 30/120]
1. neighbor 검색용
2. keepalive -> healthing check
2) DBD : database descriptor : ospf 요약 패킷
3) LSR : link state request 상세정보 요쳥
4) LSU : link state update 상세정보 요청에 대한 응답
5) LSAck : ospf 패킷 정상적 수신 응답
3> ospf neighbor 절차
1) Down : ospf hello를 전송하고 있는 상태
2) Init : hello 수신/ 수신한 hello 안에 내 router-id가 없다.
attempt (지금 무시)
3) 2 way : 서로 router id 교환 --> DR/BDR 선출
4) Exstart : master/slave
5) Exchange : DBD를 교환
6) Loading : LSDB : link state database
7) Full → SPF(shortest path first 최단경로알고리즘 : dijkstra algorithm)
4> ospf network-type
1) BMA(broadcast multi access)
10/40, DR/BDR 선출
ex) Ethernet
2) NBMA(non broadcast multi access)
30/120, DR/BDR 선출
ex) ATM, X.25, Frame Relay
3) point-to-point(HDLC, PPP...)
10/40, DR/BDR 미선출
4) point-to-multi
30/120, DR/BDR 미선출
ex) HDLC, PPP, F/R의 sub interface 중 point-to-point
5> ospf metric 계산식
(cisco ospf 기준 대역폭 100M = 10^8)
10^8
-------------
대역폭(bps)
6> LSA-type (link state advertisement)
= ospf packets
ospf에서의 라우팅 정보
LSA-1 동일 AREA 안에서 모든 OSPF 라우터가 생성한 LSA
LSA-2 동일 AREA 안에서 DR/BDR이 생성한 LSA
동일 AREA 정보, 다른 AREA로 flooding 되지 않는다.
ospf routing table에서 O라고 표기되는 정보
LSA-3 : ABR 라우터가 알려준 다른 AREA 요약 정보
LSA-4 : ABR 라우터가 알려준 ASBR의 위치정보
다른 AREA 정보
ospf routing table에서 IA라고 표기되는 정보
LSA-5 : ASBR라우터가 알려준 다른 도메인 정보(재분배되어진 정보)
ospf routing table에서 E라고 표기되는 정보
7> OSPF Router의 종류
Backbone Router : Backbone Area (Area 0)에 소속된 Router.
Internal(내부) Router : 하나의 Area에만 소속된 Router.
ABR (Area Border Router) : 두 개 이상의 Area에 소속된 Area 경계 Router.
ASBR (AS boundary Router) : OSPF 네트워크와 다른 Routing protocol이
설정된 네트워크를 연결하는 AS 경계 Router.
8> DR/BDR
- 중계 역할을 하는 DR(Designated Router)를 선출하고, DR에 문제가 발생할
경우를 대비해서 Backup용으로 BDR(Backup DR)을 선출한다.
- DR, BDR은 Broadcast 및 Non Broadcast 네트워크에서만 사용. * DR 선출 방법 1) OSPF priority가 가장 높은 Router가 DR로 선출 2) OSPF priority가 동일할 경우 Router-ID가 높은 것이 DR, BDR로 선출 3) DR, BDR이 선출 된 후에 더 높은 순위의 Router가 추가되어도 DR,BDR이 4) DR이 다운될 경우 BDR이 DR이 되고 다시 BDR을 선출 * OSPF 실습 토폴로지 ***** 안되~!!!!!!!!!!!!! // 실무에서 사용하면 퇴사함 ㅋ clear ip route * --------------------------- // 실무에서 기본적으로 하는 절차
로그, 백업
NTP 로그 백업
// 실습 전 체크 사항 show ip int brief show ip protocol
// 모든 장비에 conf t S1/3/4/ R1/2/3/4/5 S2 빼고 다 해주기! -------------------- S1 S2 S3 R1 --> ABR R2 --> ASBR R3 --> ABR S1 ping 22.1.1.1 (×) *** DR 선출 // 구현 전에 R1 S1/R1 show ip ospf neighbor ☜ ★★★★★★ 설정은 R1서 해줬는데 왜 S1서 확인??? S3-R3 [R3] R3 S4-R4 [R4] R4 R1/2/3/4 - R5 [R5] R5 // stub Host -> network // 원래 /24가 맞는데 ospf가 loopback(가상)으로 S1 S4 conf t show ip os int lo 4 S1 // 현재 S1: ping 22.1.1.1 이 안되는 상황임. R2 S1 // 재분배된 거는 E2로 뜸 (External) R2 conf t // 재 분배된 거는 metric 5 라고 뜸 (근데 똑같이 20임 왜지??? E2 라서?) ☜ ★★★★★★ S1 ping 22.1.1.1 // 성공~! show ip route | include E2 E1 : default S4 show ip route | include E2 R2
(Point-to-Point 네트워크에서는 사용하지 않는다.)
(다음으로 높은 Router가 BDR로 선출된다.)
변경되지 않는다.
(Router를 재 부팅하거나 clear ip ospf prcess 명령어를 사용하면 변경)
(DR과 BDR이 아니 Router를 DROTHER라고 한다.)
clear ip eigrp neighbors
clear ip os process > y
프로세스 관리
분리 제어
show cdp
nei
인접핑
no router rip
conf t
router ospf 1
router-id x.x.x.x
S2는 rip 임!!!
conf t
router os 1
router-id 11.1.1.1
network 11.1.1.0 0.0.0.255 area 1
net 1.1.0.0 0.0.255.255 a 1
conf t
router rip
ver 2
no auto
net 2.0.0.0
net 22.0.0.0
end
conf t
router os 1
router-id 33.1.1.1
net 33.1.1.0 0.0.0.255 a 3
net 3.1.0.0 0.0.255.255 a 3
end
S4
conf t
router os 1
router-id 44.1.1.1
net 44.1.1.0 0.0.0.255 a 4
net 4.1.0.0 0.0.255.255 a 4
end
conf t
router os 1
router-id 1.1.1.1
net 1.1.12.0 0.0.0.255 a 0
net 11.1.1.0 0.0.0.255 a 1
net 150.1.15.0 0.0.0.255 a 0
end
conf t
router os 1
router-id 2.1.1.1
net 1.1.12.0 0.0.0.255 a 0
net 200.1.25.0 0.0.0.255 a 0
net 2.3.23.0 0.0.0.255 a 0
exit
router rip
ver 2
no auto
net 22.0.0.0
end
conf t
router os 1
router-id 3.1.1.1
net 1.1.34.0 0.0.0.255 a 0
net 170.1.35.0 0.0.0.255 a 0
net 2.3.23.0 0.0.0.255 a 0
net 33.1.1.0 0.0.0.255 a 3
end
R4--> ABR
conf t
router os 1
router-id 4.1.1.1
net 44.1.1.0 0.0.0.255 a 4
net 199.1.45.0 0.0.0.255 a 0
net 1.1.34.0 0.0.0.255 a 0
end
R5
conf t
router os 1
router-id 5.1.1.1
net 150.1.15.0 0.0.0.255 a 0
net 199.1.45.0 0.0.0.255 a 0
net 170.1.35.0 0.0.0.255 a 0
net 200.1.25.0 0.0.0.255 a 0
end
// 확인
show ip route ospf
show ip ospf neighbor
show ip ospf interface fa0/0
// 원래는 이걸 먼저 하고 앞에거를 작업해야 맞는거임..
// clear(통신 끊는 짓)은 회사에서 하면 짤림 ㅋ
S1-R1 [R1]
conf t
int fa 0/0
ip os pri 100
exi
clear ip ospf process // ospf 연결 끊음
y
conf t
int fa 2/0
ip os pri 100
exi
conf t
int fa 0/0
ip os pri 100
exi
conf t
int fa 0/0
ip os pri 100
exi
int fa 0/1
ip os pri 100
exi
int fa 1/0
ip os pri 100
exi
int fa 2/0
ip os pri 100
S1/3/4, R5
clear ip ospf process
show ip ospf neighbor
파악하고 /32로 바꿔줌(ospf는 똑똑한 놈임)
그래서 (p2p)네트워크로 다시 설정!
S3
show ip ospf interface loopback 3
conf t
int loopback 3
ip ospf network point-to-point
show ip route ospf
show ip ospf interface loopback 4
int loopback 4
ip ospf network point-to-point
show ip route ospf
=> R2의 protocol들 정보 공유 해주기!
conf t
router ospf 1
redistribute rip subnets
show ip route ospf
router rip
redistribute ospf 1 metric 5
E2 : 재분배된 정보의 metric값이 20인 경우
=> metric을 계산하지 않는다?
<=> metric을 사용하지 않는다.
<=> 최적경로 계산하지 않는다.
// metric 계산해 보기
conf t
router rip
redistribute ospf 1 metric 5
exi
router os 1
redistribute rip subnets metric-type 1
S1
show ip route | include E1
'BigData_Off1 > 네트워크기초-CCNA' 카테고리의 다른 글
EIGRP (0) | 2018.04.04 |
---|---|
RIP (이어서..,) (0) | 2018.04.03 |
RIP (0) | 2018.04.02 |
08. NAT (0) | 2018.03.30 |
08. Access Control List(ACL) (0) | 2018.03.29 |