Jump to content

Recommended Posts

Posted (edited)

Здравствуйте все. имеется два маршрутизатора на Debian 7u1. На обоих поднято по 200 одинаковых vlan'ов, между которыми работает vrrp (keepalived). Оба соединены между собой двумя vlanами (bond0.4012 и bond0.4021) и от каждого линк в ядро (bond0.400[1,2]). конфигурация bird одинакова (кроме Router ID и vlan`а в ядро ):

# Configure logging
#log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
log stderr all;
log "/var/log/bird.log" all;

filter OSPF_in {
if ( net=0.0.0.0/0 || net ~ 10.0.0.0/8 ) then
	accept;
else
	reject;
};

filter OSPF_out {
if (net ~ 10.16.0.0/12 ) then
	accept;
else
	reject;
};


# This pseudo-protocol performs synchronization between BIRD's routing
# tables and the kernel. If your kernel supports multiple routing tables
# (as Linux 2.2.x does), you can run multiple instances of the kernel
# protocol and synchronize different kernel tables with different BIRD tables.
protocol kernel {
#	learn;			# Learn all alien routes from the kernel
debug {states,routes,filters,interfaces};
persist;		# Don't remove routes on bird shutdown
scan time 20;		# Scan kernel routing table every 20 seconds
import all;		# Default is import all
export all;		# Default is export none
#	kernel table 5;		# Kernel table to synchronize with (default: main)
}

# This pseudo-protocol watches all interface up/down events.
protocol device {
scan time 10;		# Scan interfaces every 10 seconds
}



protocol ospf C1{
rfc1583compat yes;
router id 10.0.1.1;
#	ecmp;
import filter OSPF_in;
#	export filter OSPF_out;
export none;
debug {states,routes,filters,interfaces};
#	debug all;
area 0{
	stub no;
               interface "bond0.4001"{
                       type bcast;
                       cost 100;
                       hello 1;
                       dead count 3;
                       retransmit 6;
                       transmit delay 5;
                       wait 30;
                       authentication cryptographic;
                       password "xxx";
               };

	interface 10.0.1.1/32 {
		stub 1;
	};


};
area 1{
	stub yes;

               interface "bond0.4012", "bond0.4021"{
		type bcast;
		cost 10;
		hello 1;
		dead count 3;
		retransmit 6;
		transmit delay 5;
		wait 30;
		authentication cryptographic;
		password "xxx";
	};
               interface  10.16.0.0/12 {
		stub 1;
                       cost 10;
               };

};		

}

 

Так вот при запуске второго маршрутизатора, на момент отсутствия на нем клиентских интерфесов (bond0.1-bond0.250, ip из сети 10.16/12), bird на первом педает с ошибкой

Sep 23 14:58:59 C1R1 kernel: [ 2844.153899] bird[12688] general protection ip:7f3494d50dda sp:7fffb7262670 error:0 in bird[7f3494d2d000+5c000]

или

Sep 23 15:00:28 C1R1 kernel: [ 2932.437643] bird[12791]: segfault at 7ffff2ce1280 ip 00007f7aa96de7ea sp 00007ffff2c36fb0 error 6 in bird[7f7aa969f000+61000]

Последнее сообщение в логе:

23-09-2013 15:00:08 <WARN> OSPF: LSA too large to send (Type: 0001, Id: 10.0.1.1, Rt: 10.0.1.1)

 

Если же на втором перед этим поднять все клиентские интерфейсы, ошибки не возникает.

 

Сейчас решил проблему, перенесением линков между магистральными маршрутизаторами в area 0, но, я думаю, это костыль:

 

# Configure logging
#log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
log stderr all;
log "/var/log/bird.log" all;

filter OSPF_in {
if ( net=0.0.0.0/0 || net ~ 10.0.0.0/8 ) then
	accept;
else
	reject;
};

filter OSPF_out {
if (net ~ 10.16.0.0/12 ) then
	accept;
else
	reject;
};


# This pseudo-protocol performs synchronization between BIRD's routing
# tables and the kernel. If your kernel supports multiple routing tables
# (as Linux 2.2.x does), you can run multiple instances of the kernel
# protocol and synchronize different kernel tables with different BIRD tables.
protocol kernel {
#	learn;			# Learn all alien routes from the kernel
debug {states,routes,filters,interfaces};
persist;		# Don't remove routes on bird shutdown
scan time 20;		# Scan kernel routing table every 20 seconds
import all;		# Default is import all
export all;		# Default is export none
#	kernel table 5;		# Kernel table to synchronize with (default: main)
}

# This pseudo-protocol watches all interface up/down events.
protocol device {
scan time 10;		# Scan interfaces every 10 seconds
}



protocol ospf C1{
rfc1583compat yes;
router id 10.0.1.1;
#	ecmp;
import filter OSPF_in;
#	export filter OSPF_out;
export none;
debug {states,routes,filters,interfaces};
#	debug all;
area 0{
	stub no;
               interface "bond0.4001"{
                       type bcast;
                       cost 100;
                       hello 1;
                       dead count 3;
                       retransmit 6;
                       transmit delay 5;
                       wait 30;
                       authentication cryptographic;
                       password "xxx";
               };

               interface "bond0.4012", "bond0.4021"{
		type bcast;
		cost 10;
		hello 1;
		dead count 3;
		retransmit 6;
		transmit delay 5;
		wait 30;
		authentication cryptographic;
		password "xxx";
	};

	interface 10.0.1.1/32 {
		stub 1;
	};


};
area 1{
	stub yes;

               interface  10.16.0.0/12 {
		stub 1;
                       cost 10;
               };

};		

}

 

Подскажите, как решить?

Edited by SABRE
Posted

Без корки бесполезно, только если этот баг повторяется в лабе. Да и если повторяется, лучше всё-таки корку им отправить, быстрее будет имхо, чем кто-нибудь из разработчиков соберёт стенд

Posted (edited)

Пока молчат, решил посмотреть что там происходит. Все валится, когда функции ospf_pkt_fill_hdr (proto/ospf/lsupd.c) передается указатель на несуществующую область памяти (что-то из 0xffffffffxxxxxxxx). Откуда оно берется, разобраться не смог.

Нашел еще одно решение проблемы - на интерфесах между маршрутизаторами выставить MTU 9000 - костыль, но менее костыльный, чем выносить интерфесы в backbone.

С gdb работал впервые, если не составит труда, может кто поможет?

Edited by SABRE
Posted

Решено.

Ondrej 'SanTiago' Zajicek подсказал, что на интерфейсах с большим размером пакетов нужно использовать rx buffer large. А c segfault'ом разбираются.

PS ddd ужасно тупил, так и не смог ничего сделать. Огромное спасибо srg555, в дальнейшем не с такими сложными проблемами, думаю, разобраться смогу.

Posted

srg555 последний раз я работал с отладчиком в универе (OllyDBG), когда отлаживал 100-строчные программы на АСМе. С GDB, немножко посложнее.)

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.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.