Jump to content
Калькуляторы

Mikrotik + OSPF Quagga

День добрый. Так получилось, что у нас в конторе вместо админа я, а я рукожоп, но ближе к сути:

 

Есть одна сеть. Есть бордер на Mikrotik RB1100AHx2 с прошивкой 6.32.2 с кучей интерфейсов, но интересны только 2 из них. На одной белый IP пусть будет 1.1.1.1/30. Смотрит он на Сервер под Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux с IP 1.1.1.2/30 на интерфейсе eth0.

 

Второй порт с vlan'ом и IP 10.50.10.1/28 смотрит на коммутатор

SNR-S2990G-24T Device, Compiled on Aug 28 09:47:05 2014

SoftWare Version 7.0.3.5(R0102.0089)

BootRom Version 7.1.37

HardWare Version R01

На скажем порт 1/0/1, который транком пропускает все, что ему дают и имеет IP 10.50.10.2/28 на vlan'е конечно же. Соседний порт 1/0/2 также транкает все и подключен к eth1 сервера описанного выше. Такой вот грубый мужской треугольник.

 

 

post-148816-022217600 1498539946_thumb.jpg

 

 

На Mikrotik в стародавние времена был поднят ospf с одной area и все руки не доходили поправить тонны варнингов в логах. С месяц назад area были крупно попилены на подсети */20 и варнинги ушли в небытие.

 

В те же времена была поставленна и настроена Quagga. OSPF успешно выполнял свои задачи.

 

Неделю назад моргнул свет в серверной (почему бесперебойник не сработал отдельная история с грустным-грустным началом и трагичным финалом) и Микротик с SNR благополучно ушли в ребут. После чего OSPF между Quagga и Mikrotik загнулась.

 

Сейчас картина выглядит безрадостно. OSPF на Микротик пашет как надо, area мониторит, приветы/ответы шлёт и получает. Quagg'у видит и зовёт в гости поделится роутами на подсети абонентских белых и серых IP. А грустно здесь то, что Quagga не отвечает ему взаимностью и в упор его не замечает (neighbors пуст). Покопавшись в гугле не нашёл похожих случаев, от чего подозреваю что решение простое (но не для меня).

 

Конфиг Микротик

 

# jun/16/2017 13:39:38 by RouterOS 6.32.2 
# software id = GJDK-NDAS 
# 
/routing ospf area 
add area-id=0.0.0.12 name=area012 
add area-id=0.0.0.11 default-cost=1 inject-summary-lsas=no name=area011 type=\ 
   stub 
add area-id=0.0.0.13 name=area013 
add area-id=0.0.0.10 name=area010 
add area-id=0.0.0.9 name=area009 
add area-id=0.0.0.14 name=area014 
/routing ospf instance 
set [ find default=yes ] distribute-default=always-as-type-2 \ 
   redistribute-connected=as-type-2 redistribute-static=as-type-2 router-id=\ 
   10.60.255.255 
/routing ospf interface 
add cost=100 interface=vlan3 network-type=broadcast 
add interface=ether3 network-type=broadcast passive=yes 
add interface=ether4 network-type=broadcast passive=yes 
add interface=vlan1 network-type=broadcast passive=yes 
/routing ospf network 
add area=backbone 
add area=area012 network=10.201.0.0/20 
add area=area011 network=10.200.0.0/20 
add area=backbone network=10.50.10.0/28 
add area=area013 network=10.202.0.0/20 
add area=area010 network=1.1.1.16/30 
add area=area009 network=10.50.2.16/30 
add area=area014 network=10.204.0.0/20 
add area=backbone network=1.1.1.0/24

 

 

Конфиг Quagga

 

zebra:

hostname serveronelove 
password 12345 
enable password 12345 

ospfd:

hostname serveronelove 
password 12345 
enable password 12345 
log file /var/log/quagga/ospfd.log 
log stdout 
! 
interface eth0 
router ospf 
ospf router-id 1.1.1.2 
neighbor 1.1.1.1 
redistribute kernel 
redistribute connected 
redistribute static 
network 1.1.1.0/30 area 0 
! 
line vty 

 

 

И так после некоторых мытарств получил вот что.

Завожу старый конфиг на котором все работало годами.

 

hostname serveronelove 
password 12345 
enable password 12345 
log file /var/log/quagga/ospfd.log 
log stdout 
! 
interface eth0 
router ospf 
ospf router-id 1.1.1.1 
redistribute kernel 
redistribute connected 
redistribute static 
network 1.1.1.0/24 area 0.0.0.0 
network 10.0.0.0/8 area 0.0.0.0 
network 172.16.100.0/24 area 0.0.0.0 
network 172.16.200.0/24 area 0.0.0.0 
network 192.168.5.0/24  area 0.0.0.0 
! 
line vty 
!  

 

 

Получаю полные логи:

 

 

2017/06/27 08:47:46 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 172.16.200.1, ifindex 848566, AllSPFRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:47:46 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 172.16.200.1, ifindex 848566, AllDRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:48:41 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:48:44 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 
2017/06/27 08:48:55 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:48:58 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 
2017/06/27 08:49:38 OSPF: DR-Election[1st]: Backup 192.168.5.1 
2017/06/27 08:49:38 OSPF: DR-Election[1st]: DR     192.168.5.1 
2017/06/27 08:49:38 OSPF: DR-Election[2nd]: Backup 0.0.0.0 
2017/06/27 08:49:38 OSPF: DR-Election[2nd]: DR     192.168.5.1 
2017/06/27 08:49:38 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 192.168.5.1, ifindex 621433, AllDRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:50:15 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 192.168.5.1, ifindex 848706, AllSPFRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:50:55 OSPF: DR-Election[1st]: Backup 192.168.5.1 
2017/06/27 08:50:55 OSPF: DR-Election[1st]: DR     192.168.5.1 
2017/06/27 08:50:55 OSPF: DR-Election[2nd]: Backup 0.0.0.0 
2017/06/27 08:50:55 OSPF: DR-Election[2nd]: DR     192.168.5.1 
2017/06/27 08:50:55 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 192.168.5.1, ifindex 848706, AllSPFRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:50:55 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 192.168.5.1, ifindex 848706, AllDRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:51:15 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:51:18 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 
2017/06/27 08:51:28 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:51:32 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 
2017/06/27 08:52:12 OSPF: DR-Election[1st]: Backup 192.168.5.1 
2017/06/27 08:52:12 OSPF: DR-Election[1st]: DR     192.168.5.1 
2017/06/27 08:52:12 OSPF: DR-Election[2nd]: Backup 0.0.0.0 
2017/06/27 08:52:12 OSPF: DR-Election[2nd]: DR     192.168.5.1 
2017/06/27 08:52:12 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 192.168.5.1, ifindex 621433, AllDRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:52:25 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 172.16.200.1, ifindex 848634, AllSPFRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:53:05 OSPF: DR-Election[1st]: Backup 172.16.200.1 
2017/06/27 08:53:05 OSPF: DR-Election[1st]: DR     172.16.200.1 
2017/06/27 08:53:05 OSPF: DR-Election[2nd]: Backup 0.0.0.0 
2017/06/27 08:53:05 OSPF: DR-Election[2nd]: DR     172.16.200.1 
2017/06/27 08:53:05 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 172.16.200.1, ifindex 848634, AllSPFRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:53:05 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 172.16.200.1, ifindex 848634, AllDRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:53:48 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:53:52 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 
2017/06/27 08:54:02 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:54:05 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 
2017/06/27 08:54:45 OSPF: DR-Election[1st]: Backup 192.168.5.1 
2017/06/27 08:54:45 OSPF: DR-Election[1st]: DR     192.168.5.1 
2017/06/27 08:54:45 OSPF: DR-Election[2nd]: Backup 0.0.0.0 
2017/06/27 08:54:45 OSPF: DR-Election[2nd]: DR     192.168.5.1 
2017/06/27 08:54:45 OSPF: can't setsockopt IP_ADD_MEMBERSHIP (fd 6, addr 192.168.5.1, ifindex 621433, AllDRouters): No buffer space available; perhaps a kernel limit on # of multicast group memberships has been exceeded? 
2017/06/27 08:56:22 OSPF: interface 192.168.5.1 [621433] leave AllSPFRouters Multicast group. 
2017/06/27 08:56:38 OSPF: interface 192.168.5.1 [621433] join AllSPFRouters Multicast group. 

 

 

Дебаг же, пестрит этим:

 

 

2017/06/26 10:42:56 OSPF: Router-ID[OLD:1.1.1.1]: Update 
2017/06/26 10:42:56 OSPF: Router-ID[NEW:1.1.1.1]: Update 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth0:1.1.1.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth1.416:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth1.805:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth1.907:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth1.912:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth1.410:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering int eth1.430:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:42:56 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:42:58 OSPF: make_hello: options: 2, int: eth1.430:172.16.100.1 
2017/06/26 10:42:58 OSPF: make_hello: options: 2, int: eth1.410:172.16.100.1 
2017/06/26 10:43:00 OSPF: Router-ID[OLD:1.1.1.1]: Update 
2017/06/26 10:43:00 OSPF: Router-ID[NEW:1.1.1.1]: Update 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth0:1.1.1.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth1.416:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth1.805:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth1.907:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth1.912:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth1.410:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering int eth1.430:172.16.100.1, INBR(NULL), LSA[Type5,id(192.168.5.166),ar(1.1.1.1)] 
2017/06/26 10:43:00 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:01 OSPF: make_hello: options: 2, int: eth1.912:172.16.100.1 
2017/06/26 10:43:02 OSPF: make_hello: options: 2, int: eth1.805:172.16.100.1 
2017/06/26 10:43:05 OSPF: make_hello: options: 2, int: eth1.416:172.16.100.1 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth0:1.1.1.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.416:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.805:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.907:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.912:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.410:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.430:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.201),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth0:1.1.1.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.416:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.805:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.907:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.912:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.410:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering int eth1.430:172.16.100.1, INBR(NULL), LSA[Type5,id(172.16.200.99),ar(1.1.1.1)] 
2017/06/26 10:43:05 OSPF: ospf_flood_through_interface(): considering nbr 1.1.1.1 (2-Way) 
2017/06/26 10:43:05 OSPF: make_hello: options: 2, int: eth0:1.1.1.1 

 

 

Заранее благодарю всех откликнувшихся. Если нужны ещё данные или конфиги, то с удовольствием поделюсь.

 

P.S. Цимес в том, что менять что-то можно только ночью, пока абоненты спят.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.