
nat설정,ip 입력은 생략
R1
router ospf 1
network 10.0.12.1 0.0.0.3 area 0
network 10.0.13.0 0.0.0.3 area 0
network 172.16.1.0 0.0.0.15 area 0
R2는 인터페이스로 ospf 선언함
int g0/0
ip ospf 2 area 0
R3는 network 방식
router ospf 3
network 10.0.13.2 0.0.0.3 area 0
network 10.0.34.1 0.0.0.3 area 0
network 192.168.3.126 0.0.0.63 area 0
R4는 인터페이스 방식
int f3/0
ip ospf 4 area 0
int g1/0
ip ospf 4 area 0
int g0/0
ip ospf 4 area
라우터는 높은 값을 id를 결정함
스위치는 반대로 낮은 값을 따라감
R1
sh ip protocols
Router ID는 높은 값을 ID를 결정함
R1의 인터페이스중 가장 높은 값이 192.168.122.131(DHCP 값)이기 때문
라우터는 높은 값을 ID로 결정함, 스위치는 반대로 낮은 값을 따라감
네트워크 방식으로 ospf 적용된것을 확인
R2
sh ip protocols
인터페이스 방식으로 ospf를 적용
R4
ping 8.8.8.8 -> 실패
R1의 nat의 경로값을 추가해줘야함
R1# sh ip route
R1(config)#router ospf 1
R1(config-router)#default-information originate
sh ip route
sh ip ospf database
0.0.0.0 값 학습 및 추가됨
R1
router ospf 1
router-id 1.1.1.1
당장 적용이 안된다는 말이므로
do clear ip ospf process
Reset ALL OSPF processes? [no]: yes 입력
OSPF 프로세스를 초기화를 의미, OSPF 인접 관계를 새로 설정하고, 새로운 OSPF 라우팅 테이블을 구축하는 데 사용
R2~R4도 적용
R2
router ospf 2
router-id 2.2.2.2
do clear ip ospf process
R3
router ospf 3
router-id 3.3.3.3
do clear ip ospf process
R4
router ospf 4
router-id 4.4.4.4
do clear ip ospf process
R1(config-router)#maximum-paths 8
R1(config-router)#distance 85
라우터가 최대 8개의 경로를 동시에 사용
AD값 85로 조정
EIGRP(90) 보다 OSPF(110->85) 경로가 선호됨
sh ip protocols
라우터 ID 1.1.1.1 변경
최대 8개의 경로설정
AD값 85로 조정 확인
R3
sh ip ospf int g1/0
Cost: 1
gigaethernet (100/1000)=0.1
1보다 작은값은 모두 1로 처리-> 1로 동일함
R4에서
sh ip route
110은 ospf 설정 값
3인 이유
3= 1(100/1000) +1(100/1000)+1(100/1000)

FastEther와 GigaEther 매트릭 값이 같음
외부 메트릭 값 계산 vs 외부 메트릭 값 계산 x

1인 이유는 내부계산x

COST= reference bandwidth / interface's bandwidth
ex)
int g0/0
bandwidth 100000
router ospf 1
auto-cost reference-bandwidth 10000
ospf 설정한 라우터를 다 함께 변경해줘야함
R1,R2,R3,R4
router ospf 1 2 3 4
auto-cost reference-bandwidth 10000
라우터마다 각각 다른 ospf 적용
ip ospf cost 100
ospf 10.0.12.0/30 대역 p2p 설정
R1(config-if)#ip ospf network point-to-point
R2(config-if)#ip ospf network point-to-point