- multiple 네트워크 주소를 single 네트 워크 주소로 줄여서 광고해 주기 때문에 라우팅 테이블의 사이즈가 감소한다.
- Network 172.16.0.0 / 24
- Network 172.16.1.0 / 24
- Network 172.16.3.0 / 24
- Network 172.16.4.0 / 24
- 앞의 16 bits는 똑같음.
- third Octet 0 0 0 0 0 0 x y
- 그래서 이를 172.16.0.0 / 22 로 summarization이 가능하다.
- 위 토폴로지를 보면 R2의 Lo0, lo1을 10.10.0.0/22 로 서머라이즈
- 또한 BB1에서 Lo0과 Lo1을 2.1.1.0 / 30 으로 summarize 가능
- Router(config-router)# area [area-number] range [summary-network-address] [subnet-mask]
- 다른 area로 전달할때
- Router(config-router)# summary-address [summary-network-address] [subnet-mask]
- ospf가 아닌 라우팅 프로토콜에서 전달할 때
###R2
router ospf 1
network 192.168.1.0 area 0
redistribute connected subnets
// connected된 interface를 서브넷된 주소로 광고한다
###R1
router ospf 1
network 1.1.1.1 0.0.0.0 a 0
network 172.16.1.0 0.0.0.3 a 0
network 172.16.2.0 0.0.0.3 a 0
network 192.168.1.0 0.0.0.3 a 0
###BB1
router ospf 1
network 2.1.1.1 0.0.0.0 a 1
network 2.1.1.2 0.0.0.0 a 1
network 10.1.1.0 0.0.0.3 a 1
network 172.16.1.0 0.0.0.3 a 0
###BB2
router ospf 1
network 4.4.4.4 0.0.0.0 a 1
network 10.1.1.0 0.0.0.3 a 1
network 172.16.2.0 0.0.0.3 a 0
###R1
R1#sh ip ro
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
redistribute connected subnets
// connected된 interface를 서브넷된 주소로 광고한다
###R1
router ospf 1
network 1.1.1.1 0.0.0.0 a 0
network 172.16.1.0 0.0.0.3 a 0
network 172.16.2.0 0.0.0.3 a 0
network 192.168.1.0 0.0.0.3 a 0
###BB1
router ospf 1
network 2.1.1.1 0.0.0.0 a 1
network 2.1.1.2 0.0.0.0 a 1
network 10.1.1.0 0.0.0.3 a 1
network 172.16.1.0 0.0.0.3 a 0
###BB2
router ospf 1
network 4.4.4.4 0.0.0.0 a 1
network 10.1.1.0 0.0.0.3 a 1
network 172.16.2.0 0.0.0.3 a 0
###R1
R1#sh ip ro
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 2 subnets
O IA 2.1.1.2 [110/782] via 172.16.1.2, 00:00:01, Serial0/0.1
O IA 2.1.1.1 [110/782] via 172.16.1.2, 00:00:01, Serial0/0.1
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/1172] via 172.16.1.2, 00:00:01, Serial0/0.1
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial0/0.1
C 172.16.2.0 is directly connected, Serial0/0.2
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O E2 10.10.1.0/24 [110/20] via 192.168.1.2, 00:00:01, FastEthernet1/0
O E2 10.10.2.0/24 [110/20] via 192.168.1.2, 00:00:01, FastEthernet1/0
O IA 10.1.1.0/30 [110/1171] via 172.16.1.2, 00:00:01, Serial0/0.1
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, FastEthernet1/0
R1#
IA - OSPF inter area [ 이 토폴로지에서는 Area 1 에서 넘어온 정보를 말한다. ]
E2 - OSPF external type 2 [ OSPF가 아닌 곳에서 온 정보를 말한다. R2의 connected interfaces를 말한다. ]
###R2
10.10.1.0 / 10.10.2.0 <-- summerization
10.10.0.0 /22
router ospf 1
summary-address 10.10.0.0 255.255.252.0
end
###R1
sh ip route
O E2 10.10.0.0/22 [110/20] via 192.168.1.2, 00:00:24, FastEthernet1/0
summarization으로인해 변화된 routing table을 확인할 수 있다. [ 10.10.0.0 / 22 ]
###BB1
router ospf 1
area 1 range 2.1.1.0 255.255.255.252
end
자 이제 BB1의 주소도 summarize 해보자.
###R1
sh ip route
O IA 2.1.1.2/32 [110/1953] via 172.16.2.2, 00:00:03, Serial0/0.2
O IA 2.1.1.0/30 [110/782] via 172.16.1.2, 00:00:03, Serial0/0.1
O IA 2.1.1.1/32 [110/1953] via 172.16.2.2, 00:00:03, Serial0/0.2
위와 같이 오히려 라우팅 테이블이 늘어났다.
summarization된 주소와 서브넷 주소가 그대로 들어왔는데, 자세히 보면 라우팅 정보를 받은 인터페이스가 다르다.
이와 같은 이유로 BB2에서도 똑같이 이를 해 주어야 한다.
##BB2
area 1 range 2.1.1.0 255.255.255.252
##R1
R1#sh ip ro
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 2 subnets
O IA 2.1.1.2 [110/782] via 172.16.1.2, 00:00:01, Serial0/0.1
O IA 2.1.1.1 [110/782] via 172.16.1.2, 00:00:01, Serial0/0.1
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/1172] via 172.16.1.2, 00:00:01, Serial0/0.1
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial0/0.1
C 172.16.2.0 is directly connected, Serial0/0.2
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O E2 10.10.1.0/24 [110/20] via 192.168.1.2, 00:00:01, FastEthernet1/0
O E2 10.10.2.0/24 [110/20] via 192.168.1.2, 00:00:01, FastEthernet1/0
O IA 10.1.1.0/30 [110/1171] via 172.16.1.2, 00:00:01, Serial0/0.1
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, FastEthernet1/0
R1#
IA - OSPF inter area [ 이 토폴로지에서는 Area 1 에서 넘어온 정보를 말한다. ]
E2 - OSPF external type 2 [ OSPF가 아닌 곳에서 온 정보를 말한다. R2의 connected interfaces를 말한다. ]
###R2
10.10.1.0 / 10.10.2.0 <-- summerization
10.10.0.0 /22
router ospf 1
summary-address 10.10.0.0 255.255.252.0
end
###R1
sh ip route
O E2 10.10.0.0/22 [110/20] via 192.168.1.2, 00:00:24, FastEthernet1/0
summarization으로인해 변화된 routing table을 확인할 수 있다. [ 10.10.0.0 / 22 ]
###BB1
router ospf 1
area 1 range 2.1.1.0 255.255.255.252
end
자 이제 BB1의 주소도 summarize 해보자.
###R1
sh ip route
O IA 2.1.1.2/32 [110/1953] via 172.16.2.2, 00:00:03, Serial0/0.2
O IA 2.1.1.0/30 [110/782] via 172.16.1.2, 00:00:03, Serial0/0.1
O IA 2.1.1.1/32 [110/1953] via 172.16.2.2, 00:00:03, Serial0/0.2
위와 같이 오히려 라우팅 테이블이 늘어났다.
summarization된 주소와 서브넷 주소가 그대로 들어왔는데, 자세히 보면 라우팅 정보를 받은 인터페이스가 다르다.
이와 같은 이유로 BB2에서도 똑같이 이를 해 주어야 한다.
##BB2
area 1 range 2.1.1.0 255.255.255.252
##R1
R1#sh ip ro
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/30 is subnetted, 1 subnets
O IA 2.1.1.0 [110/782] via 172.16.1.2, 00:00:03, Serial0/0.1
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/1172] via 172.16.1.2, 00:05:47, Serial0/0.1
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial0/0.1
C 172.16.2.0 is directly connected, Serial0/0.2
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 10.10.0.0/22 [110/20] via 192.168.1.2, 00:01:54, FastEthernet1/0
O IA 10.1.1.0/30 [110/1171] via 172.16.1.2, 00:05:47, Serial0/0.1
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, FastEthernet1/0
R1#
확 줄어들은 Routing Table을 볼 수 있다.
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/30 is subnetted, 1 subnets
O IA 2.1.1.0 [110/782] via 172.16.1.2, 00:00:03, Serial0/0.1
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/1172] via 172.16.1.2, 00:05:47, Serial0/0.1
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial0/0.1
C 172.16.2.0 is directly connected, Serial0/0.2
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 10.10.0.0/22 [110/20] via 192.168.1.2, 00:01:54, FastEthernet1/0
O IA 10.1.1.0/30 [110/1171] via 172.16.1.2, 00:05:47, Serial0/0.1
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, FastEthernet1/0
R1#
확 줄어들은 Routing Table을 볼 수 있다.