bgpd.conf (zebra) -> bgpd.conf (OpenBGPD)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bgpd.conf (zebra) -> bgpd.conf (OpenBGPD)

Bogdan Hojda
Hello list,

I'm not sure if this the right place to post this question, but I
couldn't find any other better list.

My problem is that I recently changed my OS on a i386 router from Linux
to OpenBSD (3.8). On that router I run Quagga and now I want to switch
to OpenBGPD, but I have problems "translating" zebra's bgpd.conf to
OpenBGPD.

The zebra's /etc/zebra/bgpd.conf is:

>!
>! Zebra configuration saved from vty
>!   2006/01/25 05:12:14
>!
>hostname router
>password secret
>enable password secret
>!
>router bgp xxx66
> bgp router-id 82.xxx.xxx.xxx
> network 86.aaa.bbb.ccc/21
> redistribute kernel
> redistribute static
> redistribute connected
> neighbor 82.xxx.xxx.yyy remote-as ab08
> neighbor 82.xxx.xxx.yyy description MyISP
> neighbor 82.xxx.xxx.yyy weight 100
> neighbor 82.xxx.xxx.yyy route-map rm-myisp-out out
>!
>route-map rm-myisp-out permit 100
> set local-preference 110
> set community ab08:1000 ab08:2000
> set ip next-hop peer-address
>!
>line vty
>!

I tried the following configuration in OpenBGP's /etc/bgpd.conf, with no
success:

># macros
>MyISP="82.xxx.xxx.yyy"
>
># global configuration
>AS xxx66
>router-id 82.xxx.xxx.xxx
>listen on 82.xxx.xxx.xxx
>log updates
>network 86.aaa.bbb.ccc/21
>
># neighbors and peers
>neighbor $MyISP {
> remote-as ab08
> descr MyISP
> holdtime 180
> holdtime min 3
> announce self
> set localpref 110
> set community ab08:1000
> set community ab08:2000
>}
>
># filter out prefixes longer than 24 or shorter than 8 bits
>deny from any
>allow from any prefixlen 8 - 24
>
># do not accept a default route
>deny from any prefix 0.0.0.0/0
>
># filter bogus networks
>deny from any prefix 10.0.0.0/8 prefixlen >= 8
>[...]

With this configuration (OpenBGPD) it seems that I receive only routes
within MyISP AS (ab08); with zebra (running on the very same machine)
everything runs smoothly.

Is there anything I should try, or I should use good-old zebra (quagga)?

Thanks,

--
Bogdan Hojda <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: bgpd.conf (zebra) -> bgpd.conf (OpenBGPD)

Henning Brauer
* Bogdan Hojda <[hidden email]> [2006-01-27 19:59]:
> I tried the following configuration in OpenBGP's /etc/bgpd.conf, with no
> success:
>
> ># macros
> >MyISP="82.xxx.xxx.yyy"
> >
> ># global configuration
> >AS xxx66

> >router-id 82.xxx.xxx.xxx

you probably don't want this, bgpd picks one itself. you certainly
don't need it, it shouldn't make a differnce tho.

> >listen on 82.xxx.xxx.xxx

this might be your problem - just leave it out.


> >log updates

whilst fine for debugging, I doubt you want this in the long run,
syslog will likely chew more CPU logging than bgpd actually doing its
job ;)

> >network 86.aaa.bbb.ccc/21
> >
> ># neighbors and peers
> >neighbor $MyISP {
> > remote-as ab08
> > descr MyISP

> > holdtime 180
> > holdtime min 3

these two are defaults anyway, I'd leave them out.

> > announce self
> > set localpref 110
> > set community ab08:1000
> > set community ab08:2000
> >}
> >
> ># filter out prefixes longer than 24 or shorter than 8 bits
> >deny from any
> >allow from any prefixlen 8 - 24
> >
> ># do not accept a default route
> >deny from any prefix 0.0.0.0/0
> >
> ># filter bogus networks
> >deny from any prefix 10.0.0.0/8 prefixlen >= 8
> >[...]

you left anything out here?
you either have an error in the filters or, well, not obvious at a
first glance.

