Cisco IOS ルーティング – OSPF Forwading Address

スポンサーリンク

OSPF LSA type 5にはForwarding Addressという概念があります。このForwarding Addressへの疎通ができない場合は、ルーティングテーブルに当該のエントリが現れません。OSPD LSA type 5 Forwarding Addressについて紹介します。

コマンド一覧

このシナリオで重要なコマンド一覧は以下の通りです。

Router(config)# router ospf <proc>
Router(config-router)# area <area> nssa translate type7 suppress-fa

構成図

以下の環境で動作確認を行います。以下のような要件のOSDF, RIPルーティングを実装して下さい。

  • R1, R2間はOSPF area 0とします。
  • R2, R4間はOSPF area 24とし、NSSAとして動作させます。
  • R4の192.168.4.0/24のセグメントは、redistribute connectedとしてadvertiseします。
  • R2にて10.4.4.4/32(R4 Loopback0)のprefixをfilterします。
  • R2, R3間でRIPを動作させます。
  • R2にて、RIP, OSPF間の再配送を実装します。
          OSPF area 0           OSPF area 24
   <------------------------><---------------->
        192.168.12.0/24   192.168.24.0/24   192.168.4.0/24
          e0/0    e0/0      e0/2    e0/2      e0/3
  +--------+.1    .2+--------+.2    .4+--------+.4
  |   R1   +--------+   R2   +--------+   R4   +----
  +---+----+        +---+----+        +--------+
      │.1              │.2
      │e0/1            │e0/1    +--------+
  ----┴----------------┴--------+   R3   |
                                .3+--------+
           192.168.123.0/24     e0/1
   <---------------------><---------------->
         OSPF area 0              RIP

 R1 Loopback0     R2 Loopback0     R3 Loopback0     R4 Loopback0
 10.1.1.1/32      10.2.2.2/32      10.3.3.3/32      10.4.4.4/32
 [R1]
router ospf 1
 network 10.1.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
 network 192.168.123.1 0.0.0.0 area 0

 [R2]
router ospf 1
 area 24 nssa
 area 24 range 10.4.4.4 255.255.255.255 not-advertise
 redistribute rip subnets
 network 10.2.2.2 0.0.0.0 area 0
 network 192.168.12.2 0.0.0.0 area 0
 network 192.168.24.2 0.0.0.0 area 24
 network 192.168.123.2 0.0.0.0 area 0
!
router rip
 version 2
 redistribute ospf 1 metric 8
 network 10.0.0.0
 network 192.168.123.0
 no auto-summary

 [R3]
router rip
 version 2
 network 10.0.0.0
 network 192.168.123.0
 no auto-summary

 [R4]
router ospf 1
 area 24 nssa
 redistribute connected subnets
 network 10.4.4.4 0.0.0.0 area 24
 network 192.168.24.4 0.0.0.0 area 24

設定全文は下記ファイルです。詳細設定は下記を参照ください。

R1
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 ip address 192.168.123.1 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
!
router ospf 1
 log-adjacency-changes
 network 10.1.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
 network 192.168.123.1 0.0.0.0 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end
R2
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.2.2.2 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 ip address 192.168.123.2 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 ip address 192.168.24.2 255.255.255.0
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
!
router ospf 1
 log-adjacency-changes
 area 24 nssa
 area 24 range 10.4.4.4 255.255.255.255 not-advertise
 redistribute rip subnets
 network 10.2.2.2 0.0.0.0 area 0
 network 192.168.12.2 0.0.0.0 area 0
 network 192.168.24.2 0.0.0.0 area 24
 network 192.168.123.2 0.0.0.0 area 0
!
router rip
 version 2
 redistribute ospf 1 metric 8
 network 10.0.0.0
 network 192.168.123.0
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end
R3
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.3.3.3 255.255.255.255
!
interface Ethernet0/0
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/1
 ip address 192.168.123.3 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
!
router rip
 version 2
 network 10.0.0.0
 network 192.168.123.0
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end
R4
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.4.4.4 255.255.255.255
!
interface Ethernet0/0
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 ip address 192.168.24.4 255.255.255.0
 half-duplex
!
interface Ethernet0/3
 ip address 192.168.4.4 255.255.255.0
 half-duplex
 no keepalive
!
!
router ospf 1
 log-adjacency-changes
 area 24 nssa
 redistribute connected subnets
 network 10.4.4.4 0.0.0.0 area 24
 network 192.168.24.4 0.0.0.0 area 24
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end

仕様説明

forwarding address

OSPF LSA type 5にはFrowarding Addressという概念があります。Forwarding Addressとは外部ドメインをadvertiseしたルータのアドレスであり、Forwarding Addressまでの距離によってルーティングを決定します。

Forwarding Addressは以下のshowコマンドによって確認できます。もし、Forwarding Addressが定義されている場合はForwarding address宛てにパケットが転送され、Forwarding Addressが定義されていない場合はAdvertising Router宛てにパケットが転送されます。

