Present Location: News >> Blog >> BGP Paths

Blog

> BGP Paths
Posted by prox, from Charlotte, on January 05, 2008 at 17:16 local (server) time

So, I've been reconfiguring my network over the past few days, starting with IPv6.  I thought I was almost done, but then realized that Quagga seems to be picking non-optimal paths via BGP:

*  2001:4830:122d:9::/64  2001:4830:122d:ffff::29  0  100  0 (65300) i
*                         2001:4830:122d:4::a      0  100  0 (65304 65303 65300) i
*>                        2001:4830:122d:ffff::1   0  100  0 (65303 65300) i
*                         2001:4830:122d:ffff::12  0  100  0 (65302 65303 65300) i

starfire_bgpd# show ipv6 bgp 2001:4830:122d:9::/64
BGP routing table entry for 2001:4830:122d:9::/64
Paths: (4 available, best #3, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  2001:4830:122d:4::a 2001:4830:122d:4::11 2001:4830:122d:19::2 \
  2001:4830:122d:ffff::12 2001:4830:122d:ffff::29
  Local
    2001:4830:122d:ffff::29 from 2001:4830:122d:ffff::29 (10.3.4.10)
    (fe80::a03:fe04)
      Origin IGP, metric 0, localpref 100, valid, confed-external
      Last update: Sat Jan  5 13:56:49 2008
                                           
  Local
    2001:4830:122d:4::a from 2001:4830:122d:4::a (10.3.4.6)
      Origin IGP, metric 0, localpref 100, valid, confed-external
      Last update: Sat Jan  5 13:56:47 2008
                                           
  Local
    2001:4830:122d:ffff::1 from 2001:4830:122d:ffff::1 (10.3.4.2)
    (fe80::a03:fe14)
      Origin IGP, metric 0, localpref 100, valid, confed-external, best
      Last update: Sat Jan  5 13:56:41 2008
                                           
  Local
    2001:4830:122d:ffff::12 from 2001:4830:122d:ffff::12 (10.3.4.3)
    (fe80::a03:fe17)
      Origin IGP, metric 0, localpref 100, valid, confed-external
      Last update: Sat Jan  5 13:56:41 2008

Why is it picking the route originated from 10.3.4.2 (nonce)?  I think it should pick the one from 10.3.4.10 (scimitar), since the AS_PATH attribute is the shortest.  Cisco's BGP path selection algorithm checks AS_PATH on the 4th step, after 1) weight, 2) LOCAL_PREF, and 3) prefer paths not sourced by aggregate-address.  Juniper's BGP path selection algorithm (page 277) checks AS_PATH on the 3rd step, after 1) next-hop reachability and 2) LOCAL_PREF.

I don't want another Quagga bug.  I've encountered a couple so far :-(

Update: Whoops, forgot that an AS_PATH with confederations act a little differently.  I set bgp bestpath as-path confed, which seems to be working.

> Add Comment

New comments are currently disabled for this entry.