> With this configuration (OpenBGPD) it seems that I receive only routes
> within MyISP AS (ab08); with zebra (running on the very same machine)
> everything runs smoothly.

that points to a problem with the filters, or your ISP is not adding
its own AS leftmost to the path. in the latter case, try
  enforce neighbor-as no
in the neighbor spec. That would be s slightly strange setup tho unless
you talk to a route-server at an IX or the like.

> Is there anything I should try,

ya

> or I should use good-old zebra (quagga)?

nah :)

--
BS Web Services, http://www.bsws.de/
OpenBSD-based Webhosting, Mail Services, Managed Servers, ...
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)

Reply | Threaded
Open this post in threaded view
|

Re: bgpd.conf (zebra) -> bgpd.conf (OpenBGPD)

Claudio Jeker
In reply to this post by Bogdan Hojda
On Fri, Jan 27, 2006 at 07:49:07PM +0200, Bogdan Hojda wrote:

> Hello list,
>
> I'm not sure if this the right place to post this question, but I
> couldn't find any other better list.
>
> My problem is that I recently changed my OS on a i386 router from Linux
> to OpenBSD (3.8). On that router I run Quagga and now I want to switch
> to OpenBGPD, but I have problems "translating" zebra's bgpd.conf to
> OpenBGPD.
>
> The zebra's /etc/zebra/bgpd.conf is:
>
> >!
> >! Zebra configuration saved from vty
> >!   2006/01/25 05:12:14
> >!
> >hostname router
> >password secret
> >enable password secret

No longer needed in bgpd.

> >!
> >router bgp xxx66
> > bgp router-id 82.xxx.xxx.xxx

In normal cases you don't need to set the router-id.

> > network 86.aaa.bbb.ccc/21
> > redistribute kernel
> > redistribute static
> > redistribute connected

Do you realy want to redistribute everything. That is super evil.

> > neighbor 82.xxx.xxx.yyy remote-as ab08
> > neighbor 82.xxx.xxx.yyy description MyISP
> > neighbor 82.xxx.xxx.yyy weight 100
> > neighbor 82.xxx.xxx.yyy route-map rm-myisp-out out
> >!
> >route-map rm-myisp-out permit 100
> > set local-preference 110

Setting local-pref in an outgoing route-map to a EBGP peer is a NOP.
Local-pref is a non transitive attribute.

> > set community ab08:1000 ab08:2000
> > set ip next-hop peer-address
> >!
> >line vty
> >!
>
> I tried the following configuration in OpenBGP's /etc/bgpd.conf, with no
> success:
>
> ># macros
> >MyISP="82.xxx.xxx.yyy"
> >
> ># global configuration
> >AS xxx66
> >router-id 82.xxx.xxx.xxx
> >listen on 82.xxx.xxx.xxx
> >log updates
> >network 86.aaa.bbb.ccc/21
> >

Till here looks fine. But as Henning said router-id and listen on are
superfluous

> ># neighbors and peers
> >neighbor $MyISP {
> > remote-as ab08
> > descr MyISP
> > holdtime 180
> > holdtime min 3
> > announce self
> > set localpref 110
> > set community ab08:1000
> > set community ab08:2000
> >}
> >

This is not doing what you think it should. set community ab08:1000 works
on incomming announcements and not on stuff you announce.

So either you do a
network 86.aaa.bbb.ccc/21 set { community ab08:1000 community ab08:2000 }

or use a filter

match to $MyISP set { community ab08:1000 community ab08:2000 }

> ># filter out prefixes longer than 24 or shorter than 8 bits
> >deny from any
> >allow from any prefixlen 8 - 24
> >
> ># do not accept a default route
> >deny from any prefix 0.0.0.0/0
> >
> ># filter bogus networks
> >deny from any prefix 10.0.0.0/8 prefixlen >= 8
> >[...]
>
> With this configuration (OpenBGPD) it seems that I receive only routes
> within MyISP AS (ab08); with zebra (running on the very same machine)
> everything runs smoothly.
>

??? That means you only get a handful of routes instead of the 175k full
view? Perhaps including part of a bgpctl show rib would help.

> Is there anything I should try, or I should use good-old zebra (quagga)?

nope.

--
:wq Claudio