question regarding table lookups

2023-05-15 Thread Andrew Azarov

Hello,

I wanted to ask bird gurus whether there is a way to lookup record in a 
different table during filtering?


We have several connections but also external policy generating daemon 
which optimizes routes.


The route optimization goes into kernel table 2 (as opposed to master).

After that we have a pipe which imports those with higher preference.

Problem is when the route is withdrawn from bgp peers partly or 
completely (basically is not available any more) the route from peer 
table still gets imported.


The result is - we have network routing to nowhere, while there might be 
alternative working routes.


I tried to find any information on another table lookup inside filter 
but was unable to discover anything meaningful...


Is there a way to either:

a) lookup another table within import filter for master table and bump 
preference?


b) during import from kernel table #2 bump preference in other tables? 
instead of using pipes


c) modify preference inside tables manually without using kernel tables? 
ie with birdc?


Thank you in advance

Regards,

Andrew




Re: Bird 2.0.8 + uClibc-ng, BGP RR + OSPF - OSPF falls to 'Alone' state at BGP routes recalculation

2021-09-24 Thread Andrew

Hi.

Yes, it's repeatable always. I'll try to enable debug and reproduce it 
in next days.


Config file (with replaced networks and shrinked comments + legacy 
unused filters/functions) is attached.


It seems like uclibc-ng has slow memory allocator, and it triggers 
hidden Bird bug.


24.09.2021 19:53, Maria Matějka пишет:

Hello!

Do you have any log? Are you able to replicate such a behavior 
consistently? If so, could you please share an exact configuration 
with us to put it into our testbed?


You can also enable "debug protocols all;" in your conf file. This 
produces a s***load of logs, yet it should yield enough clues to 
isolate the problem and find a suitable solution.


Thank you for your report!

Maria

On September 24, 2021 3:13:45 PM UTC, Andrew  wrote:

Hi all.

I have Bird 2.0.8 on one of border routers, it runs with kernel 5.10.26
and uClibc-ng 1.0.38. It acts as RR and receives FV from uplink + FV
from second border (also RR), and it has 2 routing tables (one which
receives BGP routes, then routes sinks to main table.

When second border's BGP link fails, Bird starts to rebuild routing
table, and acts quite strange (too slow birdc response, etc) and after
~5 minutes OSPF looses neighbors and falls to state 'Alone'. It can be
in that state for hours, and initiated only after bird restart (I didn't
tried protocol restart - usually I don't wait for end of route table
recalculation).

When table recalculation is in progress, perf top shows that 40+% CPU
time is used by malloc routine.

Are there fixes in trunk for such behavior? If no - what extra info is
needed for debugging?

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.



router id 10.x.x.x;

define my_as = x;

function net_martian()
{
return net ~  [ 169.254.0.0/16+, 172.16.0.0/12+, 192.168.0.0/16+, 
10.0.0.0/8+,
224.0.0.0/4+, 240.0.0.0/4+, 0.0.0.0/32-, 
0.0.0.0/0{25,32}, 0.0.0.0/0{0,7} ];
}

function net_internal()
{
return net ~  [ 172.16.0.0/12+, 192.168.0.0/16+, 10.0.0.0/8+, 
x.x.x.0/22+, y.y.y.0/24+ ];
}


function net_local()
{
return net ~ [ x.x.x.0/22+, y.y.y.0/24+ ];
}

function net_peers_world()
{
return net ~ [ a.a.a.a/31+, b.b.b.b/31+ ];
}

function rt_client(int asn_t; prefix set nets)
{
return (net ~ nets && 
(bgp_path.first = asn_t || bgp_path ~ [= my_as asn_t * =]) &&
bgp_path.last = asn_t);
}

function net_clients()
{
return rt_client(y, [c.c.c.0/24]);
}

function rt_export()
{
return ((proto = "static_bgp_ua" || proto = "static_bgp_w" ||
 source = RTS_BGP) &&
!net_martian() &&
bgp_path.len < 64);
}


function rt_export_OSPF() {
#connected & static
if ( source = RTS_DEVICE || proto = "ospf_static" ) then {
return true;
}
return false;
}


filter import_BGP {
# Add prepend for datagroup AS
if ( net_martian() || bgp_path.len > 45 ) then {
reject;
}
accept;
}

filter import_BGP_local {
if ( (net_martian() && !net_peers_world())
 || bgp_path.len > 45 ) then {
reject;
}
accept;
}


filter export_BGP_local_w {
# only BGP routes
if ( rt_export() || 
(net_peers_world()
) ) then {
accept;
}
reject;
}

filter export_BGP_uplink_prepend {
if ( rt_export() && (net_local() || net_clients()) ) then {
bgp_path.prepend(my_as);
bgp_path.prepend(my_as);
accept;
}
reject;
}


filter export_OSPF_world {
#connected & static
if ( rt_export_OSPF() || net = 0.0.0.0/0 ) then {
accept;
}
reject;
}

ipv4 table world;


protocol direct {
ipv4 {
};
}

protocol kernel kernel_main {
persist;# Don't remove routes on bird shutdown
scan time 20;   # Scan kernel routing table every 20 seconds
ipv4 {
export all; # Default is export none
import none;
};
}


protocol device {
scan time 2;# Scan interfaces every 10 seconds
}



protocol static static_bgp_w {
ipv4 {
};
route x.x.x.0/22 unreachable;
route y.y.y.0/24 unreachable;
}

protocol static static_ospf {
ipv4 {
preference 10;  # Default preference of routes
};
route 0.0.0.0/0 unreachable;
}

protocol pipe main_pipe_world {
peer table world;
import filter {krt_metric = 100; accept;};
export filter {if (source = RTS_DEVICE ) then {accept;} reject;};
table master4;
}

protocol osp

Bird 2.0.8 + uClibc-ng, BGP RR + OSPF - OSPF falls to 'Alone' state at BGP routes recalculation

2021-09-24 Thread Andrew

Hi all.

I have Bird 2.0.8 on one of border routers, it runs with kernel 5.10.26 
and uClibc-ng 1.0.38. It acts as RR and receives FV from uplink + FV 
from second border (also RR), and it has 2 routing tables (one which 
receives BGP routes, then routes sinks to main table.


When second border's BGP link fails, Bird starts to rebuild routing 
table, and acts quite strange (too slow birdc response, etc) and after 
~5 minutes OSPF looses neighbors and falls to state 'Alone'. It can be 
in that state for hours, and initiated only after bird restart (I didn't 
tried protocol restart - usually I don't wait for end of route table 
recalculation).


When table recalculation is in progress, perf top shows that 40+% CPU 
time is used by malloc routine.


Are there fixes in trunk for such behavior? If no - what extra info is 
needed for debugging?




Re: IPv6 BGP & kernel 4.19

2019-12-02 Thread Andrew Hearn
On 01/12/2019 18:20, Clément Guivy wrote:
> On 01/12/2019 13:43, Frederik Kriewitz wrote:
>> This is our current suspicion too. neighbours and routes are well
>> below 4096 in our case. We also had to adjust
>> net.ipv6.neigh.default.gc_thresh1/2/3. Since the adjustment it's been
>> working fine.
>>
> 
> Hi, that's good news. One thing that still confuses me though is that
> the default values for these settings are the same in Debian 9 (4.9
> kernel) and Debian 10 (4.19 kernel), so I would expect the behaviour to
> be the same between both versions in that regard.
> Also I'm not sure to understand what this max_size parameter actually
> does since I have it to default value (4096), and yet ipv6 route table
> at the moment is >70k entries large without the kernel complaining.

To add our info -

We're using Intel 82599ES NICs.

We have full table on v4 and v6, and about 20 neighbors on each.

Our route/max_size for v4 and and v6 are defaults (2M and 4096
respectively) - and as noted, these values are the same in our Stretch
and Buster boxes.

Andrew


Re: IPv6 BGP & kernel 4.19

2019-11-21 Thread Andrew Hearn
On 20/06/2019 17:13, Benedikt Neuffer wrote:
> Hi,
> 
> On 19.06.19 20:09, Alarig Le Lay wrote:
>> Hi,
>>
>> On mer. 19 juin 09:10:53 2019, Robert Sander wrote:
>>> Hi,
>>>
>>> our routers run on Debian stretch with bird 1.6.4 from
>>> bird.network.cz/debian.
>>>
>>> Yesterday I tried kernel 4.19 from backports.debian.org and ran into a
>>> weird issue with IPv6 BGP sessions:
>>>
>>> All Peerings reported "Error: Hold timer expired" ca. every 40 minutes.
>>>
>>> IPv6 forwarding was flapping all the time.
>>>
>>> After rebooting into kernel 4.9 everything worked again.
>>>
>>> IPv4 BGP was not affected and also OSPF (v4 and v6). I could disable all
>>> IPv6 BGP peerings on this router and then it forwarded to another router
>>> learned via OSPF for IPv6 without issues.
>>>
>>> Has anyone seen such a behaviour?
>>
>> I’ve seen this with 4.19 on gentoo. For now I’m still running 4.14.
>> https://archives.gentoo.org/gentoo-user/message/fab628cc53e4a55589410f9dff6abd23
>>
> 
> Same here. Gentoo, Linux 4.19.52, Bird 2.0.4. I am running a full table
> using a separate VRF and the default table as management VRF.
> 
> Without traffic through the box (all IPv6 prefixes filtered) the bgp
> sessions is stable. With traffic the bgp session dies after some time
> and ssh connections in the default table freezes.
> 
> I did some packet captures and saw tcp retransmissions before hold timer
> expires.
> 
> Kernel 4.14.127 is here stable, too. Sadly I have no time for a kernel
> bisect until September. (And no glue where to start and how to trigger
> the bug faster.)

Sorry to bring up a fairly old thread...

We believe we are seeing this problem too, since a Stretch->Buster
upgrade - was there a solution to this?

Thanks

Andrew.



Two similar kernel routes with different metrics on bird 1.6.4

2019-09-11 Thread Andrew

Hi all.

I have two default kernel routes with different metrics (for failover, 
when first gateway becomes unreachable - all traffic is switched to 
second gw). I want to pipe it to other kernel table to gracefully handle 
connections to second IP. Unfortunatelly, I can't force bird to learn 
route with higher metric - bird just ignores it.


Option 'merge paths' does nothing in that case. Import filter doesn't 
help - it seems like route is dropped somewhere in protocol, before 
passing to filter.


How can I force bird to learn route with higher metric?



Re: segfault in bird v1.6.4

2018-10-24 Thread Andrew

Hi.

Try to assemble uClibc and bird with debug symbols, and try to analyze 
core dump.


Also it'll be good to run bird (better- to use debug version) in 
valgrind - it'll show all suspicious cases (like access across array 
borders, use of uninitialized variables and so on).


On 24.10.2018 18:05, Alexander Velkov wrote:


Hello bird-team,

I have a bird v1.6.4. configuration that works fine.
A certain set of actions leads to a segfault and a crash of the bird 
binary.


I have configured and built bird 1.6.4. with IPv6 support that runs on 
a box with a i686 linux with kernel v4.14.75. My bird configuration:


### bird6.conf:

protocol device {
  scan time 10;
}

protocol direct C_main {
  interface "*";
  preference 255;
  check link;
}

protocol kernel K_main {
  preference 255;
  scan time 20;
  export all;
  learn;
}

include "*.conff";

### ospfv3.conff in the same directory:

debug protocols all;
log syslog { info, remote, warning, error, auth, fatal, bug };

protocol ospf O_main {
  preference 145;
  instance id 0;

  area 172.16.0.0 {

    interface "vti0" {
  dead 120;
  hello 30;
  cost 1;
  priority 1;
  type pointopoint;

  neighbors {
    fe80::e68:3ff:fe26:5130;
  };
    };

    interface "eth1" {
  dead 40;
  hello 10;
  cost 1;
  priority 1;
  type broadcast;
  stub yes;
    };
  };

  import filter {
    accept;
  };
  export filter {
    reject;
  };
}

### The following actions lead to a crash of bird6:

EEPD[~]# /sbin/bird6 -P /var/run/bird6.pid -c /var/etc/bird6/bird6.conf

Oct 24 14:23:08 EEPD info  bird6   [ 4684]: Started

EEPD[~]# ps | grep bird6
 4930 root  1500 S    /sbin/bird6 -P /var/run/bird6.pid -c 
/var/etc/bird6/bird6.conf

 4932 root  1284 S    grep bird6

EEPD[~]#
EEPD[~]# ip -6 link add vti0 type vti6 local fd00::38 remote fd00::1b 
ikey 2 okey 2;

EEPD[~]# ip -6 link set vti0 up;
EEPD[~]# ifconfig vti0 mtu 1422

Oct 24 14:23:17 EEPD err   bird6   [ 4684]: KIF: Received address 
message for unknown interface 33
Oct 24 14:23:20 EEPD err   bird6   [ 4684]: O_main: Socket error on 
vti0: Invalid argument
Oct 24 14:23:20 EEPD info  kernel: [ 4684]: segfault at 58e ip 
b7eed103 sp bf9acad8 error 4 in libuClibc-1.0.30.so 
[b7ebd000+72000]


EEPD[~]#
EEPD[~]# ps | grep bird6
 4988 root  1284 S    grep bird6
EEPD[~]#

### Further testing

- bird does NOT crash if the contents of bird6.conf and ospfv3.conf 
are placed in a single file without inclusion.
- bird does NOT crash if the call 'ifconfig vti0 mtu 1422' is executed 
before 'ip -6 link set vti0 up'.


Hope this information helps.

Best Regards
Alex





Re: BIRD Error

2017-12-13 Thread Andrew

You may just rename configs. Or you should restart bird with new config.

On 13.12.2017 16:43, k.abda...@q-ab.com wrote:


I tried this but “ reload “  in birdc shell  , Reload config just  for 
current running  config file , there is no option for reconfig / 
Reload different file


Regards

*From:*Bird-users [mailto:bird-users-boun...@network.cz] *On Behalf Of 
*Andrew

*Sent:* Wednesday, December 13, 2017 4:30 PM
*To:* bird-users@network.cz
*Subject:* Re: BIRD Error

... or just to reload config using birdc shell...

On 13.12.2017 16:07, Damien Clabaut wrote:

Hello,

You can add the -d option to launch bird in the foreground with
extra debugging. Then you can just kill it with Ctrl + c.

Regards,

On 2017-12-13 08:57 AM, k.abda...@q-ab.com
<mailto:k.abda...@q-ab.com> wrote:

Thank you  ! , It worked ..

Just another question please  , I’m working on test
environment and   testing different config. files , So do I
need to do this every time I want to change the configuration
file ?

How to change my config files without need to kill the process
and start again .?

Thanks

*From:*Bird-users [mailto:bird-users-boun...@network.cz] *On
Behalf Of *Damien Clabaut
*Sent:* Wednesday, December 13, 2017 3:40 PM
*To:* bird-users@network.cz <mailto:bird-users@network.cz>
*Subject:* Re: BIRD Error

Hello,

Can you confirm with the following command that Bird is indeed
already running ?

# ps ax | grep bird

If so you can try to kill it and launch bird -c myfile.conf.

Regards,

On 2017-12-13 08:31 AM, k.abda...@q-ab.com
<mailto:k.abda...@q-ab.com> wrote:

Hi all ,

It’s my first time  running BIRD instance and when I tried
to run bird –c /myfile.conf /it gave below error :

“bird: I found another BIRD running”

Your help is much appreciated

Thanks




-- 


Damien Clabaut

R vRouter

ovh.qc.ca



-- 


Damien Clabaut

R vRouter

ovh.qc.ca





Re: BIRD Error

2017-12-13 Thread Andrew

... or just to reload config using birdc shell...

On 13.12.2017 16:07, Damien Clabaut wrote:


Hello,

You can add the -d option to launch bird in the foreground with extra 
debugging. Then you can just kill it with Ctrl + c.


Regards,


On 2017-12-13 08:57 AM, k.abda...@q-ab.com wrote:


Thank you  ! , It worked ..

Just another question please  , I’m working on test environment and 
  testing different config. files , So do I need to do this every 
time I want to change the configuration file ?


How to change my config files without need to kill the process and 
start again .?


Thanks

*From:*Bird-users [mailto:bird-users-boun...@network.cz] *On Behalf 
Of *Damien Clabaut

*Sent:* Wednesday, December 13, 2017 3:40 PM
*To:* bird-users@network.cz
*Subject:* Re: BIRD Error

Hello,

Can you confirm with the following command that Bird is indeed 
already running ?


# ps ax | grep bird

If so you can try to kill it and launch bird -c myfile.conf.

Regards,

On 2017-12-13 08:31 AM, k.abda...@q-ab.com 
 wrote:


Hi all ,

It’s my first time  running BIRD instance and when I tried to run
bird –c /myfile.conf /it gave below error :

“bird: I found another BIRD running”

Your help is much appreciated

Thanks



--
Damien Clabaut
R vRouter
ovh.qc.ca


--
Damien Clabaut
R vRouter
ovh.qc.ca





Re: Need help for BIRD installation

2017-12-05 Thread Andrew Latham
Random search for Ansible and BIRD found
https://github.com/Logan2211/ansible-bird

On Tue, Dec 5, 2017 at 11:09 AM, Pardeep Sharma <pardeep.sharma...@gmail.com
> wrote:

> Hi Bird Experts,
>
> We are new in BIRD software installation and want to install in our ubuntu
> server machine. If someone guide us about the installation process of BIRD
> in ubuntu.. would be appreciated.
>
> Please mention the installation link, If you have..
>
> Help would be appreciated@@
>
>
> Thanks
> Pardeep
>



-- 
- Andrew "lathama" Latham -


Re: MTU mismatch with nbr

2017-09-25 Thread Derek Andrew
I think there may be a bug in our Fortigate. It has the ability to disable
the MTU check in IPv4 so I could get IPv4 up, but no joy on IPv6.

Anyway, thank you, I have my answer. The way to solve this is to do the
correct thing.

d

On Sun, Sep 24, 2017 at 10:01 AM, Ondrej Zajicek <santi...@crfreenet.org>
wrote:

> On Thu, Sep 21, 2017 at 11:08:47AM -0600, Derek Andrew wrote:
> > We are running BIRD and BIRD6 to manage our BFD and OSPF relationship on
> > our DNS servers.
> >
> > We moved the DNS servers onto a Fortigate firewall. I was able to get the
> > BIRD daemon running, but BIRD6 is complaining about an MTU mismatch with
> > the neighbour.
> >
> > Is there any way to tell BIRD to ignore the MTU? The OSPF status is
> showing
> > the neighbour is in the Exchange state.
>
> No, checking MTU is required by OSPF standard. Why do you have
> inconsistent MTU? Also, it should be noticed by both IPv4 and IPv6
> versions.
>
> --
> Elen sila lumenn' omentielvo
>
> Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
> OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
> "To err is human -- to blame it on a computer is even more so."
>



-- 
Copyright 2017 Derek Andrew (excluding quotations)

+1 306 966 4808
Communication and Network Services
Information and Communications Technology
Infrastructure Services

*University of Saskatchewan*Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.


MTU mismatch with nbr

2017-09-21 Thread Derek Andrew
We are running BIRD and BIRD6 to manage our BFD and OSPF relationship on
our DNS servers.

We moved the DNS servers onto a Fortigate firewall. I was able to get the
BIRD daemon running, but BIRD6 is complaining about an MTU mismatch with
the neighbour.

Is there any way to tell BIRD to ignore the MTU? The OSPF status is showing
the neighbour is in the Exchange state.

Thanks.

d

-- 
Copyright 2017 Derek Andrew (excluding quotations)

+1 306 966 4808
Communication and Network Services
Information and Communications Technology
Infrastructure Services

*University of Saskatchewan*Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.


Re: Bird redundant routers with same AS on same location and prefix delegation to lower router

2017-09-07 Thread Andrew

Hi.

You should configure R1 and R2 as route reflectors.


On 07.09.2017 14:17, Gelderman, Richard wrote:


I am trying to achieve a redundant routing setup with two routers with 
the same ASN who do prefix delegation to a lower router.


The setup is the following:

AS1000 ISP1    ISP2 AS2000

    |   |

    |       |

AS1    R1  R2 AS1

prefix /22     \   iBGP   /  prefix /22

   \    /

\  /

     \    /

  R3 AS65000

/  \

/    \

 net A      net B

prefix /24     prefix /24

Does anybody has experience with this kind of setup?

Regards,

Richard





Re: Bird 1.6.3 strange hangup

2017-07-04 Thread Andrew

On 04.07.2017 15:59, Ondrej Zajicek wrote:

On Sun, Jul 02, 2017 at 12:27:18PM +0300, Andrew wrote:

Hi all.

Today I saw strange bird hangup, which results in OSPF failure in areas
where router is. BIRD works as OSPF + BGP. All returns to work state after
bird was killed by SIGKILL and started again.

Here's strange logs records:

Jul  2 11:33:46 gw2 bird: I/O loop cycle took 7016 ms for 35 events
Jul  2 11:33:57 gw2 bird: I/O loop cycle took 7208 ms for 58 events
Jul  2 11:34:06 gw2 bird: I/O loop cycle took 5829 ms for 31 events

This seems like related to a problem. Do you have this messages in log
during normal operation? Esp. since 11:36:03, it locked for 38 s,
enough to timeout OSPF neighbors:
No, I grepped logs - there are such errors only when trouble happened, 
for ~30 mins till daemon restart





Jul  2 11:36:03 gw2 bird: I/O loop cycle took 37685 ms for 22 events

Was BIRD at least partially interactive during hangup? Did it run with
100 % CPU load.

I didn't look at top, but LA on server raised when trouble happens.

Also I didn't checked interactivity by birdc; but it seems like BGP 
sessions with this host (according to logs on other servers) flapped 
some times till bird was rebooted.




Jul  2 11:41:49 gw2 bird: filters, line 47: AS path expected
Jul  2 11:41:49 gw2 bird: filters, line 47: AS path expected
Jul  2 11:41:49 gw2 bird: filters, line 47: AS path expected
Jul  2 11:41:49 gw2 bird: filters, line 47: AS path expected
Jul  2 11:41:49 gw2 bird: filters, line 47: AS path expected
Jul  2 11:41:49 gw2 bird: ...


There's filter config where error message happens:

function rt_client(int asn; prefix set nets)
{
 return (net ~ nets &&
 (bgp_path.first = asn || bgp_path ~ [= my_as asn * =]) &&
 bgp_path.last = asn);
}

You could avoid that 'AS path expected' error msg by checking whether the
attribute is defined:

  return (net ~ nets &&
  defined(bgp_path) &&
  (bgp_path.first = asn || bgp_path ~ [= my_as asn * =]) &&
  bgp_path.last = asn);


Ok thanks.


Re: Simple BGP with two operators, one advertisement and prepending

2017-04-25 Thread Andrew

Maybe you forgot to disable rp_filter on uplink ifaces?

And prepend works for incoming traffic, for outgoing - there is 
localpref. So, if outgoing traffic goes via ISP2 and incoming passed via 
ISP1 - it's dropped if rp_filter is enabled.


On 25.04.2017 10:36, Wojciech Bajorek wrote:

Hi,

I have a pretty simple BGP configuration with two ISP and one static 
subnet to advertise.

There is also one prepending configured but I'm not sure if it's working.

The thing is that for some reason when I connect both ISP peers, 
traffic to the advertised ISP#2 networks (with shorter path) stops 
working after a couple of seconds. Tracert shows the last hop as ISP#2 
border router.


Similar configuration on Juniper router works without any problem, so 
I'm afraid that there is an error within my Bird config.

Can you please help me out?

PS. Without prepending situation is exactly the same.

OS: Debian 8
Bird: 1.4.5-1+deb8u1

router id 90.90.90.1;

protocol kernel {
persist;
scan time 15;
import all;
export all;
}

protocol device {
scan time 10;
}

filter bgp_isp1_out {
if net = 90.90.90.0/24  then
{
accept;
}
else reject;
}

filter bgp_isp2_out {
if net = 90.90.90.0/24  then
{
bgp_path.prepend(12345);
bgp_path.prepend(12345);
accept;
}
else reject;
}

protocol bgp bgp_isp1 {
import all;
export filter bgp_isp1_out;

local as 12345;
neighbor 2.3.4.5 as 2345;
}

protocol bgp bgp_isp2 {
import all;
export filter bgp_isp2_out;

local as 12345;
neighbor 3.4.5.6 as 3456;
}


Thank you.

Regards,
Wojciech Bajorek





Re: Version 1.6.0

2016-04-30 Thread Andrew
It'll be good to run bird under valgrind for testing - I catched some 
bugs in 1.4.x in that way.


30.04.2016 14:08, Vladimir Lettiev пишет:

On Fri, Apr 29, 2016 at 06:35:33PM +0200, Ondrej Filip wrote:

Dear Bird users,
the long expected version is out:

Version 1.6.0 (2016-04-29)
   o Major RIP protocol redesign

Looks like the same issue with -D_FORTIFY_SOURCE=2 raised again

 http://bird.network.cz/pipermail/bird-users/2015-October/009965.html

In function 'strncpy',
 inlined from 'rip_fill_authentication.isra.9' at 
../../../proto/rip/packets.c:215:5:
/usr/include/bits/string3.h:126:10: error: call to __builtin___strncpy_chk will 
always overflow destination buffer
return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
   ^
make[1]: *** [packets.o] Error 1






Re: BGP session between quagga and bird

2016-02-15 Thread Andrew

Hi. I have BIRD route server + Quagga BGP peer to it. All works perfectly.

16.02.2016 00:00, Mike Santos Farias пишет:

How to establish BGP session between Bird and Quagga?
I have two virtual machines created on FreeBSD. With a route server 
Quagga and another with Bird. But Bird did not establece connection 
with Quagga.
I managed to establish session with a Mikrotik router but I can not 
with the route server Quagga. Does anyone know say what possible reason?


--
Att,
Mike Santos Farias


Contato: (79) 9 8851-7565
(79) 9 8821-3108 (whatsapp)




'Aggregate' pipe protocol - is it planned?

2015-11-10 Thread Andrew

Hi all.

IMHO it'll be good to have 'aggregate' protocol (like 'pipe' one) for 
route count decreasing in system routing table (which results in routing 
performance increase)) and for using bird server as routing server for 
hardware routers/L3 switches which usually have not too big TCAM.


Is such protocol planned for future?


Re: multiple routing table in OSPF

2015-07-23 Thread Andrew

Hi.

Make 2 OSPF instances (don't forget to set different router ID); assign 
them to different BIRD routing tables. How you'll sync BIRD routing 
table with kernel one - you should specify via 'kernel' protocol.


23.07.2015 11:44, zeinab Farhadi пишет:

Hello,
My question is how do you execute multiple routing table in OSPF 
protocol in BIRD (with Ubuntu 15.04)?

Do iproute2 in multiple routing tables are used?
would you mind please explain it in the scenario, I really need your 
favor. Please answer me,

Thank you in advance,
Best Regards,




Re: OSPF and mass route deletion

2015-07-14 Thread Andrew

I mean host routes mass removing.

Maybe OSPF really isn't best choice for this. Earlier, with quagga, 
there was no troubles with it. I didn't look deeply to RFC, so I thouht 
that single LSA can carry multiple prefixes. Possibly quagga just sends 
packets slower...


14.07.2015 17:47, Olivier Benghozi пишет:

OSPF doesn't delete routes, it sends LSAs.
It seems that you are redistributing a lot of single IP addresses in OSPF (as 
external routes). So there's one LSA type 5 for each single redistributed /32.

OSPF is not the proper choice for this usecase, and it's not a Quagga or BIRD 
issue.
BGP is the protocol to use for such cases. Many routes, few messages, 
scalability.



Le 14 juil. 2015 à 09:20, Andrew ni...@seti.kr.ua a écrit :

When routes are deleted (for ex., terminating a lot of PPP tunnels for some 
reason in same time), it seems like each removed route is sent into separate 
OSPF packet that causes troubles with OSPF in some cases (for ex., there's 
troubles with old quagga).

Is there a possibility to add some rate-limiting (for ex., limit to 10 messages 
per second), and aggregate separate 'route deleted' messages to one packet?






Re: Bird 1.5.0: protocol 'direct' looses routes

2015-06-16 Thread Andrew

16.06.2015 22:40, Ondrej Zajicek пишет:

On Tue, Jun 16, 2015 at 03:20:25PM +0300, Andrew wrote:

Thanks for the example, it is very descriptive. The problem here is that
'direct' protocol is a stateless translation of address announcements to
route announcements, but routing tables do not consider interface as part
of route key, therefore only one route for a prefix is remembered and
I will write a patch for this.

Yes, it'll be great.

You could try attached patch


Thanks, it works.

Also, with 1.5.0 I have long OSPF initialization (near 2 minutes - 1.4.5 
and quagga starts much faster). I have OSPF debug log; should I attach 
it to mail (does mailing list supports attaches), or should I send it to 
your personal mail?


Bird 1.5.0: protocol 'direct' looses routes

2015-06-13 Thread Andrew

Hi all.

I'm testing bird 1.5.0 on PPPoE BRAS, and today noticed that sometimes 
it looses routes. For ex., today it looses near 5 networks of 103 total 
(before restart - it has 98 routes, after - 103)


Possibly this may be related with tunnel session hangup - when user 
reconnects with same IP and then old session is dropped, bird may loose 
this route while route is present in system. But I'm not sure about this.


Re: OSPFv3 help

2015-01-26 Thread Andrew

Device proto is enabled? OSPF export/import filters?

26.01.2015 22:01, Andre Nathan пишет:

Hello

I'm trying to setup a simple lab test for OSPFv3 with bird.

The configuration is as follows:


   eth1  eth0eth0  eth1
net 1---|router 1||router 2|--net 2

Both routers have on eth0 an fe80 (link-local) address but also an
fd77/16 address. The configuration works but the routers export their
link-local address as the gateway for their respective networks. For
example:

bird show route
fd77:a:b:c::/80 via fe80::21e:67ff:fe7b:31c9 on eth1

How do I override this behavior and export the fd77 address as the
gateway address?

Thanks,
Andre





Re: Multiple OSPF instances

2014-12-29 Thread Andrew

27.12.2014 17:07, Alexander V. Chernikov пишет:

On 27 Dec 2014, at 04:50, Andrew ni...@seti.kr.ua wrote:

Hi all.

I tried to run multiple OSPF instances in BIRD for VRF, other clients - quagga 
machines that listens both vlans and see each other.

BIRD sends packets from xx.xx.132.7 (which has mask /32 and is set on lo) to 
vlan3, but saw neighbors; other neighbors don't saw bird ('cause it sends 
packets from wrong ip)

There is no easy way to get “primary” address for interface, so you need to 
specify it explicitly for interface with multiple addresses:

protocol device { primary “vlan3” 10.255.192.1; }

There is single address on vlan3 interface. xx.xx.132.7 is on loopback 
interface.


Re: Multiple OSPF instances

2014-12-29 Thread Andrew

29.12.2014 18:30, Ondrej Zajicek пишет:

On Sat, Dec 27, 2014 at 03:50:07AM +0200, Andrew wrote:

Hi all.

I tried to run multiple OSPF instances in BIRD for VRF, other clients -
quagga machines that listens both vlans and see each other.

BIRD sends packets from xx.xx.132.7 (which has mask /32 and is set on lo) to
vlan3, but saw neighbors; other neighbors don't saw bird ('cause it sends
packets from wrong ip)

What's wrong with brird/config?

Config seems OK (although having 'networks' block in OSPF areas is
useless for OSPF protocols with only one area). Even BIRD state seems OK
(show ospf interface returns proper IP address entry).

What BIRD version are you using, on which OS?

Is it the Linux/uclibc you discussed before?
Yes, it is (it's LEAF distro, 5.1.x branch). After forcing primary 
address in config it starts to work.


What is returned by 'birdc show interfaces', 'ip addr list' and 'ip route list'?


'birdc show ifaces':
bird show interfaces
lo up (index=1)
MultiAccess AdminUp LinkUp Loopback Ignored MTU=65536
10.255.0.12/32 (Primary, scope site)
x.x.132.7/32 (Unselected, scope univ)
127.0.0.1/8 (Unselected, scope host)
x.x.x.x/32 (Unselected, scope univ)
dummy0 DOWN (index=2)
MultiAccess Broadcast Multicast AdminDown LinkDown MTU=1500
eth0 DOWN (index=3)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
eth1 DOWN (index=4)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
bond0 DOWN (index=5)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
bond1 DOWN (index=6)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
ifb0 DOWN (index=7)
MultiAccess Broadcast Multicast AdminDown LinkDown MTU=1500
ifb1 DOWN (index=8)
MultiAccess Broadcast Multicast AdminDown LinkDown MTU=1500
eth2 DOWN (index=9)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
eth3 DOWN (index=10)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
vlan2 up (index=11)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
192.168.255.190/27 (Primary, scope site)
vlan up (index=12)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
x.x.x.x/30 (Primary, opposite x.x.x.x, scope univ)
vlan2662 up (index=13)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
x.x.x.x/30 (Primary, opposite x.x.x.x, scope univ)
vlan3 up (index=14)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
10.255.192.202/24 (Primary, scope site)


# ip addr list:

1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN 
group default

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet x.x.132.7/32 scope global lo:nat
   valid_lft forever preferred_lft forever
inet 10.255.0.12/32 scope global lo:ns2
   valid_lft forever preferred_lft forever
inet x.x.x.x/32 scope global lo:pub
   valid_lft forever preferred_lft forever
2: dummy0: BROADCAST,NOARP mtu 1500 qdisc noop state DOWN group default
link/ether 76:b1:a4:9d:b1:22 brd ff:ff:ff:ff:ff:ff
3: eth0: BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP mtu 1500 qdisc mq 
master bond0 state UP group default qlen 1000

link/ether 00:1b:21:51:2f:2c brd ff:ff:ff:ff:ff:ff
4: eth1: BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP mtu 1500 qdisc mq 
master bond0 state UP group default qlen 1000

link/ether 00:1b:21:51:2f:2c brd ff:ff:ff:ff:ff:ff
5: bond0: BROADCAST,MULTICAST,MASTER,UP,LOWER_UP mtu 1500 qdisc 
noqueue state UP group default

link/ether 00:1b:21:51:2f:2c brd ff:ff:ff:ff:ff:ff
6: bond1: BROADCAST,MULTICAST,MASTER,UP,LOWER_UP mtu 1500 qdisc 
noqueue state UP group default

link/ether 00:16:31:fb:8d:a3 brd ff:ff:ff:ff:ff:ff
7: ifb0: BROADCAST,NOARP mtu 1500 qdisc noop state DOWN group default 
qlen 32

link/ether 5a:f6:3a:e5:4c:dc brd ff:ff:ff:ff:ff:ff
8: ifb1: BROADCAST,NOARP mtu 1500 qdisc noop state DOWN group default 
qlen 32

link/ether fe:05:50:ad:d1:06 brd ff:ff:ff:ff:ff:ff
9: eth2: BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP mtu 1500 qdisc mq 
master bond1 state UP group default qlen 1000

link/ether 00:16:31:fb:8d:a3 brd ff:ff:ff:ff:ff:ff
10: eth3: BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP mtu 1500 qdisc mq 
master bond1 state UP group default qlen 1000

link/ether 00:16:31:fb:8d:a3 brd ff:ff:ff:ff:ff:ff
11: vlan2@bond0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc 
noqueue state UP group default

link/ether 00:1b:21:51:2f:2d brd ff:ff:ff:ff:ff:ff
inet 192.168.255.190/27 brd 192.168.255.191 scope global vlan2
   valid_lft forever preferred_lft forever
12: vlan@bond1: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc 
noqueue state UP group default

link/ether 00:16:31:fb:8d:a3 brd ff:ff:ff:ff:ff:ff
inet x.x.x.x/30 brd 88.81.242.131 scope global vlan
   valid_lft forever preferred_lft forever
13: vlan@bond1: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc 
noqueue state UP group default

link/ether 00

Re: Bird 1.4.5, uClibc 0.9.33.2 - crash at startup

2014-12-19 Thread Andrew

18.12.2014 17:11, Ondrej Zajicek пишет:

On Thu, Dec 18, 2014 at 12:23:42PM +0200, Andrew wrote:

01.12.2014 13:16, Ondrej Zajicek пишет:

On Mon, Dec 01, 2014 at 03:17:22AM +0200, Andrew wrote:

Hi all.

I tried to run bird as BGP router (2x IX views, near 15K prefixes each) with
OSPF on it. And I've got a segfault after some seconds from startup (only
static routes were appeared in table).

Hi

Thanks for the bugreport. Could you try whether it crashes when compiled
with --disable-pthreads ?


Hi.

Here is valgrind log for bird:

# valgrind --tool=memcheck --track-origins=yes ./bird -d
==12995== Memcheck, a memory error detector
==12995== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==12995== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==12995== Command: ./bird -d
==12995==
==12995== Syscall param socketcall.sendto(msg) points to uninitialised
byte(s)

...

==12995== Syscall param sendmsg(msg.msg_name) points to uninitialised
byte(s)

...

==12995== Invalid write of size 1

It seems like there's a some bugs in bird...

Hi

I prepared three patches, could you try to build and test BIRD with these
(each patch independently)?

bird-test1.diff - Should fix 'uninitialized' Valgrind warning, although
  i don't think this would cause any problem.

bird-test2.diff - Adds some debug log messages ('EA SIZE'/'EA TSIZ'),
  could you send me these outputs in your settings?

bird-test3.diff - This may fix the 'invalid write' problem that may be
  responsible for the crash the crash


Also i would like to know the value of CPU_STRUCT_ALIGN constant in your
setting, it should be defined in obj/sysdep/autoconf.h, could you report
it?



Here is log for patched via 2nd patch:

Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 40 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 104 112
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 32 32
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 96 96
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 40 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 104 112
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 48 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 144 144
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 48 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 144 144
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 48 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 144 144
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 48 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 144 144
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 48 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 144 144
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 48 48
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 144 144
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 56 64
Dec 19 12:21:33 gw2 bird-p2: EA TSIZ: 168 176
Dec 19 12:21:33 gw2 bird-p2: EA SIZE: 56 64

Patches 1 and 3 fixed crash and valgrind warnings.