概要

バックボーンエリア内のリンク障害で不連続バックボーンとなってしまうことがあります。そのような場合に、Virtual-linkによってバックボーンエリアが連続するように設定します。

ネットワーク構成

図 OSPF不連続バックボーン ネットワーク構成
図 OSPF不連続バックボーン ネットワーク構成


設定条件

  • R1 E0/2を管理上シャットダウンすると、10.1.3.0/24と10.1.4.0/24間の通信ができなくなってしまいます。R1 E0/2をシャットダウンしても10.1.3.0/24と10.1.4.0/24間の通信ができるように必要な設定を行います。

確認条件

  • R1 E0/2をシャットダウンしても10.1.3.0/24と10.1.4.0/24間の通信ができる

初期設定

以下の設定は設定済みとします。

  • ホスト名
  • IPアドレス
  • OSPF
    ルータID
    各ルータのインタフェースはネットワーク構成のとおりOSPFが有効化されていてエリアに所属している

設定

Step1:正常時のルーティングテーブルの確認

R1~R4の各ルータで正常時のルーティングテーブルを確認します。

R1 show ip route

R1#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, Ethernet0/1
C       172.16.1.0/24 is directly connected, Ethernet0/0
O       172.16.2.0/24 [110/20] via 172.16.12.2, 00:08:29, Ethernet0/1
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.13.0/30 is directly connected, Ethernet0/3
C       10.1.12.0/30 is directly connected, Ethernet0/2
O       10.1.3.0/24 [110/20] via 10.1.13.2, 00:06:00, Ethernet0/3
O       10.1.4.0/24 [110/30] via 10.1.12.2, 00:06:00, Ethernet0/2
O       10.1.24.0/30 [110/20] via 10.1.12.2, 00:06:00, Ethernet0/2

R2 show ip route

R2#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, Ethernet0/1
O       172.16.1.0/24 [110/20] via 172.16.12.1, 00:08:59, Ethernet0/1
C       172.16.2.0/24 is directly connected, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O       10.1.13.0/30 [110/20] via 10.1.12.1, 00:06:49, Ethernet0/2
C       10.1.12.0/30 is directly connected, Ethernet0/2
O       10.1.3.0/24 [110/30] via 10.1.12.1, 00:06:49, Ethernet0/2
O       10.1.4.0/24 [110/20] via 10.1.24.2, 00:06:49, Ethernet0/3
C       10.1.24.0/30 is directly connected, Ethernet0/3

R3 show ip route

R3#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA    172.16.12.0/30 [110/20] via 10.1.13.1, 00:07:23, Ethernet0/0
O IA    172.16.1.0/24 [110/20] via 10.1.13.1, 00:07:23, Ethernet0/0
O IA    172.16.2.0/24 [110/30] via 10.1.13.1, 00:07:23, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.13.0/30 is directly connected, Ethernet0/0
O       10.1.12.0/30 [110/20] via 10.1.13.1, 00:07:23, Ethernet0/0
C       10.1.3.0/24 is directly connected, Ethernet0/1
O       10.1.4.0/24 [110/40] via 10.1.13.1, 00:07:23, Ethernet0/0
O       10.1.24.0/30 [110/30] via 10.1.13.1, 00:07:23, Ethernet0/0

R4 show ip route

R4#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA    172.16.12.0/30 [110/20] via 10.1.24.1, 00:08:00, Ethernet0/0
O IA    172.16.1.0/24 [110/30] via 10.1.24.1, 00:08:00, Ethernet0/0
O IA    172.16.2.0/24 [110/20] via 10.1.24.1, 00:08:00, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O       10.1.13.0/30 [110/30] via 10.1.24.1, 00:08:00, Ethernet0/0
O       10.1.12.0/30 [110/20] via 10.1.24.1, 00:08:00, Ethernet0/0
O       10.1.3.0/24 [110/40] via 10.1.24.1, 00:08:00, Ethernet0/0
C       10.1.4.0/24 is directly connected, Ethernet0/1
C       10.1.24.0/30 is directly connected, Ethernet0/0

Step2:R1 E0/2のシャットダウン

R1 E0/2をシャットダウンして、10.1.3.0/24と10.1.4.0/24間ができなくなる原因を調べます。

R1

interface Ethernet0/2
 shutdown

