0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ネットワーク構築 #5(OSPF仮想リンク設定)

Last updated at Posted at 2022-08-06

今回の内容

・OSPFでバックボーンエリアと直結していないエリアとバックボーンエリアを直結するための仮想リンク設定
・実施日:2022/07/31~2022/08/06

状態

現在は下記のように接続状態になっています。
image.png

show ip routeの状態
image.png
隣接するR3と直接接続している状態のみとなります。
R1でdefault-information originate alwaysを設定していますが、R4ではデフォルトゲートウェイが未設定の状態です。
仮想リンクを作成すれば、デフォルトゲートウェイは配布されるのでしょうか。

仮想リンクを作成して以下のようにします。
image.png

設定

**R2**
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 3.3.3.3
R2(config-router)#network 192.168.3.254 0.0.0.0 area 1
R2(config-router)#end
R2#

**R3**
R3(config)#router ospf 1
R3(config-router)#area 1 virtual-link 2.2.2.2
R3(config-router)#network 192.168.3.253 0.0.0.0 area 1
R3(config-router)#end

状態確認

show ip ospf virtual-linkでR2とR3の仮想リンクの状態を確認します。

**R2**
R2#sh ip ospf virtual-link
Virtual Link OSPF_VL1 to router 3.3.3.3 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet1, Cost of using 1
  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:09
    Adjacency State FULL (Hello suppressed)
    Index 2/3, 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

**R3**
R3#sh ip ospf virtual-link
Virtual Link OSPF_VL1 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet0
 Topology-MTID    Cost    Disabled     Shutdown      Topology Name
        0           1         no          no            Base
  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:03
    Adjacency State FULL (Hello suppressed)
    Index 1/3, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransmission scan time is 0 msec, maximum is 0 msec

コマンドを実行して「Virtual Link OSPF_VL1 to router X.X.X.X is upと表示されていれば仮想リンクは接続が出来ています。
R4にルートが配布されているか確認します
show ip route

R4#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is 192.168.4.254 to network 0.0.0.0

O*E2  0.0.0.0/0 [110/1] via 192.168.4.254, 00:00:32, FastEthernet0
      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
O IA  192.168.1.0/24 [110/4] via 192.168.4.254, 00:00:32, FastEthernet0
O IA  192.168.2.0/24 [110/3] via 192.168.4.254, 00:00:32, FastEthernet0
O IA  192.168.3.0/24 [110/2] via 192.168.4.254, 00:00:32, FastEthernet0
      192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.4.0/24 is directly connected, FastEthernet0
L        192.168.4.253/32 is directly connected, FastEthernet0

192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
3つのルートとデフォルトゲートウェイへのルートが配布されていることが確認出来ました。

今回はここまで

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?