0
0

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 3 years have passed since last update.

FRRでOSPFの設定をしてみる

0
Last updated at Posted at 2023-09-14

目的

Containerlabで構築したFRRで、OSPFの設定をしてみる

image.png

IP設定

router1

  • eth1: 192.168.1.1
  • eth2: 192.168.3.1

router2

  • eth1: 192.168.1.2
  • eth2: 192.168.2.2

router3

  • eth1: 192.168.3.2
  • eth2: 192.168.2.1

OSPF

OSPFの有効化
/etc/frr/daemons

ospfd=yes

FRRの再起動

/usr/lib/frr/frrinit.sh restart

or
ホスト側で実行

docker restart frr1

ログイン

vtysh

IPアドレスの設定

conf t
interface eth1
ip address 192.168.1.1/24
conf t
interface eth2
ip address 192.168.3.1/24

OSPFの設定

conf t
router ospf
router-info area 0.0.0.0
network 192.168.1.0/24 area 0.0.0.0
network 192.168.3.0/24 area 0.0.0.0

OSPFにおけるコストの変更

conf t
int eth1
ip ospf cost 500

configの確認

最終的に生成された設定

Building configuration...

Current configuration:
!
frr version 7.5.1_git
frr defaults traditional
hostname router1
no ipv6 forwarding
!
interface eth1
 ip address 192.168.1.1/24
 ip ospf cost 500
!
interface eth2
 ip address 192.168.3.1/24
!
router ospf
 network 192.168.1.0/24 area 0.0.0.0
 network 192.168.3.0/24 area 0.0.0.0
 router-info area
!
line vty
!
end

router2

Building configuration...

Current configuration:
!
frr version 7.5.1_git
frr defaults traditional
hostname router2
no ipv6 forwarding
!
interface eth1
 ip address 192.168.1.2/24
 ip ospf cost 500
!
interface eth2
 ip address 192.168.2.2/24
!
router ospf
 network 192.168.1.0/24 area 0.0.0.0
 network 192.168.2.0/24 area 0.0.0.0
 router-info area
!
line vty
!
end

router3

Building configuration...

Current configuration:
!
frr version 7.5.1_git
frr defaults traditional
hostname router3
no ipv6 forwarding
!
interface eth1
 ip address 192.168.3.2/24
!
interface eth2
 ip address 192.168.2.1/24
!
router ospf
 network 192.168.2.0/24 area 0.0.0.0
 network 192.168.3.0/24 area 0.0.0.0
 router-info area
!
line vty
!
end
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?