nssa no-summaryエリアの no-redistribute の効果




条件
・R3のLo0をOSPFエリア設定せずにOSPF内に周知してください。
・R3は他のネットワーク情報を受け取らずデフォルトルートのみを受け取るようにしてください。
・ディストリビュートリスト、プレフィックスリストは使用しないでください。


まず下記設定からスタートです。
R3のLo0をconnectedで再配送するので、area 1 はnssaとします。

R1
interface Serial1/0
ip address 1.1.1.1 255.255.255.0
!
Interface lo0
ip address 10.10.10.10 255.255.255.255
!
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 10.10.10.10 0.0.0.0 area 0

R2
interface Serial1/0
ip address 1.1.1.2 255.255.255.0
!
interface Serial1/1
ip address 2.2.2.2 255.255.255.0
!
Interface lo0
ip address 20.20.20.20 255.255.255.255
!
router ospf 1
 network 1.1.1.2 0.0.0.0 area 0
 network 2.2.2.2 0.0.0.0 area 0
 area 1 nssa

R3
interface Serial1/1
ip address 2.2.2.3 255.255.255.0
!
Interface lo0
ip address 30.30.30.30 255.255.255.255
!
router ospf 1
 network 2.2.2.3 0.0.0.0 area 0
 redistribute connected subnets route-map CONN2OSPF
 area 1 nssa

access-list 1 permit 30.30.30.30
!
route-map CONN2OSPF permit 10
 match ip address 1



上記設定の状態で、R3にて sh ip route をみると、他エリアのネットワークも見れる
ことがわかります。


R3# sh ip route
Gateway of last resort is not set

     1.0.0.0/24 is subnetted, 1 subnets
O IA    1.1.1.0 [110/128] via 2.2.2.2, 00:01:45, Serial1/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Serial1/1
     20.0.0.0/32 is subnetted, 1 subnets
O N2    20.20.20.20 [110/20] via 2.2.2.2, 00:00:07, Serial1/1
     10.0.0.0/32 is subnetted, 1 subnets
O IA    10.10.10.10 [110/129] via 2.2.2.2, 00:01:45, Serial1/1
     30.0.0.0/32 is subnetted, 1 subnets
C       30.30.30.30 is directly connected, Loopback0


・R3は他のネットワーク情報を受け取らずデフォルトルートのみを受け取るようにしてください。
2番目の問題のとおり、R3はデフォルトルートのみしか受けとっちゃいけないので、まず
area1 を totaly nssa エリアに変えます。

R2
router opsf 1
area 1 nssa no-summary

これでarea 1は totaly nssaになったので、デフォルトルート以外受け取らないかと思いきや
sh ip route をみると下記のように R2 のconnectedルートが配送されています。。


R3# sh ip route
Gateway of last resort is 2.2.2.2 to network 0.0.0.0

     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Serial1/1
     20.0.0.0/32 is subnetted, 1 subnets
O N2    20.20.20.20 [110/20] via 2.2.2.2, 00:02:15, Serial1/1
     30.0.0.0/32 is subnetted, 1 subnets
C       30.30.30.30 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/65] via 2.2.2.2, 00:00:03, Serial1/1

sh ip ospf database を見ると type-7 LSA で周知されていることがわかります。

R3#sh ip ospd database
                Type-7 AS External Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Tag
20.20.20.20     2.2.2.2         1543        0x80000002 0x00F153 0
30.30.30.30     30.30.30.30     1540        0x80000002 0x0074B3 0

これは、R2 がASBRであり、NSSA ABR もかねているために起こる。
R2のLo0のルートがOSPFに再配送される際に、NSSA area にも配送される
ため totaly nssa でも経路がのってしまう仕様だそうです。


参考
http://www.cisco.com/cisco/web/support/JP/102/1021/1021753_nssa-j.html
これは、NSSA ABR にて no-redistribute オプションを用いればNSSAエリアに外部
ルートが配送されないようにできる。

R2
router ospf 1
area 1 nssa no-redistribute no-summary


R3# sh ip route
Gateway of last resort is 2.2.2.2 to network 0.0.0.0

     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Serial1/1
     30.0.0.0/32 is subnetted, 1 subnets
C       30.30.30.30 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/65] via 2.2.2.2, 00:00:02, Serial1/1

これで、NSSAエリアはデフォルトルートのみとなりました。


ちなみに、
・ディストリビュートリスト、プレフィックスリストは使用しないでください。
3つ目の条件ですが、ディストリビュートリストを使った場合はどうするかというと、
ということで下記を試してみました。

R3
access-list 1 deny 20.20.20.20
access-list 1 permit any

router ospf 1
distribute-list 1 in

これで、R3が20.20.20.20 の経路を受け取らなくなり、no-redistribute と同じ結果になります。
R2 で設定する方法もあるのかな?あとprefix-list を使ったほうほうもあるんかね?


Gateway of last resort is 2.2.2.2 to network 0.0.0.0

     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Serial1/1
     30.0.0.0/32 is subnetted, 1 subnets
C       30.30.30.30 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/65] via 2.2.2.2, 00:00:03, Serial1/1


更新日:2012年8月11日