CORE、quagga、zebra 守護程式 - 自動啟動路由器作業系統的問題

CORE、quagga、zebra 守護程式 - 自動啟動路由器作業系統的問題

我需要在 CORE 中開始一些模擬。在 ubuntu 16.04 上,我沒有任何正確配置的問題。我按照網路上許多教程的步驟進行操作,一切正常。但在 17.10 我遇到了奇怪的麻煩。星形模擬後,斑馬守護程式不會在所有路由器上自動啟動,我需要在每個「裝置」上手動啟動。我為此奮鬥了五天多,我開始感到沮喪。

我看到現在 quagga 安裝與教程所示不同,但我不知道如何修復它。範例:之後

aptitude install quagga

我看到該文件quagga/etc/init.d/建立。一樣的喜歡/etc/quagga/daemons

真的不知道我該輸入什麼內容來幫助你幫我...

例如,我執行本教程中的步驟:http://www.brianlinkletter.com/how-to-build-a-network-of-linux-routers-using-quagga/

答案1

好吧,經過漫長的幾天我找到了解決方案。

首先,我修復了預設安裝的鏈接,zebra.service我們可以在 上找到/lib/systemd/system/。在某個文字編輯器上執行zebra.service並更改第 4、10、11、13 行。

/usr/lib/quagga/zebra.conf反而/etc/quagga/zebra.conf

最終文件應如下所示:

 1 [Unit]
 2 Description=GNU Zebra routing manager
 3 After=network.target
 4 ConditionPathExists=/usr/lib/quagga/zebra.conf
 5 Documentation=man:zebra
 6
 7 [Service]
 8 Type=forking
 9 ExecStartPre=/sbin/ip route flush proto zebra
10 ExecStartPre=-/bin/chmod -f 640 /etc/quagga/vtysh.conf /usr/lib/quagga/zebra.conf
11 ExecStartPre=-/bin/chown -f quagga:quagga /run/quagga /usr/lib/quagga/zebra.conf
12 ExecStartPre=-/bin/chown -f quagga:quaggavty /etc/quagga/vtysh.conf
13 ExecStart=/usr/sbin/zebra -d -A 127.0.0.1 -f /usr/lib/quagga/zebra.conf
14 Restart=on-abort
15 RuntimeDirectory=quagga
16
17 [Install]
18 WantedBy=network.target

儲存檔案並使用 重新啟動系統守護程序systemctl daemon-reload。使用 啟動 Zebra 服務system zebra start

另一種方法是建立符號連結來查看zebra.conf。若要執行此操作,請使用:

ln -s /usr/lib/quagga/zebra.conf /etc/quagga/zebra.conf

現在您已經修復了從 Ubuntu 16.04 到現在的錯誤實施的軟體包儲存庫。

第二步我們需要修復 CORE 安裝。預設沒有配置的東西很少。我注意到群組訪問存在問題。 CORE 不想自動啟動 zebra.service,因為 root 使用者無權存取特定的臨時資料夾。正如我所看到的,root 使用者不是「quaggavty」群組的成員。

要改變這種情況只需將 root 新增到群組: usermod -a -G quaggavt root

重新啟動CORE並享受效能工作程序。

相關內容