Debian
OSPF:將 Quagga 遷移到 BIRD
在幾次 Quagga 打嗝之後,我需要/想要從 Quagga 遷移到 BIRD,即Quagga 在 Stretch 更新後停止工作。
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 !
在解決了這裡描述的從 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 協議)。