R1#show ip ospf database external 192.168.4.0

            OSPF Router with ID (10.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  LS age: 843
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 192.168.4.0 (External Network Number )
  Advertising Router: 10.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x907C
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 10.4.4.4
        External Route Tag: 0

R1#

suppress-fa

NSSAのABRにおいて、敢えてforwarding addressの情報を除去したい場合は、以下のコマンドを入力します。

Router(config)# router ospf <proc>
Router(config-router)# area <area> nssa translate type7 suppress-fa

forwarding addressの条件

以下の条件を全て満たす時、forwarding addressが設定されます。逆に言えば、forwarding addressを設定したくない場合は、以下の条件のうち1つを破るように設定変更します。(例 : network typeをpoint-to-pointに変更)

  • OSPF is enabled on the ASBR’s next hop interface AND
  • ASBR’s next hop interface is non-passive under OSPF AND
  • ASBR’s next hop interface is not point-to-point AND
  • ASBR’s next hop interface is not point-to-multipoint AND
  • ASBR’s next hop interface address falls under the network range specified in the router ospf command.

suppress-fa

状況確認

R1から192.168.4.0/24への疎通ができない状態になっています。192.168.4.0/24はrouting tableに存在しないものの、OSPF database上に存在します。このような疎通不能現象が発生するのは、Forwarding Addressまでの疎通ができないからです。

 [R1]
R1#show ip route | include 192.168.4.0
R1#
R1#
R1#show ip ospf database external 192.168.4.0

            OSPF Router with ID (10.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  LS age: 1432
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 192.168.4.0 (External Network Number )
  Advertising Router: 10.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x907C
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 10.4.4.4
        External Route Tag: 0

R1#

設定投入

R2に以下設定を投入し、forwarding addressに関する情報を除去します。

 [R2]
router ospf 1
 area 24 nssa translate type7 suppress-fa

動作確認

forwarding addressが0.0.0.0になった事を確認します。

 [R1]
R1#show ip ospf database external 192.168.4.0

            OSPF Router with ID (10.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 5
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 192.168.4.0 (External Network Number )
  Advertising Router: 10.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x839E
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

R1#

R1から192.168.4.4へ疎通可能になった事を確認します。

 [R1]
R1#show ip route | include 192.168.4.0
O E2 192.168.4.0/24 [110/20] via 192.168.123.2, 00:01:46, Ethernet0/1
R1#
R1#
R1#ping 192.168.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/44/60 ms
R1#

forwarding addressの条件

状況確認

R1からR3 Loopback0 (10.3.3.3/32)へのルートを確認します。10.3.3.3はR2がASBRになっているためR1からR2への経路はロードバランシングされるように思えますが、実際のルーティングテーブルを見るとロードバランシングされていません。

 [R1]
R1#show ip route 10.3.3.3
Routing entry for 10.3.3.3/32
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 10
  Last update from 192.168.123.3 on Ethernet0/1, 00:32:30 ago
  Routing Descriptor Blocks:
  * 192.168.123.3, from 10.2.2.2, 00:32:30 ago, via Ethernet0/1
      Route metric is 20, traffic share count is 1

R1#

ロードバランシングされない理由は、forwarding adderssが設定されているためです。OSPF databaseをよく見ると、forwading addressが192.168.123.3になっている事が読み取れます。

 [R1]
R1#show ip ospf database external 10.3.3.3

            OSPF Router with ID (10.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 230
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 10.3.3.3 (External Network Number )
  Advertising Router: 10.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x1B79
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 192.168.123.3
        External Route Tag: 0

R1#

設定投入

R1からR3への通信経路をロードバランスするようにします。R1, R2間のnetwork typeを変更し、forwarding addressが設定されないようにします。

 [R1]
interface Ethernet0/1
 ip ospf network point-to-point
 
 [R2]
interface Ethernet0/1
 ip ospf network point-to-point

動作確認

forwarding addressに0.0.0.0が設定された事を確認します。

 [R1]
R1#show ip ospf database external 10.3.3.3

            OSPF Router with ID (10.1.1.1) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 30
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 10.3.3.3 (External Network Number )
  Advertising Router: 10.2.2.2
  LS Seq Number: 80000003
  Checksum: 0x7902
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

R1#

R1からR3への経路についてロードバランスされた事を確認します。

 [R1]
R1#show ip route 10.3.3.3
Routing entry for 10.3.3.3/32
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 10
  Last update from 192.168.123.2 on Ethernet0/1, 00:01:23 ago
  Routing Descriptor Blocks:
  * 192.168.123.2, from 10.2.2.2, 00:01:23 ago, via Ethernet0/1
      Route metric is 20, traffic share count is 1
    192.168.12.2, from 10.2.2.2, 00:01:24 ago, via Ethernet0/0
      Route metric is 20, traffic share count is 1

R1#
R1#traceroute 10.3.3.3

Type escape sequence to abort.
Tracing the route to 10.3.3.3

  1 192.168.123.2 20 msec
    192.168.12.2 52 msec
    192.168.123.2 32 msec
  2 192.168.123.3 48 msec *  4 msec
R1#
タイトルとURLをコピーしました