mirror_frr/tests
Donald Sharp 5e242b0dd3 cluster-id length equality for multipath
A fat tree topology running IBGP gets into two issues with anycast address
routing. Consider the following topology:

        R9   R10
          x x
  R3   R4     R7   R8
     x           x
  R1   R2     R5   R6
  |    |      |    |
 10/8 10/8  10/8   S

Let's remind ourselves of BGP decision process steps:

1. Highest Local Preference
2. Shortest AS Path Length
3. Lowest Origin Type
4. Lowest MED (Multi-Exit Discriminator)
5. Prefer External to Internal
6. Closest Egress (Lowest IGP Distance)
7. Tie Breaking (Lowest-Router-ID)
8. Tie Breaking (Lowest-cluster-list length)
9. Tie Breaking (Lowest-neighbor-address)

Without any policies, steps 1-6 will almost always evaluate identically for
all paths received on any router in the above topology. Let's assume that
the router-ids follow the following inequality: R1 < R2 < R5 < R6. Owing to
the 7th step above, all routers will now choose R1's path as the best. This
is undesirable. As an example, traffic from S to 10/8 will follow the path
S -> R6 -> R7 -> R9 -> R4 -> R2 -> 10/8 instead of S -> R6 -> R7 -> R5 -> 10/8.
Furthermore, once R7 (& R8) chooses R1's path as the best, it would withdraw
its path learned through (R5, R6) from (R9, R10). This leads to inefficient
load balancing - e.g. R9 can't do ECMP across all available egresses -
(R1, R2, R5).

The patch addresses these issues by noting that that cluster list is always
carried along with the routes and its length is a good indicator of IBGP
hops. It thus makes sense to compare that as an extension to metric after
step 6. That automatically ensures correct multipath computation.

Unfortunately a partial deployment of this in a generic topology (note:
fat-tree/clos topologies work fine) may lead to potential loops. It needs
to be looked into.

Signed-off-by: Pradosh Mohapatra <pmohapat@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
2015-05-19 17:40:31 -07:00
..
bgpd.tests tests: DejaGNU bgpd 2013-04-14 16:01:11 +02:00
config tests: DejaGNU libzebra 2013-04-14 16:01:19 +02:00
lib tests: DejaGNU libzebra 2013-04-14 16:01:19 +02:00
libzebra.tests tests: Add tests for timers 2014-04-22 21:15:11 +02:00
.gitignore tests: Add tests for timers 2014-04-22 21:15:11 +02:00
aspath_test.c tests: update & extend AS_PATH tests 2013-02-01 17:55:04 +01:00
bgp_capability_test.c tests: BGP unit tests to set BGP_OPT_NO_LISTEN so they can run 2012-06-19 13:40:22 +01:00
bgp_mp_attr_test.c tests/bgpd: don't hardcode error number (fix f57000c) 2014-08-18 01:49:17 +02:00
bgp_mpath_test.c cluster-id length equality for multipath 2015-05-19 17:40:31 -07:00
ecommunity_test.c tests: Fix some compile errors and warnings 2012-05-02 11:02:10 +01:00
global-conf.exp tests: add DejaGNU framework 2013-04-14 16:01:05 +02:00
heavy-thread.c 2004-05-25 Paul Jakma <paul@dishone.st> 2005-04-25 16:42:24 +00:00
heavy-wq.c delete CVS keywords 2011-09-27 21:34:26 +04:00
heavy.c 2004-05-25 Paul Jakma <paul@dishone.st> 2005-04-25 16:42:24 +00:00
main.c *: nuke ^L (page feed) 2014-06-04 06:58:02 +02:00
Makefile.am tests: Add tests for timers 2014-04-22 21:15:11 +02:00
prng.c tests: add a test program for lib/command.c 2014-04-01 17:38:29 +02:00
prng.h tests: add a test program for lib/command.c 2014-04-01 17:38:29 +02:00
table_test.c lib/table: add route_table_get_next() and iterator 2012-09-26 21:50:48 +02:00
test-buffer.c 2004-09-06 Paul Jakma <paul@dishone.st> 2005-09-06 23:08:01 +00:00
test-checksum.c *: nuke ^L (page feed) 2014-06-04 06:58:02 +02:00
test-commands.c lib/command.c: rewrite command matching/parsing 2014-04-01 20:21:41 +02:00
test-memory.c 2004-05-13 Paul Jakma <paul@dishone.st> 2005-04-13 03:31:35 +00:00
test-nexthop-iter.c zebra: rework recursive route resolution 2013-09-19 18:04:40 +02:00
test-privs.c *: nuke ^L (page feed) 2014-06-04 06:58:02 +02:00
test-segv.c lib: fix backtraces broken by 837d16c... 2014-03-21 06:28:48 +01:00
test-sig.c tests: fix missing array_size() include 2012-11-03 09:13:23 -07:00
test-stream.c [tests] Add small unit test for the new stream functions 2006-01-10 14:49:04 +00:00
test-timer-correctness.c tests: Add tests for timers 2014-04-22 21:15:11 +02:00
test-timer-performance.c tests: Add tests for timers 2014-04-22 21:15:11 +02:00
testcommands.in ospfd/ospf_vty.c: use keyword cmd style 2014-04-01 20:21:42 +02:00
testcommands.refout ospfd/ospf_vty.c: use keyword cmd style 2014-04-01 20:21:42 +02:00