Quagga 配置筆記


 此處是記錄配置 quagga筆記, 關於Quagga詳細介紹可參考文檔: https://www.quagga.net/docs/quagga.pdf

環境版本:

       Kernel: CentOS 7(3.10.0-693)

       Quagga: 0.99.22.4

 

安裝Quagga:

    yum install quagga

 

配置Quagga:

  配置Router01: 

vim /etc/quagga/zebra.conf
hostname Router01
password zebra
debug zebra events
debug zebra packet
debug zebra rib
log file /var/log/quagga/zebra.log

vim /etc/quagga/ripd.conf
hostname ripd
password zebra
debug rip events
debug rip packet
router rip
network 192.168.230.0/24
! network enp0s10
route 192.168.10.0/24
distribute-list private-only in enp0s10
access-list private-only permit 192.168.0.0/16
access-list private-only deny any
log file /var/log/quagga/ripd.log

vim /etc/quagga/ospfd.conf
hostname ospfd
password zebra
debug ospf event
debug ospf packet all
router ospf
ospf router-id 192.168.230.237
network 192.168.230.0/24 area 0.0.0.0
network 192.168.30.0/24 area 0.0.0.2
log file /var/log/quagga/ospfd.log

vim /etc/quagga/bgpd.conf
hostname bgpd
password zebra
log file /var/log/quagga/bgpd.log
log stdout
debug bgp events
debug bgp zebra
router bgp 7675
 bgp router-id 192.168.230.237
 network 192.168.50.0/24
 neighbor 192.168.230.239 remote-as 7676

  

 配置Router02:

vim /etc/quagga/zebra.conf
hostname Router02
password zebra
debug zebra events
debug zebra packet
debug zebra rib
log file /var/log/quagga/zebra.log


vim /etc/quagga/ripd.conf
hostname ripd
password zebra
debug rip events
debug rip packet
router rip
! network 192.168.230.0/24
network enp0s10
route 192.168.20.0/24
distribute-list private-only in enp0s10
access-list private-only permit 192.168.0.0/16
access-list private-only deny any
log file /var/log/quagga/ripd.log


vim /etc/quagga/ospfd.conf
hostname ospfd
password zebra
debug ospf event
debug ospf packet all
router ospf
ospf router-id 192.168.230.239
network 192.168.230.0/24 area 0.0.0.0
network 192.168.40.0/24 area 0.0.0.2
log file /var/log/quagga/ospfd.log


vim /etc/quagga/bgpd.conf
hostname bgpd
password zebra
log file /var/log/quagga/bgpd.log
log stdout
debug bgp events
debug bgp zebra
router bgp 7676
 bgp router-id 192.168.230.239
 network 192.168.60.0/24
 neighbor 192.168.230.237 remote-as 7675

  

啟動服務:

      systemctl enable zebra ripd ospfd bgpd 

      systemctl start zebra ripd ospfd bgpd

注:

telnet 連接對對應的服務,具體端口如下:

# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:2602 0.0.0.0:* LISTEN 596/ripd
tcp 0 0 127.0.0.1:2604 0.0.0.0:* LISTEN 599/ospfd
tcp 0 0 127.0.0.1:2605 0.0.0.0:* LISTEN 598/bgpd
tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN 598/bgpd
tcp 0 0 127.0.0.1:2601 0.0.0.0:* LISTEN 590/zebra

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM