OSPF Forwarding Address
参考URL : http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/25493-type5-lsa.html
http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/13682-10.html
Normal area と NSSA の場合で、Forwading Address が 0.0.0.0 または 0.0.0.0 以外の時の動作確認をやってみました。
構成は以下
IPアドレスは
リンクが 155.1.0.0/16
ループバックが 150.1.0.0/16 から使う
リンクコストは、
DMVPN : 1000
Ethernet : 10
Loopbak : 1
Ex-1. area 2 が Normal area で R7-R9 のI/F がpassive-interface ではない場合
R5#show ip ospf database external 150.1.9.9
OSPF Router with ID (150.1.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 80
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 150.1.9.9 (External Network Number )
Advertising Router: 150.1.7.7
LS Seq Number: 80000003
Checksum: 0x753
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 155.1.79.9
External Route Tag: 0
フォワーディング アドレス フィールドが 0 以外 にさせるための条件は
- ASBR のネクストホップ インターフェイスで OSPF が有効になっている
- ASBR のネクストホップ インターフェイスが OSPF でパッシブ インターフェイスでない
- ASBR のネクストホップ インターフェイスがポイントツーポイントでない
- ASBR のネクストホップ インターフェイスがポイントツーマルチポイントでない
- ASBR のネクストホップ インターフェイス アドレスが、router ospf コマンドで指定されたネットワーク範囲に入っている
今回は 2番の条件にマッチしているので 0.0.0.0 以外になっている。
Forward Address が 0.0.0.0 以外の場合の経路の決め方は、Forwadring Address までのメトリックを比較する。
R5#sh ip rou 155.1.79.9
Routing entry for 155.1.79.0/24
Known via “ospf 1”, distance 110, metric 1020, type inter area
Last update from 155.1.0.3 on Tunnel0, 00:37:30 ago
Routing Descriptor Blocks:
* 155.1.0.3, from 150.1.3.3, 00:37:30 ago, via Tunnel0
Route metric is 1020, traffic share count is 1
Ex-2. area 2 が Normal area で R7-R9 のI/F が passive-interface の場合
R5#sh ip ospf database external
OSPF Router with ID (150.1.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 2
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 150.1.9.9 (External Network Number )
Advertising Router: 150.1.7.7
LS Seq Number: 80000006
Checksum: 0xBF8C
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Forward Address が 0.0.0.0 に変化した。
Forward Address が 0.0.0.0 の場合の経路の決め方は、LSAを生成するASBR までのメトリックを比較する。
R5#show ip ospf border-routers
i 150.1.6.6 [1010] via 155.1.0.4, Tunnel0, ABR, Area 0, SPF 29
i 150.1.6.6 [1010] via 155.1.0.1, Tunnel0, ABR, Area 0, SPF 29
I 150.1.7.7 [1010] via 155.1.0.3, Tunnel0, ASBR, Area 0, SPF 29
i 150.1.3.3 [1000] via 155.1.0.3, Tunnel0, ABR, Area 0, SPF 29
R5のルーティングテーブル
R5#sh ip rou 150.1.9.9
Routing entry for 150.1.9.9/32
Known via “ospf 1”, distance 110, metric 20, type extern 2, forward metric 1010
Last update from 155.1.0.3 on Tunnel0, 00:05:45 ago
Routing Descriptor Blocks:
* 155.1.0.3, from 150.1.7.7, 00:05:45 ago, via Tunnel0
Route metric is 20, traffic share count is 1
Ex-3. area 2 が NSSA の場合
R5#sh ip ospf database external
OSPF Router with ID (150.1.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 61
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 150.1.9.9 (External Network Number )
Advertising Router: 150.1.6.6
LS Seq Number: 80000002
Checksum: 0x1647
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 155.1.79.9
External Route Tag: 0
R5のルーティングテーブル
R5#sh ip rou 155.1.79.9
Routing entry for 155.1.79.0/24
Known via “ospf 1”, distance 110, metric 1020, type inter area
Last update from 155.1.0.3 on Tunnel0, 00:23:28 ago
Routing Descriptor Blocks:
* 155.1.0.3, from 150.1.3.3, 00:23:28 ago, via Tunnel0
Route metric is 1020, traffic share count is 1
R5からR9 lo0 へtraceroute すると以下の様になる
R5#traceroute 150.1.9.9
1 155.1.0.3 6 msec 5 msec 11 msec
2 155.1.37.7 12 msec 7 msec 6 msec
3 155.1.79.9 7 msec * 27 msec
R6の ospf area 2 の情報
R6#show ip ospf | section Area 2
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
type7 から type5 に変換している
Ex-4. area 2 が NSSA で R6 で Forwading Address を suppressする
R6#sh run | s ospf
router ospf 1
area 2 nssa translate type7 suppress-fa
network 150.1.0.0 0.0.255.255 area 0
network 155.1.67.0 0.0.0.255 area 2
network 155.1.146.0 0.0.0.255 area 0
R5#sh ip ospf database external
OSPF Router with ID (150.1.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 28
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 150.1.9.9 (External Network Number )
Advertising Router: 150.1.6.6
LS Seq Number: 80000003
Checksum: 0xD27E
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Forward Address が 0.0.0.0 になった。
R5#sh ip ospf border-routers
i 150.1.6.6 [1010] via 155.1.0.4, Tunnel0, ABR/ASBR, Area 0, SPF 31
i 150.1.6.6 [1010] via 155.1.0.1, Tunnel0, ABR/ASBR, Area 0, SPF 31
i 150.1.3.3 [1000] via 155.1.0.3, Tunnel0, ABR/ASBR, Area 0, SPF 31
ABRの 150.1.6.6 までは DMVPN の R1とR4経由で等コストなのでECMPされる
R5#sh ip rou 150.1.9.9
Routing entry for 150.1.9.9/32
Known via “ospf 1”, distance 110, metric 20, type extern 2, forward metric 1010
Last update from 155.1.0.4 on Tunnel0, 00:01:41 ago
Routing Descriptor Blocks:
155.1.0.4, from 150.1.6.6, 00:01:41 ago, via Tunnel0
Route metric is 20, traffic share count is 1
* 155.1.0.1, from 150.1.6.6, 00:01:41 ago, via Tunnel0
Route metric is 20, traffic share count is 1
cef の情報
R5#sh ip cef 150.1.9.9
150.1.9.9/32
nexthop 155.1.0.1 Tunnel0
nexthop 155.1.0.4 Tunnel0
R6の ospf area 2 の情報
R6#show ip ospf | section Area 2
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation, suppress forwarding address
type7 から type5 の変換が抑制されている
Ex-5. area 2 が NSSA で R3 で LSAを生成する
NSSAでLSAをアドバタイズするルータは、router-id が最も高いABRになる。
R6 : 150.1.6.6
R3 : 150.1.3.3
R6のほうがrouter-id が大きいので以下の様になっている
R5# sh ip ospf database external
OSPF Router with ID (150.1.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1181
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 150.1.9.9 (External Network Number )
Advertising Router: 150.1.6.6
LS Seq Number: 80000007
Checksum: 0xCA82
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R3のrouter-id を150.1.33.33 に変更してみる
R3(config)#router ospf 1
R3(config-router)#router-id 150.1.33.33
R3(config-router)#end
R3#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
router-id が変更されたことの確認
R3#sh ip protocols | sec ospf
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 150.1.33.33
R5で Type5 LSAの確認
R5#sh ip ospf database external 150.1.9.9
OSPF Router with ID (150.1.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 188
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 150.1.9.9 (External Network Number )
Advertising Router: 150.1.33.33
LS Seq Number: 80000001
Checksum: 0xB770
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 155.1.79.9
External Route Tag: 0
R3側は area 2 nssa translate type7 suppress-fa を設定していないので
0.0.0.0の Forwarding Address になっている
なので 155.1.79.9 までの最短メトリックの経路を選択するので以下のような
ルーティングテーブルになる
R5# sh ip rou 155.1.79.9
Routing entry for 155.1.79.0/24
Known via “ospf 1”, distance 110, metric 1020, type inter area
Last update from 155.1.0.3 on Tunnel0, 00:05:56 ago
Routing Descriptor Blocks:
* 155.1.0.3, from 150.1.33.33, 00:05:56 ago, via Tunnel0
Route metric is 1020, traffic share count is 1