R1#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 1.1.1.1/32 1 LOOP 0/0
Et0/1 1 0 192.168.12.1/24 10 BDR 1/1
R2#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 2.2.2.2/32 1 LOOP 0/0
Et0/1 1 0 192.168.12.2/24 10 DR 1/1
Et0/0 1 10 192.168.23.2/24 10 BDR 1/1
R3#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 10 3.3.3.3/32 1 LOOP 0/0
Et0/0 1 10 192.168.23.3/24 10 DR 1/1
(3)EIGRP対象ネットワーク確認
R3#show ip protocols | begin Routing Protocol is "eigrp 1"
Routing Protocol is "eigrp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
Redistributing: ospf 1
EIGRP-IPv4 Protocol for AS(1)
Metric weight K1=1, K2=0, K3=1, K4=0, K5=0
NSF-aware route hold timer is 240
Router-ID: 172.16.5.3
Topology : 0 (base)
Active Timer: 3 min
Distance: internal 90 external 170
Maximum path: 4
Maximum hopcount 100
Maximum metric variance 1
Automatic Summarization: disabled
Maximum path: 4
Routing for Networks:
172.16.1.0/24
172.16.2.0/24
172.16.3.0/24
172.16.4.0/24
172.16.5.0/24
Routing Information Sources:
Gateway Distance Last Update
Distance: internal 90 external 170
(4)ルーティング確認
R1にて事前のルーティング情報を確認する。
R1#sh ip route ospf
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 192.168.12.2, 01:16:19, Ethernet0/1
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/21] via 192.168.12.2, 01:06:55, Ethernet0/1
172.16.0.0/24 is subnetted, 5 subnets
O E2 172.16.1.0 [110/20] via 192.168.12.2, 00:29:09, Ethernet0/1
O E2 172.16.2.0 [110/20] via 192.168.12.2, 00:29:09, Ethernet0/1
O E2 172.16.3.0 [110/20] via 192.168.12.2, 00:29:09, Ethernet0/1
O E2 172.16.4.0 [110/20] via 192.168.12.2, 00:29:09, Ethernet0/1
O E2 172.16.5.0 [110/20] via 192.168.12.2, 00:29:09, Ethernet0/1
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 01:22:08, Ethernet0/1
(5)OSPFデータベース確認
R1/R2にて外部経路に関する事前のOSPFデータベース(LSA Type5)を確認する。
R1#show ip ospf database external 172.16.1.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1777
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xB11D
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 3.3.3.3 //Forward Addressがセットされている為、左記のIPへ転送する。
External Route Tag: 0
R2#show ip ospf database external 172.16.1.0
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-5 AS External Link States
LS age: 39
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000005
Checksum: 0xA921
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 3.3.3.3 //Forward Addressがセットされている為、左記のIPへ転送する。
External Route Tag: 0
R2にて外部経路に関する事前のOSPFデータベース(LSA Type7)を確認する。
R2# show ip ospf database nssa-external 172.16.1.0
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 10)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 957
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000002
Checksum: 0xFCC2
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 3.3.3.3 //Forward Addressがセットされている為、左記のIPへ転送する。
External Route Tag: 0
(6)事前疎通確認
現時点ではForward Addrss宛の経路がある為、問題なく疎通可能です。
R1#traceroute 172.16.1.3
Type escape sequence to abort.
Tracing the route to 172.16.1.3
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.2 5 msec 8 msec 7 msec
2 192.168.23.3 6 msec 7 msec 6 msec
②設定変更(ForwardAddressのIPをフィルタする)
(1)ForwardAddress3.3.3.3経路をOSPFエリア0へ伝搬させないように、R2にて経路フィルタ
を実装する。
R2(config)#router ospf 1
R2(config-router)#area 10 range 3.3.3.3 255.255.255.255 not-advertise
(2)R1のルーティングテーブルを確認する。
上記のフィルタ設定によりForward Addrss(3.3.3.3)宛の経路がある為、疎通不可になる。
R1#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 192.168.12.2, 01:26:20, Ethernet0/1
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 01:32:09, Ethernet0/1
(3)R1のOSPFデータベースを確認する。
LSA Type5内のForward Addressに0.0.0.0以外のIPアドレスがセットされている
際は、Advertising RouterにセットされているIPアドレスではなくForward Addressに
セットされているIPアドレス宛へパケットを転送します。
その為、Forward Addressへ疎通可能である必要があります。
R1#show ip ospf database external 172.16.1.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
LS age: 324
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000003
Checksum: 0xAD1F
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 3.3.3.3 //Forward Addressがセットされている為、左記のIPへ転送が不通。
External Route Tag: 0
(4)疎通確認
Forward Addressへ疎通不能である為、通信不可。
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
(5)ABR(R2)にてLSA Type7をLSA Type5へ変換する際、ForwardAddressをクリア[0.0.0.0]に
する。
R2(config)#router ospf 1
R2(config-router)#area 10 nssa translate type7 suppress-fa
(6)R1のルーティングテーブルを確認する。
R1#sh ip route ospf
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 192.168.12.2, 00:31:22, Ethernet0/1
172.16.0.0/24 is subnetted, 5 subnets
O E2 172.16.1.0 [110/20] via 192.168.12.2, 00:00:42, Ethernet0/1
O E2 172.16.2.0 [110/20] via 192.168.12.2, 00:00:42, Ethernet0/1
O E2 172.16.3.0 [110/20] via 192.168.12.2, 00:00:42, Ethernet0/1
O E2 172.16.4.0 [110/20] via 192.168.12.2, 00:00:42, Ethernet0/1
O E2 172.16.5.0 [110/20] via 192.168.12.2, 00:00:42, Ethernet0/1
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:31:22, Ethernet0/1
(7)R1のOSPFデータベースを確認する。
R1#show ip ospf database external 172.16.1.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 70
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 2.2.2.2 //Forward Addressがセットされていない為、左記のIPへパケット転送
LS Seq Number: 80000004
Checksum: 0x15C2
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R2#show ip ospf database external 172.16.1.0
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-5 AS External Link States
LS age: 87
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 2.2.2.2 //Forward Addressがセットされていない為、左記のIPへパケット転送
LS Seq Number: 80000004
Checksum: 0x15C2
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
※R2のLSA Type7は変更なし。
R2#show ip ospf database nssa-external 172.16.1.0
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 10)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1642
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 172.16.1.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000003
Checksum: 0xFAC3
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 3.3.3.3
External Route Tag: 0
(8)疎通確認
R1#ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms