#sudo apt-get install quagga
zebra=yes ospfd=yes
ip forwarding line vty
router ospf redistribute kernel network 0.0.0.0/0 area 0.0.0.0 line vty
#sudo service quagga restart
# vtysh -e "show ip ospf nei" Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL 198.51.100.11 128 Full/DR 2.548s 192.0.2.25 vmbr0:192.0.2.26 0 0 0 192.0.2.27 1 2-Way/DROther 2.761s 192.0.2.27 vmbr0:192.0.2.26 0 0 0 192.0.2.28 1 Full/Backup 2.761s 192.0.2.28 vmbr0:192.0.2.26 0 0 0
# vzlist CTID NPROC STATUS IP_ADDR HOSTNAME 100 38 running - radius.local 101 26 running 198.51.100.2 dns.local 104 47 running 203.0.113.4 cacti.local 105 56 running 203.0.113.5 host3.local 152 22 running 203.0.113.52 host4.local 249 96 running 203.0.113.149 zabbix.local # vtysh -e "show ip ospf database external self-originate" | fgrep Link\ State\ ID Link State ID: 198.51.100.2 (External Network Number) Link State ID: 192.168.98.4 (External Network Number) Link State ID: 192.168.98.5 (External Network Number) Link State ID: 192.168.98.52 (External Network Number) Link State ID: 192.168.98.149 (External Network Number)
... interface vmbr0 ip ospf hello-interval 1 ip ospf dead-interval 3 ...
... ip prefix-list ifvmbr0 seq 100 permit 192.0.2.0/24 le 32 router ospf redistribute kernel route-map openvz route-map openvz deny 100 match ip address prefix-list ifvmbr0 route-map openvz permit 200 ...
Source: https://habr.com/ru/post/244151/
All Articles