今回はOSPFのNSSAにおいて、再配送時にLSA Type 7のP bitを0にクリアする方法を説明します。
座学
P bitのクリア
NSSAの記事において、LSA Type 7にはP bitと呼ばれる値が存在することを解説しました。
NSSAのABRはP bitが1のLSA Type 7のみLSA Type 5に変換し、他のAreaに広報します。
今回は、NSSAへの再配送時にP bitを0にクリアする方法を説明します。
実機での動作確認
検証内容
R1のg2、R2のg2でOSPF Area 0を有効にします。
R2のg3、R3のg2でOSPF Area 2を有効にします。
Network TypeにはPoint-to-Pointを使用します。
R3でOSPFに対してConnected Routeである190.1.1.0/24を再配送します。
Area 2でNSSAを有効化します。
再配送時にP bitを0にクリアした際の動作を確認します。
初期設定
interface GigabitEthernet2
ip address 10.1.1.1 255.255.255.0
ip ospf network point-to-point
!
router ospf 1
router-id 1.1.1.1
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
!
interface GigabitEthernet3
ip address 190.1.1.3 255.255.255.0
!
router ospf 1
router-id 3.3.3.3
area 2 nssa
redistribute connected subnets
network 20.1.1.0 0.0.0.255 area 2
P bitが1の場合
OSPFプロセスの状態確認
R3において、NSSAへの再配送時に生成されるLSA Type 7のP bitに1がセットされることが確認できます。
R3#show ip ospf
Routing Process "ospf 1" with ID 3.3.3.3
Start time: 2w0d, Time elapsed: 02:14:39.356
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 autonomous system boundary router
Redistributing External Routes from,
connected, includes subnets in redistribution
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 0. Checksum Sum 0x000000
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 1. 0 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 2
Number of interfaces in this area is 1
It is a NSSA area
Area has no authentication
SPF algorithm last executed 00:00:07.160 ago
SPF algorithm executed 35 times
Area ranges are
Number of LSA 4. Checksum Sum 0x011818
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の状態確認
R3が生成した190.1.1.0/24を格納したLSA Type 7のP bitに1がセットされていることが確認できます。
R3#show ip ospf database nssa-external 190.1.1.0 adv-router 3.3.3.3
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 119
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 190.1.1.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x525E
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 20.1.1.3
External Route Tag: 0
R2は190.1.1.0/24を格納したLSA Type 7をLSA Type 5に変換していることが確認できます。
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 626 0x8000000B 0x00CB24 2
2.2.2.2 2.2.2.2 195 0x80000018 0x005A80 2
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
20.1.1.0 2.2.2.2 707 0x80000007 0x002FE8
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
190.1.1.0 2.2.2.2 98 0x80000001 0x0005B9 0
SPFの計算結果の確認
R1は190.1.1.0/24へのベストパスを正しく計算できていることが確認できます。
R1#show ip ospf rib
OSPF Router with ID (1.1.1.1) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
* 10.1.1.0/24, Intra, cost 1, area 0, Connected
via 10.1.1.1, GigabitEthernet2
*> 20.1.1.0/24, Inter, cost 2, area 0
via 10.1.1.2, GigabitEthernet2
*> 190.1.1.0/24, Ext2, cost 20, fwd cost 2, tag 0
via 10.1.1.2, GigabitEthernet2
ルーティングテーブルの確認
R1のルーティングテーブルに190.1.1.0/24が投入されていることが確認できます。
R1#show ip route ospf
20.0.0.0/24 is subnetted, 1 subnets
O IA 20.1.1.0 [110/2] via 10.1.1.2, 00:01:13, GigabitEthernet2
190.1.0.0/24 is subnetted, 1 subnets
O E2 190.1.1.0 [110/20] via 10.1.1.2, 00:01:13, GigabitEthernet2
疎通確認
R1の10.1.1.1からR3の190.1.1.3へのPingが成功することが確認できます。
R1#ping 190.1.1.3 source 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 190.1.1.3, timeout is 2 seconds:
Packet sent with a source address of 10.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
P bitが0の場合
R3において、NSSAにルート情報を再配送する際、P bitを0にクリアします。
追加した設定
redistributeコマンドのnssa-onlyオプションを使用することで、NSSAへの再配送時に生成するLSA Type 7のP bitを0にクリア可能です。
router ospf 1
redistribute connected subnets nssa-only
OSPFプロセスの状態確認
R3において、NSSAへの再配送時に生成されるLSA Type 7のP bitが0にクリアされることが確認できます。
R3#show ip ospf
Routing Process "ospf 1" with ID 3.3.3.3
Start time: 2w0d, Time elapsed: 02:12:03.259
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 autonomous system boundary router
Redistributing External Routes from,
connected, includes subnets in redistribution, nssa areas only
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 0. Checksum Sum 0x000000
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 1. 0 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 2
Number of interfaces in this area is 1
It is a NSSA area
Area has no authentication
SPF algorithm last executed 00:01:25.600 ago
SPF algorithm executed 34 times
Area ranges are
Number of LSA 4. Checksum Sum 0x0194A5
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の状態確認
R3が生成した190.1.1.0/24を格納したLSA Type 7のP bitが0にクリアされていることが確認できます。
R3#show ip ospf database nssa-external 190.1.1.0 adv-router 3.3.3.3
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 119
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 190.1.1.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000006
Checksum: 0xC0F2
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 20.1.1.3
External Route Tag: 0
R2は190.1.1.0/24を格納したLSA Type 7をLSA Type 5に変換していないことが確認できます。
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 626 0x8000000B 0x00CB24 2
2.2.2.2 2.2.2.2 195 0x80000018 0x005A80 2
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
20.1.1.0 2.2.2.2 707 0x80000007 0x002FE8
SPFの計算結果の確認
R1は190.1.1.0/24へのベストパスを計算できていないことが確認できます。
R1#show ip ospf rib
OSPF Router with ID (1.1.1.1) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
* 10.1.1.0/24, Intra, cost 1, area 0, Connected
via 10.1.1.1, GigabitEthernet2
*> 20.1.1.0/24, Inter, cost 2, area 0
via 10.1.1.2, GigabitEthernet2
ルーティングテーブルの確認
R1のルーティングテーブルに190.1.1.0/24が投入されていないことが確認できます。
R1#show ip route ospf
20.0.0.0/24 is subnetted, 1 subnets
O IA 20.1.1.0 [110/2] via 10.1.1.2, 00:01:13, GigabitEthernet2
疎通確認
R1の10.1.1.1からR3の190.1.1.3へのPingが失敗することが確認できます。
R1#ping 190.1.1.3 source 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 190.1.1.3, timeout is 2 seconds:
Packet sent with a source address of 10.1.1.1
.....
Success rate is 0 percent (0/5)
コメント