今回はOSPFのNSSAのdefault-information-originateオプションを解説します。
座学
NSSAのdefault-information-originateオプション
前回の記事で、NSSAの場合、NSSAから外部ネットワークへの出口はNSSA内のABRとASBRの2つ存在するため、NSSA内のABRは自動的にデフォルトルートを格納したLSAを生成しない旨を解説しました。
NSSAのABRにおいて、デフォルトルートを格納したLSA Type 7を生成するには、area <area-id> nssaコマンドのdefault-information-originateオプションを使用する必要があります。また、default-information-originateオプションと合わせて、metric <metric>オプションやmetric-type { 1 | 2 }オプションを使用することで、デフォルトルートを格納したLSA Type 7のMetricやMetric Typeを変更可能です。
実機での動作確認
検証内容
R1のg2、R2のg2でOSPF Area 0を有効にします。
R2のg3、R3のg2でOSPF Area 2を有効にします。
Network TypeにはPoint-to-Pointを使用します。
R1でOSPFに対してConnected Routeである180.1.1.0/24を再配送します。
Area 2でNSSAを有効化します。
R2でNSSAのdefault-information-originateオプションを設定し、状態の変化を確認します。
初期設定
interface GigabitEthernet2
ip address 10.1.1.1 255.255.255.0
ip ospf network point-to-point
!
interface GigabitEthernet3
ip address 180.1.1.1 255.255.255.0
!
router ospf 1
router-id 1.1.1.1
redistribute connected subnets
network 10.1.1.0 0.0.0.255 area 0
interface GigabitEthernet2
ip address 10.1.1.2 255.255.255.0
ip ospf network point-to-point
!
interface GigabitEthernet3
ip address 20.1.1.2 255.255.255.0
ip ospf network point-to-point
!
router ospf 1
router-id 2.2.2.2
area 2 nssa
network 10.1.1.0 0.0.0.255 area 0
network 20.1.1.0 0.0.0.255 area 2
interface GigabitEthernet2
ip address 20.1.1.3 255.255.255.0
ip ospf network point-to-point
!
router ospf 1
router-id 3.3.3.3
area 2 nssa
network 20.1.1.0 0.0.0.255 area 2
default-information-originateオプション無し
OSPFプロセスの状態確認
R2において、Area 2でNSSAが有効なことが確認できます。
R2#show ip ospf
Routing Process "ospf 1" with ID 2.2.2.2
Start time: 2w0d, Time elapsed: 00:20:12.017
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border and autonomous system boundary router
Redistributing External Routes from,
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Incremental-SPF disabled
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 2. Checksum Sum 0x008B19
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:00:32.302 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 3. Checksum Sum 0x019B64
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
Area has no authentication
SPF algorithm last executed 00:00:24.623 ago
SPF algorithm executed 7 times
Area ranges are
Number of LSA 4. Checksum Sum 0x017BE6
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
LSDBの状態確認
R2はArea 2に対して0.0.0.0/0を格納したLSA Type 7を広報していないことが確認できます。
R3#show ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 1481 0x80000008 0x009137 2
3.3.3.3 3.3.3.3 62 0x80000007 0x002A9D 2
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
10.1.1.0 2.2.2.2 1449 0x80000006 0x0059C3
SPFの計算結果の確認
R3は10.1.1.0/24のみ認識しており、180.1.1.0/24は認識していないことが確認できます。
R3#show ip ospf rib
OSPF Router with ID (3.3.3.3) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
*> 10.1.1.0/24, Inter, cost 2, area 2
via 20.1.1.2, GigabitEthernet2
* 20.1.1.0/24, Intra, cost 1, area 2, Connected
via 20.1.1.3, GigabitEthernet2
ルーティングテーブルの確認
R3のルーティングテーブルに180.1.1.0/24が存在していないことが確認できます。
R3#show ip route ospf
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.1.1.0 [110/2] via 20.1.1.2, 00:41:57, GigabitEthernet2
疎通確認
R3の20.1.1.3からR1の180.1.1.1へのPingが失敗することが確認できます。
R3#ping 180.1.1.1 source 20.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 180.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 20.1.1.3
.....
Success rate is 0 percent (0/5)
default-information-originateオプション有り
追加した設定
R2がNSSAに対して0.0.0.0/0を格納したLSA Type 7を広報できるように、area <area-id> nssaコマンドにdefault-information-originateオプションを追加します。
router ospf 1
area 2 nssa default-information-originate
OSPFプロセスの状態確認
R2が0.0.0.0/0を格納したLSA Type 7を生成していることが確認できます。
R2#show ip ospf
Routing Process "ospf 1" with ID 2.2.2.2
Start time: 2w0d, Time elapsed: 00:52:56.091
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border and autonomous system boundary router
Redistributing External Routes from,
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Incremental-SPF disabled
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 1. Checksum Sum 0x008560
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:01:28.896 ago
SPF algorithm executed 16 times
Area ranges are
Number of LSA 3. Checksum Sum 0x017F72
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
Generates NSSA default route with cost 1
Area has no authentication
SPF algorithm last executed 00:01:28.896 ago
SPF algorithm executed 15 times
Area ranges are
Number of LSA 4. Checksum Sum 0x01E072
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
LSDBの状態確認
R2はArea 2に対して0.0.0.0/0を格納したLSA Type 7を広報していることが確認できます。
R3#show ip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 140 0x8000000B 0x008B3A 2
3.3.3.3 3.3.3.3 458 0x80000007 0x002A9D 2
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
10.1.1.0 2.2.2.2 1844 0x80000006 0x0059C3
Type-7 AS External Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 2.2.2.2 140 0x80000001 0x00D0D8 0
以下はR2が生成した0.0.0.0/0を格納したLSA Type 7になります。Metric Typeが2、Metricが1なことが確認できます。
R2#show ip ospf database nssa-external 0.0.0.0 adv-router 2.2.2.2
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 126
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 0.0.0.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xD0D8
Length: 36
Network Mask: /0
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 0.0.0.0
External Route Tag: 0
SPFの計算結果の確認
R3は0.0.0.0/0を認識していることが確認できます。
R3#show ip ospf rib
OSPF Router with ID (3.3.3.3) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
*> 10.1.1.0/24, Inter, cost 2, area 2
via 20.1.1.2, GigabitEthernet2
* 20.1.1.0/24, Intra, cost 1, area 2, Connected
via 20.1.1.3, GigabitEthernet2
*> 0.0.0.0/0, NSSA2, cost 1, fwd cost 1, tag 0, area 2
via 20.1.1.2, GigabitEthernet2
ルーティングテーブルの確認
R3のルーティングテーブルに0.0.0.0/0が投入されていることが確認できます。
R3#show ip route ospf
O*N2 0.0.0.0/0 [110/1] via 20.1.1.2, 00:02:42, GigabitEthernet2
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.1.1.0 [110/2] via 20.1.1.2, 00:41:57, GigabitEthernet2
疎通確認
R3の20.1.1.3からR1の180.1.1.1へのPingが成功することが確認できます。
R3#ping 180.1.1.1 source 20.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 180.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 20.1.1.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
default-information-originate metricオプション有り
追加した設定
R2が生成する0.0.0.0/0を格納したLSA Type 7のMetricを50に変更するためにarea <area-id> nssa default-information-originateコマンドにmetricオプションを追加します。
router ospf 1
area 2 nssa default-information-originate metric 50
OSPFプロセスの状態確認
R2が生成する0.0.0.0/0を格納したLSA Type 7のMetricが50に変化していることが確認できます。
R2#show ip ospf
Routing Process "ospf 1" with ID 2.2.2.2
Start time: 2w0d, Time elapsed: 00:52:56.091
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border and autonomous system boundary router
Redistributing External Routes from,
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Incremental-SPF disabled
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 1. Checksum Sum 0x008560
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:01:28.896 ago
SPF algorithm executed 16 times
Area ranges are
Number of LSA 3. Checksum Sum 0x017F72
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
Generates NSSA default route with cost 50
Area has no authentication
SPF algorithm last executed 00:01:28.896 ago
SPF algorithm executed 15 times
Area ranges are
Number of LSA 4. Checksum Sum 0x01E072
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
LSDBの状態確認
R2が生成した0.0.0.0/0を格納したLSA Type 7のMetricが50に変化したことが確認できます。
R2#show ip ospf database nssa-external 0.0.0.0 adv-router 2.2.2.2
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 56
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 0.0.0.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0xBABC
Length: 36
Network Mask: /0
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 50
Forward Address: 0.0.0.0
External Route Tag: 0
SPFの計算結果の確認
R3のSPFの計算結果から0.0.0.0/0のMetricが50に変化したことが確認できます。
R3#show ip ospf rib
OSPF Router with ID (3.3.3.3) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
*> 10.1.1.0/24, Inter, cost 2, area 2
via 20.1.1.2, GigabitEthernet2
* 20.1.1.0/24, Intra, cost 1, area 2, Connected
via 20.1.1.3, GigabitEthernet2
*> 0.0.0.0/0, NSSA2, cost 50, fwd cost 1, tag 0, area 2
via 20.1.1.2, GigabitEthernet2
ルーティングテーブルの確認
R3のルーティングテーブル内の0.0.0.0/0のMetricが50に変化したことが確認できます。
R3#show ip route ospf
O*N2 0.0.0.0/0 [110/50] via 20.1.1.2, 00:02:42, GigabitEthernet2
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.1.1.0 [110/2] via 20.1.1.2, 00:41:57, GigabitEthernet2
default-information-originate metric-typeオプション有り
追加した設定
R2が生成する0.0.0.0/0を格納したLSA Type 7のMetric Typeを1に変更するためにarea <area-id> nssa default-information-originateコマンドにmetric-typeオプションを追加します。
router ospf 1
area 2 nssa default-information-originate metric-type 1
OSPFプロセスの状態確認
show ip ospfコマンドでは、NSSAのABRが生成する0.0.0.0/0を格納したLSA Type 7のMetric Typeは確認できません。
R2#show ip ospf
Routing Process "ospf 1" with ID 2.2.2.2
Start time: 2w0d, Time elapsed: 00:52:56.091
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border and autonomous system boundary router
Redistributing External Routes from,
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Incremental-SPF disabled
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 1. Checksum Sum 0x008560
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 0 stub 1 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:01:28.896 ago
SPF algorithm executed 16 times
Area ranges are
Number of LSA 3. Checksum Sum 0x017F72
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a NSSA area
Perform type-7/type-5 LSA translation
Generates NSSA default route with cost 1
Area has no authentication
SPF algorithm last executed 00:01:28.896 ago
SPF algorithm executed 15 times
Area ranges are
Number of LSA 4. Checksum Sum 0x01E072
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
LSDBの状態確認
R2が生成した0.0.0.0/0を格納したLSA Type 7のMetric Typeが1に変化したことが確認できます。
R2#show ip ospf database nssa-external 0.0.0.0 adv-router 2.2.2.2
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 70
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 0.0.0.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x4DDC
Length: 36
Network Mask: /0
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 1
Forward Address: 0.0.0.0
External Route Tag: 0
SPFの計算結果の確認
R3のSPFの計算結果から0.0.0.0/0のMetric Typeが1に変化したことが確認できます。
R3#show ip ospf rib
OSPF Router with ID (3.3.3.3) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
*> 10.1.1.0/24, Inter, cost 2, area 2
via 20.1.1.2, GigabitEthernet2
* 20.1.1.0/24, Intra, cost 1, area 2, Connected
via 20.1.1.3, GigabitEthernet2
*> 0.0.0.0/0, NSSA1, cost 2, fwd cost 1, tag 0, area 2
via 20.1.1.2, GigabitEthernet2
ルーティングテーブルの確認
R3のルーティングテーブル内の0.0.0.0/0の先頭がN1にに変化したことが確認できます。
R3#show ip route ospf
O*N1 0.0.0.0/0 [110/2] via 20.1.1.2, 00:02:42, GigabitEthernet2
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.1.1.0 [110/2] via 20.1.1.2, 00:41:57, GigabitEthernet2
コメント