ABR - ospf의 area 경계에 있는 것
ASBR - 다른 프로토콜 경계에 있는 것
IR - ospf에만 속해 있는 것
ASBR에는 외부의 프로토콜의 축약을 적고 ABR에는 area내의 주소를 축약한 것을 적어줄 수 있다.
ASBR
router ospf 1
summary-address [축약네트워크] [서브넷 마스크]
ASBR에 다른 프로토콜의 주소를 축약한다는 것을 적어주게 되면 다른 라우터로 전송할때 축약된 라우팅 테이블을 갖게 됩니다.
ABR
router ospf 1
area [area number] range [축약네트워크] [서브넷 마스크]
ABR에서 위의 명령어를 적어주었을 때, 다른 ospf area 로 주소가 넘어갈 때 축약되어 주소가 넘어가게 됩니다.
A 192.168.10.0 ~ 127 1 ~126
B 192.168.10.128 ~ 255 129 ~ 254 255.255.255.128
C 193.168.10.0 ~ 127 1 ~126
D 193.168.10.128 ~ 255 129 ~ 254 255.255.255.128
E 194.168.10.0 ~ 194.168.10.127 1~ 126 255.255.255.128
F 194.168.10.128 ~ 194.168.10.191 129 ~ 190 255.255.255.192
G 194.168.10.192 ~ 194.168.10.223 193 ~ 222 255.255.255.224
그림 1의 각 라우터 작성 내용
<R1>
Router(config-if)#int e0/0
Router(config-if)#ip add 192.168.10.126 255.255.255.128
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int e0/1
Router(config-if)#ip add 192.168.10.254 255.255.255.128
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#int s1/0
Router(config-if)#ip add 1.1.13.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.10.0 0.0.0.255 area 10
Router(config-router)#network 1.1.13.0 0.0.0.255 area 10
Router(config-router)#exit
<R2>
Router(config)#int e0/0
Router(config-if)#ip add 193.168.10.126 255.255.255.128
Router(config-if)#no sh
Router(config-if)#exit
R2(config)#int e0/1
R2(config-if)#ip add 193.168.10.254 255.255.255.128
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#int s1/1
R2(config-if)#ip add 1.1.23.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 193.168.10.0 0.0.0.255 area 20
R2(config-router)#network 1.1.23.0 0.0.0.255 area 20
<R3>
R3(config)#router ospf 1
R3(config-router)#network 1.1.13.0 0.0.0.255 area 10
R3(config-router)#network 1.1.34.0 0.0.0.255 area 0
R3(config-router)#network 1.1.23.0 0.0.0.255 area 20
R3(config-router)#area 10 range 192.168.10.0 255.255.255.0
R3(config-router)#area 20 range 193.168.10.0 255.255.255.0
<R4>
router ospf 1 area 30 range 194.168.10.0 255.255.255.0
network 1.1.34.0 0.0.0.255 area 0
network 1.1.45.0 0.0.0.255 area 30
network 1.1.46.0 0.0.0.255 area 30
<R5>
R5(config)#router ospf 1
R5(config-router)#network 194.168.10.0 0.0.0.127 area 30
R5(config-router)#network 194.168.10.128 0.0.0.63 area 30
R5(config-router)#network 1.1.45.0 0.0.0.255 area 30
<R6>
router ospf 1 network 1.1.46.0 0.0.0.255 area 30
network 1.1.67.0 0.0.0.255 area 30
network 194.168.10.192 0.0.0.31 area 30
<R7>
R7(config)#int e0/0
R7(config-if)#ip add 1.1.67.254 255.255.255.0
R7(config-if)#no sh
R7(config-if)#exit
R7(config)#int e0/1
R7(config-if)#ip add 195.168.10.254 255.255.255.0
R7(config-if)#no sh
R7(config-if)#exit
interface Serial1/0 ip address 1.1.78.1 255.255.255.0
ip summary-address eigrp 100 194.168.10.0 255.255.255.0
serial restart-delay 0
router eigrp 100
network 1.1.78.0 0.0.0.255
network 195.168.10.0
redistribute ospf 1 metric 1 1 1 1 1
router ospf 1
area 30 range 194.168.10.0 255.255.255.0
summary-address 195.168.0.0 255.255.224.0
redistribute eigrp 100 metric 20 subnets
network 1.1.67.0 0.0.0.255 area 30
<R8>
R8(config)#router eigrp 100
R8(config-router)#network 195.168.20.0 0.0.0.255
R8(config-router)#network 1.1.78.0 0.0.0.255
R8(config-router)#no au
R8(config-router)#exit
OSPF Default Route 생성 하기
<방법 1>
ip route 0.0.0.0 0.0.0.0 1.1.34.4
router ospf 1
default-information originate (metric 100 metric-type 1)
<방법2>
router ospf 1
default-information originate always
R7(config)#router ospf 1
R7(config-router)#default-information originate always
R6(config)#ip route 0.0.0.0 0.0.0.0 1.1.67.254
R6(config)#router ospf 1
R6(config-router)#default-information or
R6(config-router)#default-information originate
'Network > Network기초' 카테고리의 다른 글
27. OSPF - Stub (0) | 2023.01.02 |
---|---|
25. OSPF란 ? (0) | 2022.12.30 |
24.EIGRP - 보안 (0) | 2022.12.30 |
댓글