Skip to content

Commit

Permalink
tests: Add tests for BGP link-bandwidth and weighted ECMP
Browse files Browse the repository at this point in the history
Implement tests to verify BGP link-bandwidth and weighted ECMP
functionality. These tests validate one of the primary use cases for
weighted ECMP (a.k.a. Unequal cost multipath) using BGP link-bandwidth:
https://tools.ietf.org/html/draft-mohanty-bess-ebgp-dmz

The included tests are:
Test #1: Test BGP link-bandwidth advertisement based on number of multipaths
Test #2: Test cumulative link-bandwidth propagation
Test #3: Test weighted ECMP - multipath with next hop weights
Test #4: Test weighted ECMP rebalancing upon change (link flap)
Test #5: Test weighted ECMP for a second anycast IP
Test #6: Test paths with and without link-bandwidth - receiver should resort to regular ECMP
Test #7: Test different options for processing link-bandwidth on the receiver

Signed-off-by: Vivek Venkatraman <[email protected]>
  • Loading branch information
vivek-cumulus committed Mar 31, 2020
1 parent feca4f1 commit 000022d
Show file tree
Hide file tree
Showing 45 changed files with 1,326 additions and 0 deletions.
Empty file.
19 changes: 19 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/bgp-route-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"prefix":"198.10.1.1\/32",
"paths":[
{
"valid":true,
"bestpath":{
"overall":true
},
"extendedCommunity":{
"string":"LB:65301:125000 (1.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.2"
}
]
}
]
}
32 changes: 32 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/bgp-route-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"prefix":"198.10.1.1\/32",
"paths":[
{
"valid":true,
"multipath":true,
"extendedCommunity":{
"string":"LB:65303:125000 (1.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.6"
}
]
},
{
"valid":true,
"multipath":true,
"bestpath":{
"overall":true
},
"extendedCommunity":{
"string":"LB:65201:375000 (3.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.2"
}
]
}
]
}
32 changes: 32 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/bgp-route-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"prefix":"198.10.1.1\/32",
"paths":[
{
"valid":true,
"multipath":true,
"extendedCommunity":{
"string":"LB:65303:125000 (1.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.6"
}
]
},
{
"valid":true,
"multipath":true,
"bestpath":{
"overall":true
},
"extendedCommunity":{
"string":"LB:65301:250000 (2.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.2"
}
]
}
]
}
32 changes: 32 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/bgp-route-4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"prefix":"198.10.1.11\/32",
"paths":[
{
"valid":true,
"multipath":true,
"extendedCommunity":{
"string":"LB:65303:125000 (1.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.6"
}
]
},
{
"valid":true,
"multipath":true,
"bestpath":{
"overall":true
},
"extendedCommunity":{
"string":"LB:65201:250000 (2.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.2"
}
]
}
]
}
29 changes: 29 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/bgp-route-5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"prefix":"198.10.1.1\/32",
"paths":[
{
"valid":true,
"multipath":true,
"nexthops":[
{
"ip":"11.1.1.6"
}
]
},
{
"valid":true,
"multipath":true,
"bestpath":{
"overall":true
},
"extendedCommunity":{
"string":"LB:65201:375000 (3.000 Mbps)"
},
"nexthops":[
{
"ip":"11.1.1.2"
}
]
}
]
}
8 changes: 8 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
hostname r1
!
router bgp 65101
bgp router-id 11.1.1.1
bgp bestpath as-path multipath-relax
neighbor 11.1.1.2 remote-as external
neighbor 11.1.1.6 remote-as external
!
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.1\/32":[
{
"prefix":"198.10.1.1\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.6",
"weight":25
},
{
"fib":true,
"ip":"11.1.1.2",
"weight":75
}
]
}
]
}
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.1\/32":[
{
"prefix":"198.10.1.1\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.6",
"weight":33
},
{
"fib":true,
"ip":"11.1.1.2",
"weight":66
}
]
}
]
}
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.11\/32":[
{
"prefix":"198.10.1.11\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.6",
"weight":33
},
{
"fib":true,
"ip":"11.1.1.2",
"weight":66
}
]
}
]
}
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.1\/32":[
{
"prefix":"198.10.1.1\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.2",
"weight":1
},
{
"fib":true,
"ip":"11.1.1.6",
"weight":1
}
]
}
]
}
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.11\/32":[
{
"prefix":"198.10.1.11\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.2",
"weight":1
},
{
"fib":true,
"ip":"11.1.1.6",
"weight":1
}
]
}
]
}
15 changes: 15 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"198.10.1.1\/32":[
{
"prefix":"198.10.1.1\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.2",
"weight":100
}
]
}
]
}
15 changes: 15 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"198.10.1.11\/32":[
{
"prefix":"198.10.1.11\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.2",
"weight":100
}
]
}
]
}
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.1\/32":[
{
"prefix":"198.10.1.1\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.6",
"weight":1
},
{
"fib":true,
"ip":"11.1.1.2",
"weight":100
}
]
}
]
}
20 changes: 20 additions & 0 deletions tests/topotests/bgp_link_bw_ip/r1/ip-route-9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"198.10.1.11\/32":[
{
"prefix":"198.10.1.11\/32",
"selected":true,
"nexthops":[
{
"fib":true,
"ip":"11.1.1.6",
"weight":1
},
{
"fib":true,
"ip":"11.1.1.2",
"weight":100
}
]
}
]
}
Loading

0 comments on commit 000022d

Please sign in to comment.