・・・結局エリアをわけても、OSPFを設定した5つのネットワークがすべてのルータで見えている。おそらく、エリアをわけなかったらルーティングテーブルの O IAがOに変わるだけだろう。この構成ではエリアをわける意味がない事になる。やってみよう・・・・・・・・・・・・・・・やっぱりそうだった。上記のような構成で、端っこのルータの内側ネットワークは知らせたくないという場合はどうしたらよいだろうか?
実用的なのはそれぞれ内側ネットワークをNATによって隠す方法。
そしてもう一つの方法は、passive interfaceにする方法・・・と思ったが違う。確かに内側はpassiveにすべきであろうが、そうしてもやはりこの経路は広告される。それがスタブエリア?エリアを分けただけではなにもかわらないが、スタブに設定することで意味を持つようになる・・・。やってみよう!!
結局、こうなった。
30.0.0.4/30 10.0.0.4/30
| +--------+.6 .5+--------+ +--------+.5 .6+--------+ |
+-------+ 2514_B +---------+ 2501_A +------+ 2514_A +-------+ 2501_B +------+
| .254+--------+ +--------+.6 .5+--------+ +--------+.133 |
192.168.2.0/24 20.0.0.4/30 192.168.1.0/24
<------------- area 1 ---------><------------- area 0 ----------><- area 2 ->
(totally stub) (stub)
2514_B#sho ip proto
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.2.254
Number of areas in this router is 1. 0 normal 1 stub 0 nssa
Maximum path: 4
Routing for Networks:
30.0.0.4 0.0.0.3 area 2
192.168.2.0 0.0.0.255 area 2
Passive Interface(s):
Ethernet0
Routing Information Sources:
Gateway Distance Last Update
20.0.0.5 110 00:24:28
30.0.0.5 110 00:17:20
192.168.2.254 110 00:17:20
192.168.1.133 110 00:26:08
Distance: (default is 110)
2514_B#sho ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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 30.0.0.5 to network 0.0.0.0
C 192.168.2.0/24 is directly connected, Ethernet0
30.0.0.0/30 is subnetted, 1 subnets
C 30.0.0.4 is directly connected, Serial0
O*IA 0.0.0.0/0 [110/65] via 30.0.0.5, 00:17:25, Serial0
2514_B#ping 192.168.1.133
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.133, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/64 ms
2501_B#sho ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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
20.0.0.0/30 is subnetted, 1 subnets
O 20.0.0.4 [110/128] via 10.0.0.5, 00:03:47, Serial0
10.0.0.0/30 is subnetted, 1 subnets
C 10.0.0.4 is directly connected, Serial0
C 192.168.1.0/24 is directly connected, Ethernet0
O IA 192.168.2.0/24 [110/202] via 10.0.0.5, 00:03:48, Serial0
30.0.0.0/30 is subnetted, 1 subnets
O IA 30.0.0.4 [110/192] via 10.0.0.5, 00:03:48, Serial0
2501_B#sho ip proto
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.1.133
It is an area border router
Number of areas in this router is 2. 1 normal 1 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.0.4 0.0.0.3 area 0
192.168.1.0 0.0.0.255 area 2
Passive Interface(s):
Ethernet0
Routing Information Sources:
Gateway Distance Last Update
20.0.0.5 110 00:03:51
30.0.0.5 110 00:03:51
192.168.1.133 110 00:03:51
Distance: (default is 110)
2501_B#ping 192.168.2.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms