OSPF(Open Shortest Path First) :
다이나믹 라우팅 프로토콜(Dynamic Routing Protocol)로, 링크 상태를 확인해 최단 경로를 찾고 패킷을 전달해주는 프로토콜.
IGP(Interior Gateway Protocol)로, 주로 단일 자율 시스템(AS) 내부에서 네트워크 장치 간의 경로를 찾기 위해 사용.
conf t
int lo0
ip add 1.1.1.1 255.255.255.0
int s1/0
ip add 2.2.12.1 255.255.255.0
no sh
conf t
int lo0
ip add 2.2.2.2 255.255.255.0
int s1/0
ip add 2.2.12.2 255.255.255.0
no sh
int s1/1
ip add 2.2.23.2 255.255.255.0
no sh
router ospf 1
network 2.2.23.0 0.0.0.255 area 0
conf t
int lo0
ip add 3.3.3.3 255.255.255.0
int s1/1
ip add 2.2.23.3 255.255.255.0
no sh
int s1/2
ip add 2.2.34.3 255.255.255.0
no sh
router ospf 1
network 2.2.23.0 0.0.0.255 area 0
network 2.2.34.0 0.0.0.255 area 0
conf t
int lo0
ip add 4.4.4.4 255.255.255.0
int s1/2
ip add 2.2.34.4 255.255.255.0
no sh
int s1/3
ip add 2.2.45.4 255.255.255.0
no sh
router ospf 1
network 2.2.34.0 0.0.0.255 area 0
conf t
int lo0
ip add 5.5.5.5 255.255.255.0
int s1/3
ip add 2.2.45.5 255.255.255.0
no sh