Re: bgpctl sh rib mem

2013-09-28 Thread Claudio Jeker
On Sun, Sep 22, 2013 at 01:37:46PM +0200, Denis Fondras wrote:
 Hello,
 
 I have an OpenBGPd router with OpenBSD5.3, peering with two remote
 routers (one for v4 and one for v6). I expect my peers to send me only
 valid routes.
 
 Is there a way to show every prefixes sent by a peer, even invalid ones ?
 
 I know of bgpctl show rib but I'd like to understand what this line
 means : 27808 prefix entries using 869K of memory
 
 For me it looks like half of the prefixes I receive are invalid (in
 memory bu not in RIB) and I'd like to understand why.
 
 Thank you in advance,
 Denis
 
 
 $ bgpctl sh rib mem
 RDE memory statistics
 15 IPv4 unicast network entries using 360B of memory
  13889 IPv6 unicast network entries using 488K of memory
  27807 rib entries using 869K of memory
  27808 prefix entries using 869K of memory
   8364 BGP path attribute entries using 621K of memory
   8018 BGP AS-PATH attribute entries using 265K of memory,
and holding 8364 references
   1013 BGP attributes entries using 23.7K of memory
and holding 1534 references
   1012 BGP attributes using 7.9K of memory
 RIB using 3.1M of memory
 
 $ bgpctl show rib inet6 | wc -l
 13902
 
 $ bgpctl sho rib inet | wc -l
 19

You most probably run with softreconf in and therefore there is to prefix
entries for each path.
 
bgpctl show tables - to show the tables which can be used

bgpctl show rib in - to show the Adj-Rib-In
bgpctl show rib table XXX - show the table XXX

Invalid pathes are shown in either bgpctl show rib or in bgpctl show rib in

-- 
:wq Claudio



Re: bgpctl sh rib mem

2013-09-28 Thread Denis Fondras
Hi Claudio,

 You most probably run with softreconf in and therefore there is to prefix
 entries for each path.
  

This is it, disabling soft-reconfiguration lowers memory usage.
Thank you very much for this accurate answer :)

Denis



bgpctl sh rib mem

2013-09-22 Thread Denis Fondras
Hello,

I have an OpenBGPd router with OpenBSD5.3, peering with two remote
routers (one for v4 and one for v6). I expect my peers to send me only
valid routes.

Is there a way to show every prefixes sent by a peer, even invalid ones ?

I know of bgpctl show rib but I'd like to understand what this line
means : 27808 prefix entries using 869K of memory

For me it looks like half of the prefixes I receive are invalid (in
memory bu not in RIB) and I'd like to understand why.

Thank you in advance,
Denis


$ bgpctl sh rib mem
RDE memory statistics
15 IPv4 unicast network entries using 360B of memory
 13889 IPv6 unicast network entries using 488K of memory
 27807 rib entries using 869K of memory
 27808 prefix entries using 869K of memory
  8364 BGP path attribute entries using 621K of memory
  8018 BGP AS-PATH attribute entries using 265K of memory,
   and holding 8364 references
  1013 BGP attributes entries using 23.7K of memory
   and holding 1534 references
  1012 BGP attributes using 7.9K of memory
RIB using 3.1M of memory

$ bgpctl show rib inet6 | wc -l
13902

$ bgpctl sho rib inet | wc -l
19



Re: bgpctl sh rib mem

2013-09-22 Thread Stuart Henderson
On 2013-09-22, Denis Fondras open...@ledeuns.net wrote:
 Hello,

 I have an OpenBGPd router with OpenBSD5.3, peering with two remote
 routers (one for v4 and one for v6). I expect my peers to send me only
 valid routes.

 Is there a way to show every prefixes sent by a peer, even invalid ones ?

IIRC there isn't..

 I know of bgpctl show rib but I'd like to understand what this line
 means : 27808 prefix entries using 869K of memory

 For me it looks like half of the prefixes I receive are invalid (in
 memory bu not in RIB) and I'd like to understand why.

The most likely reasons are invalid nexthops (bgpctl sh nex) or
that the paths are dropped by your filter rules.



Re: bgpctl sh rib mem

2013-09-22 Thread Denis Fondras
Thank you very much Stuart.

 
 The most likely reasons are invalid nexthops (bgpctl sh nex) or
 that the paths are dropped by your filter rules.
 

I have no explicit filter rules in bgpd.conf and bgpctl sh nex shows
only valid nexthops.

I restarted the daemon but no changes in memory usage.

Denis



Re: bgpctl sh rib mem

2013-09-22 Thread Stuart Henderson
On 2013-09-22, Denis Fondras open...@ledeuns.net wrote:
 Thank you very much Stuart.

 
 The most likely reasons are invalid nexthops (bgpctl sh nex) or
 that the paths are dropped by your filter rules.
 

 I have no explicit filter rules in bgpd.conf and bgpctl sh nex shows
 only valid nexthops.

None at all? You should at least be blocking the private-use networks
listed in RFC5735, and prefixes longer than /24 etc.

 I restarted the daemon but no changes in memory usage.

It might be easier to help if we could see (sanitized, if necessary)
bgpd.conf.