OSPF:将 Quagga 迁移到 BIRD

OSPF:将 Quagga 迁移到 BIRD

在经历了几次 Quagga 打​​嗝之后,我需要/想要从 Quagga 迁移到 BIRD,即在 Stretch 中更新后,Quagga 停止工作

BIRD 也更加灵活和现代。

我在 Quagga 中有 OSPF BIND 任播配置,并且希望以与 BIRD 类似的方式设置 OSPF 服务。

该怎么办?

我的/etc/quagga/ospfd.conf是:

!
! Zebra configuration saved from vty
!   2011/03/22 21:17:11
!
hostname dns
password 8 xxxxxxx
enable password 8 xxxxxxx
log stdout
service password-encryption
!
!
!
interface dummy0
 ip ospf cost 100
!
interface dummy1
 ip ospf cost 500
!
interface dummy2
 ip ospf cost 1000
!
interface dummy3
 ip ospf cost 900
!
interface eth0
 ip ospf authentication message-digest
 ip ospf message-digest-key 5 md5 MySecretPassword
 ip ospf cost 1000
!
interface eth1
 ip ospf cost 1000
!
interface lo
!
router ospf
 ospf router-id 1.1.1.1
 auto-cost reference-bandwidth 10000
 network 1.1.1.0/22 area 0.0.0.0
 network 2.2.2.2/32 area 0.0.0.0
 network 3.3.3.3/32 area 0.0.0.0
 network 4.4.4.4/32 area 0.0.0.0
 network 5.5.5.5/32 area 0.0.0.0
 area 0 filter-list prefix AREA_1_OUT out
!
ip prefix-list AREA_1_OUT seq 5 permit 2.2.2.2/32
ip prefix-list AREA_1_OUT seq 10 permit 3.3.3.3/32
ip prefix-list AREA_1_OUT seq 15 permit 4.4.4.4/32
ip prefix-list AREA_1_OUT seq 20 permit 5.5.5.5/32
ip prefix-list AREA_1_OUT seq 25 deny any
!
line vty
!

答案1

解决此处描述的问题后从 Quagga 到 BIRD 的 OSPF md5 加密并在BIRD 中的 OSPF 路由成本,其余的迁移相对容易。

要获得同等的服务,步骤如下:

sudo dpkg --purge quagga
sudo apt-get install bird
sudo chkconfig bird6 off
sudo service bird6 stop

然后需要在/etc/bird/bird.conf以下位置创建设置:

#
router id 1.1.1.1;

# The Device protocol is not a real routing protocol. It doesn't generate any
# routes and it only serves as a module for getting information about network
# interfaces from the kernel.
protocol device {
    scan time 10;
}

protocol ospf {
        tick 2;
        rfc1583compat yes;

        area 0.0.0.0 {

            networks {
                1.1.1.0/22;
            };
            stubnet 2.2.2.2/32 {
                 cost 100;
            };
            stubnet 3.3.3.3/32 {
                 cost 500;  
            };
            stubnet 4.4.4.4/32 {
                 cost 1000;
            };
            stubnet 5.5.5.5/32 {
                 cost 900;
            };
            interface "eth0" {
                cost 1000;
                password "MySecretPassword" {
                    id 5;
                };
                authentication cryptographic; 
            };

            interface "dummy0" {
                stub;
            };
            interface "dummy1" {
                stub;
            };
            interface "dummy2" {
                stub;
            };
            interface "dummy3" {
                stub;
            };

        };
}

修改配置后:

sudo service bird restart

检查本地服务器上的服务:

sudo birdc

进而

show status

show ospf 

show ospf state

show ospf neighbors

PS 我没有找到直接的文档,也没有找到太多关于 Quagga 共存和迁移到 BIRD 的信息,因此决定在这里记录下来。

我没有立即迁移所有 Quagga 服务器/OSPF 节点,因为两种配置都很相似,并且彼此通信(显然是通过 OSPF 协议)。

也可以看看BIRD 的 OSPF 导入路由过滤器

相关内容