LoginSignup
0
0

More than 1 year has passed since last update.

ネットワーク構築 #2(OSPF設定)

Last updated at Posted at 2022-06-25

今回の内容

・R1とR2をospfで繋げる
実施日:2022/06/11~2022/06/25

1.設定項目(R1)

R1(config)#int fa 1
R1(config-if)#ip address 192.168.2.254 255.255.255.0
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#netowrk 192.168.2.254 0.0.0.0 area 0
R1(config-router)#router-id 1.1.1.1
R1(config-router)#exit

R2(config)#int fa 0
R2(config-if)#ip ospf priority 255
R2(config-if)#end
R2#clear ip ospf process fa 0
R1(config-if)#ip ospf priority 255
R1(config-if)#end
R1#clear ip ospf process

R1(config)#int loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#exit

2.設定項目(R2/R3)

※R3も同じ設定、値に関しては192.168.3.0/24でセグメント作成

R2(config)#int fa 0
R2(config-if)#192.168.2.253 255.255.255.0
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#netowrk 192.168.2.253 0.0.0.0 area 0
R2(config-router)#router-id 2.2.2.2
R2(config-router)#exit

R2(config)#int fa 0
R2(config-if)#ip ospf priority 255
R2(config-if)#end
R2#clear ip ospf process

R2(config)#int loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#exit

3.結果

R1とR2でDRとBDRが選出されていることを確認しました。
確認したコマンド

R1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2         255   FULL/DR         00:00:39    192.168.2.253   FastEthernet1
R2#show ipospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1         255   FULL/BDR        00:00:37    192.168.2.254   FastEthernet0

もう1台ルーターがないと、ospfのNW環境の構築が不十分ですので、近日中にもう1台用意して
構築してみたいと思います。

2022/07/10追記
ルーターを1台追加し、3台となりました。
以下、それぞれのルーターから見たneighborの状態です。

R1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2         255   FULL/DR         00:00:32    192.168.2.253   FastEthernet1
R2#show ipospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3         255   FULL/DR         00:00:31    192.168.3.253   FastEthernet1
1.1.1.1         255   FULL/BDR        00:00:34    192.168.2.254   FastEthernet0
R3#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/BDR        00:00:37    192.168.3.254   FastEthernet0

LSAが格納しているリンクステートデータベース(LSDB)の要約情報

R1#sh 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         631         0x80000004 0x005EF5 1
2.2.2.2         2.2.2.2         1551        0x80000009 0x002939 2
3.3.3.3         3.3.3.3         1552        0x80000002 0x00D173 1
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.2.253   2.2.2.2         724         0x80000002 0x002497
192.168.3.253   3.3.3.3         1552        0x80000001 0x00515E

更新履歴

2022/07/10
・ルーターR3を追加
・設定項目をR2と同じに設定

2022/07/31
・ルーターR4を追加
・設定項目をR3と同じに設定
R2とR3のエリア間をエリア0からエリア1に、R3とR4のエリア間をエリア2に変更

0
0
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
0