Step3:R1 E0/2 シャットダウン時のルーティングテーブルの確認

R1 E0/2をシャットダウンしているときの各ルータのルーティングテーブルを確認します。

R1 show ip route

R1#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, Ethernet0/1
C       172.16.1.0/24 is directly connected, Ethernet0/0
O       172.16.2.0/24 [110/20] via 172.16.12.2, 00:12:55, Ethernet0/1
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.1.13.0/30 is directly connected, Ethernet0/3
O       10.1.3.0/24 [110/20] via 10.1.13.2, 00:00:06, Ethernet0/3

R2 show ip route

R2#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, Ethernet0/1
O       172.16.1.0/24 [110/20] via 172.16.12.1, 00:15:10, Ethernet0/1
C       172.16.2.0/24 is directly connected, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.1.12.0/30 is directly connected, Ethernet0/2
O       10.1.4.0/24 [110/20] via 10.1.24.2, 00:01:58, Ethernet0/3
C       10.1.24.0/30 is directly connected, Ethernet0/3

R3 show ip route

R3#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA    172.16.12.0/30 [110/20] via 10.1.13.1, 00:00:49, Ethernet0/0
O IA    172.16.1.0/24 [110/20] via 10.1.13.1, 00:00:49, Ethernet0/0
O IA    172.16.2.0/24 [110/30] via 10.1.13.1, 00:00:49, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.1.13.0/30 is directly connected, Ethernet0/0
C       10.1.3.0/24 is directly connected, Ethernet0/1

R4 show ip route

R4#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA    172.16.12.0/30 [110/20] via 10.1.24.1, 00:02:42, Ethernet0/0
O IA    172.16.1.0/24 [110/30] via 10.1.24.1, 00:02:42, Ethernet0/0
O IA    172.16.2.0/24 [110/20] via 10.1.24.1, 00:02:42, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O       10.1.12.0/30 [110/20] via 10.1.24.1, 00:02:42, Ethernet0/0
C       10.1.4.0/24 is directly connected, Ethernet0/1
C       10.1.24.0/30 is directly connected, Ethernet0/0

R1 E0/2をシャットダウンすると、エリア0が不連続になってしまいます。その結果、不連続なバックボーンエリアのルートがルーティングテーブルに登録されなくなります。たとえば、R1のルーティングテーブルには、正常時にあった以下のルートが存在しなくなります。

  • 10.1.24.0/30
  • 10.1.4.0/24

ルーティングテーブルにルートが存在しなければ、当然、ルーティングすることができなくなります。

図 不連続なバックボーン
図 不連続なバックボーン


Step4:バーチャルリンクの設定

不連続なバックボーンを接続するために、R1-R2間でバーチャルリンクを設定します。

R1

router ospf 1
 area 12 virtual-link 2.2.2.2

R2

router ospf 1
 area 12 virtual-link 1.1.1.1

Step5:バーチャルリンクの確認

show ip ospf virtual-linksコマンドでR1-R2間のバーチャルリンクを確認します。

R1 show ip ospf virtual-links

R1#show ip ospf virtual-links 
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 12, via interface Ethernet0/1, Cost of using 10
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
    Adjacency State FULL (Hello suppressed)
    Index 1/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

R2 show ip ospf virtual-links

R2#show ip ospf virtual-links 
Virtual Link OSPF_VL0 to router 1.1.1.1 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 12, via interface Ethernet0/1, Cost of using 10
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
    Adjacency State FULL (Hello suppressed)
    Index 1/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

Step6:バーチャルリンク設定時のルーティングテーブルの確認

R1-R2間でバーチャルリンクを設定したあとの各ルータのルーティングテーブルを確認します。

R1 show ip route

R1#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, Ethernet0/1
C       172.16.1.0/24 is directly connected, Ethernet0/0
O       172.16.2.0/24 [110/20] via 172.16.12.2, 00:05:23, Ethernet0/1
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.13.0/30 is directly connected, Ethernet0/3
O       10.1.12.0/30 [110/20] via 172.16.12.2, 00:05:23, Ethernet0/1
O       10.1.3.0/24 [110/20] via 10.1.13.2, 00:05:23, Ethernet0/3
O       10.1.4.0/24 [110/30] via 172.16.12.2, 00:05:23, Ethernet0/1
O       10.1.24.0/30 [110/20] via 172.16.12.2, 00:05:23, Ethernet0/1

