mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-09 17:25:12 +00:00
tests: fix IGP metric best path selection in bgp_l3vpn_to_bgp_vrf
The L3VPN best path computation now takes into accound the IGP metric. Adapt the bgp_l3vpn_to_bgp_vrf tests so that routes with the best IGP metric are selected when needed. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
e577535f15
commit
dbb03df84f
@ -339,7 +339,7 @@ luCommand(
|
||||
luCommand(
|
||||
"r1",
|
||||
'vtysh -c "show bgp vrf r1-cust1 ipv4 uni 6.0.1.0/24"',
|
||||
"3 available, best",
|
||||
"4 available, best",
|
||||
"wait",
|
||||
"Ensure 6.0.1.0 shows up on r1",
|
||||
10,
|
||||
@ -347,7 +347,7 @@ luCommand(
|
||||
luCommand(
|
||||
"r1",
|
||||
'vtysh -c "show bgp vrf r1-cust1 ipv4 uni 6.0.2.0/24"',
|
||||
"3 available, best",
|
||||
"4 available, best",
|
||||
"wait",
|
||||
"Ensure 6.0.2.0 shows up on r1",
|
||||
10,
|
||||
@ -396,9 +396,9 @@ want_r1_remote_cust1_routes = [
|
||||
{"p": "6.0.1.0/24", "n": "3.3.3.3", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "4.4.4.4", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.1", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "3.3.3.3", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "3.3.3.3", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "4.4.4.4", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.1", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.1", "bp": True},
|
||||
{"p": "99.0.0.1/32", "n": "192.168.1.2", "bp": True},
|
||||
{"p": "99.0.0.2/32", "n": "3.3.3.3"},
|
||||
{"p": "99.0.0.3/32", "n": "4.4.4.4"},
|
||||
@ -473,7 +473,7 @@ luCommand(
|
||||
luCommand(
|
||||
"r3",
|
||||
'vtysh -c "show bgp vrf r3-cust1 ipv4 uni 6.0.1.0/24"',
|
||||
"3 available, best",
|
||||
"4 available, best",
|
||||
"wait",
|
||||
"Ensure 6.0.1.0 shows up on r3",
|
||||
10,
|
||||
@ -481,7 +481,7 @@ luCommand(
|
||||
luCommand(
|
||||
"r3",
|
||||
'vtysh -c "show bgp vrf r3-cust1 ipv4 uni 6.0.2.0/24"',
|
||||
"3 available, best",
|
||||
"4 available, best",
|
||||
"wait",
|
||||
"Ensure 6.0.2.0 shows up on r3",
|
||||
10,
|
||||
@ -522,9 +522,9 @@ want_r3_remote_cust1_routes = [
|
||||
{"p": "6.0.1.0/24", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "6.0.1.0/24", "n": "4.4.4.4", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.2", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "4.4.4.4", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.2", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.2", "bp": True},
|
||||
{"p": "99.0.0.1/32", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "99.0.0.3/32", "n": "4.4.4.4", "bp": True},
|
||||
{"p": "99.0.0.4/32", "n": "4.4.4.4", "bp": True},
|
||||
@ -611,9 +611,9 @@ want_r4_remote_cust1_routes = [
|
||||
{"p": "6.0.1.0/24", "n": "3.3.3.3", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.3", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.4", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "3.3.3.3", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.4", "bp": False},
|
||||
{"p": "99.0.0.1/32", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "99.0.0.2/32", "n": "3.3.3.3", "bp": True},
|
||||
@ -638,9 +638,9 @@ want_r4_remote_cust2_routes = [
|
||||
{"p": "6.0.1.0/24", "n": "3.3.3.3", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.3", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.4", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "1.1.1.1", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "3.3.3.3", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.4", "bp": False},
|
||||
{"p": "99.0.0.1/32", "n": "1.1.1.1", "bp": True},
|
||||
{"p": "99.0.0.2/32", "n": "3.3.3.3", "bp": True},
|
||||
@ -721,7 +721,7 @@ luCommand("r4", 'vtysh -c "show ip route vrf r4-cust2"')
|
||||
luCommand(
|
||||
"ce3",
|
||||
'vtysh -c "show bgp ipv4 uni"',
|
||||
"12 routes and 14",
|
||||
"12 routes and 13",
|
||||
"wait",
|
||||
"Local and remote routes",
|
||||
10,
|
||||
@ -733,7 +733,6 @@ want = [
|
||||
{"p": "5.4.2.0/24", "n": "192.168.1.1", "bp": True},
|
||||
{"p": "5.4.3.0/24", "n": "192.168.1.1", "bp": True},
|
||||
{"p": "6.0.1.0/24", "n": "192.168.1.1", "bp": False},
|
||||
{"p": "6.0.2.0/24", "n": "192.168.1.1", "bp": False},
|
||||
{"p": "6.0.1.0/24", "n": "99.0.0.3", "bp": True},
|
||||
{"p": "6.0.2.0/24", "n": "99.0.0.3", "bp": True},
|
||||
]
|
||||
@ -834,45 +833,36 @@ luCommand(
|
||||
luCommand(
|
||||
"ce1",
|
||||
'vtysh -c "show bgp ipv4 uni 6.0.2.0"',
|
||||
"2 available, best .*192.168.1.1.* Local.* 99.0.0.1 from 0.0.0.0 .99.0.0.1"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, weight 32768, valid, sourced, local, best .Weight"
|
||||
"1 available, best .*192.168.1.1.* Local.* 99.0.0.1 from 0.0.0.0 .99.0.0.1"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, weight 32768, valid, sourced, local, best .First path received"
|
||||
+ ".* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:11",
|
||||
"pass",
|
||||
"Redundant route 2 details",
|
||||
"Route 2 details",
|
||||
)
|
||||
luCommand(
|
||||
"ce2",
|
||||
'vtysh -c "show bgp ipv4 uni 6.0.2.0"',
|
||||
"2 available, best .*192.168.1.1.* Local.* 99.0.0.2 from 0.0.0.0 .99.0.0.2"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, weight 32768, valid, sourced, local, best .Weight"
|
||||
"1 available, best .*192.168.1.1.* Local.* 99.0.0.2 from 0.0.0.0 .99.0.0.2"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, weight 32768, valid, sourced, local, best .First path received"
|
||||
+ ".* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:12",
|
||||
"pass",
|
||||
"Redundant route 2 details",
|
||||
"Route 2 details",
|
||||
)
|
||||
luCommand(
|
||||
"ce3",
|
||||
'vtysh -c "show bgp ipv4 uni 6.0.2.0"',
|
||||
"2 available, best .*192.168.1.1.* Local.* 99.0.0.3 from 0.0.0.0 .99.0.0.3"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, weight 32768, valid, sourced, local, best .Weight"
|
||||
"1 available, best .*192.168.1.1.* Local.* 99.0.0.3 from 0.0.0.0 .99.0.0.3"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, weight 32768, valid, sourced, local, best .First path received"
|
||||
+ ".* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:13",
|
||||
"pass",
|
||||
"Redundant route 2 details",
|
||||
)
|
||||
luCommand(
|
||||
"ce3",
|
||||
'vtysh -c "show bgp ipv4 uni 6.0.2.0"',
|
||||
"2 available, best .*192.168.1.1.* Local.* 192.168.1.1 from 192.168.1.1 .192.168.1.1"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, valid, internal"
|
||||
+ ".* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:11",
|
||||
"pass",
|
||||
"Redundant route 2 details",
|
||||
"Route 2 details",
|
||||
)
|
||||
luCommand(
|
||||
"ce4",
|
||||
'vtysh -c "show bgp vrf ce4-cust2 ipv4 6.0.2.0"',
|
||||
"2 available, best .*192.168.2.1.* Local.* 192.168.2.1 from 192.168.2.1 .192.168.2.1"
|
||||
+ ".* Origin IGP, metric 100, localpref 100, valid, internal"
|
||||
+ ".* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:11",
|
||||
+ ".* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:13",
|
||||
"pass",
|
||||
"Redundant route 2 details",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user