R2 show ip route

R2#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, Ethernet0/1
O       172.16.1.0/24 [110/20] via 172.16.12.1, 00:05:47, Ethernet0/1
C       172.16.2.0/24 is directly connected, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O       10.1.13.0/30 [110/20] via 172.16.12.1, 00:05:47, Ethernet0/1
C       10.1.12.0/30 is directly connected, Ethernet0/2
O       10.1.3.0/24 [110/30] via 172.16.12.1, 00:05:47, Ethernet0/1
O       10.1.4.0/24 [110/20] via 10.1.24.2, 00:05:47, Ethernet0/3
C       10.1.24.0/30 is directly connected, Ethernet0/3

R3 show ip route

R3#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA    172.16.12.0/30 [110/20] via 10.1.13.1, 00:06:14, Ethernet0/0
O IA    172.16.1.0/24 [110/20] via 10.1.13.1, 00:06:14, Ethernet0/0
O IA    172.16.2.0/24 [110/30] via 10.1.13.1, 00:06:14, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.13.0/30 is directly connected, Ethernet0/0
O       10.1.12.0/30 [110/30] via 10.1.13.1, 00:06:14, Ethernet0/0
C       10.1.3.0/24 is directly connected, Ethernet0/1
O       10.1.4.0/24 [110/40] via 10.1.13.1, 00:06:14, Ethernet0/0
O       10.1.24.0/30 [110/30] via 10.1.13.1, 00:06:14, Ethernet0/0

R4 show ip route

R4#show ip route 
~省略~

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA    172.16.12.0/30 [110/20] via 10.1.24.1, 00:06:41, Ethernet0/0
O IA    172.16.1.0/24 [110/30] via 10.1.24.1, 00:06:41, Ethernet0/0
O IA    172.16.2.0/24 [110/20] via 10.1.24.1, 00:06:41, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O       10.1.13.0/30 [110/30] via 10.1.24.1, 00:06:41, Ethernet0/0
O       10.1.12.0/30 [110/20] via 10.1.24.1, 00:06:41, Ethernet0/0
O       10.1.3.0/24 [110/40] via 10.1.24.1, 00:06:41, Ethernet0/0
C       10.1.4.0/24 is directly connected, Ethernet0/1
C       10.1.24.0/30 is directly connected, Ethernet0/0

R1-R2間でVirtual-linkを設定したことによって、不連続バックボーンが解消されています。そのため、R3-R4間の通信を行うためのルート情報もきちんと登録されていることがわかります。

最終的な設定抜粋

以下は、各ルータのOSPFに関する設定の抜粋です。

R1

hostname R1
!
interface Ethernet0/0
 ip address 172.16.1.1 255.255.255.0
!
interface Ethernet0/1
 ip address 172.16.12.1 255.255.255.252
!         
interface Ethernet0/2
 ip address 10.1.12.1 255.255.255.252
 shutdown
!
interface Ethernet0/3
 ip address 10.1.13.1 255.255.255.252
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 area 12 virtual-link 2.2.2.2
 network 10.0.0.0 0.255.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 12

R2

hostname R2
!
interface Ethernet0/0
 ip address 172.16.2.2 255.255.255.0
!
interface Ethernet0/1
 ip address 172.16.12.2 255.255.255.252
!         
interface Ethernet0/2
 ip address 10.1.12.2 255.255.255.252
!
interface Ethernet0/3
 ip address 10.1.24.1 255.255.255.252
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 area 12 virtual-link 1.1.1.1
 network 10.0.0.0 0.255.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 12

R3

hostname R3
!
interface Ethernet0/0
 ip address 10.1.13.2 255.255.255.252
!
interface Ethernet0/1
 ip address 10.1.3.3 255.255.255.0
!         
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 10.0.0.0 0.255.255.255 area 0

R4

hostname R4
!
interface Ethernet0/0
 ip address 10.1.24.2 255.255.255.252
!
interface Ethernet0/1
 ip address 10.1.4.4 255.255.255.0
!         
router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 10.0.0.0 0.255.255.255 area 0

関連記事

「ネットワークのおべんきょしませんか?」内の記事を検索

OSPFの仕組み