Symptoms:
The different routes used to reach a same network are sorted and inserted into FIB based on various parameters. This enhancement provides reason codes that are associated with the routes which indicate the reason why a particular route is considered less preferable than its predecessor.
VMware SD-WAN by VeloCloud
Below is a sample output from the VCO route dump. Note the "Lost Reason" column added at the last
As shown in the above output, the best route always carries reason "LR_NO_ELECTION" (LR stands for Lost Reason) since it is the best route. The second route carries reason "LR_SLAN_FLAG" indicating that it lost because its predecessor was a static LAN route. The rest of the entries are interpreted likewise.
The different reason codes for edge:
SNO | Reason code | Description |
---|---|---|
1 | LR_NO_ELECTION | Best route. |
2 | LR_NP_SWAN_VS_VELO | Predecessor won because it is a non-preferred static WAN route (route configured with preferred flag set to false) when compared to the current route which is a via velocloud route. |
3 | LR_NP_SWAN_VS_DEFRT | Predecessor won because it is a non-preferred static WAN route when compared to the current route which is default route. |
4 | LR_NP_ROUTE_TYPE | Predecessor won because its route type is better when compared to the current route (please refer notes section below to see the different route types in order). Also, one of the routes being compared is a non-preferred route in this case. |
5 | LR_NP_EDGED_ROUTED | The predecessor won because it is a route learnt via routing protocols when compared to the current route which is a statc LAN/WAN non-preferred route. |
6 | LR_BGP_LOCAL_PREF | Both routes are learnt using BGP. The predecessor won because it has a higher local preference than the current route. |
7 | LR_BGP_ASPATH_LEN | Both routes are learnt using BGP. Predecessor won because it has a lower AS path value than the current route. |
8 | LR_BGP_METRIC | Both routes are learnt using BGP. Predecessor won because it has a lower metric value than the current route. |
9 | LR_EXT_OSPF_INTER | Predecessor won because it is a route learnt from OSPF with an inter or intra area metric when compared to the current route which was learnt from BGP. |
10 | LR_EXT_BGP_RT | Predecessor won because it is a route learnt from BGP when compared the current route which is a route learn from OSPF with metric type OE1 or OE2. |
11 | LR_EXT_METRIC_TYPE |
Both routes are OSPF routes. The predecessor won because it has a better metric type than the current route. Order of preference for OSPF metric types: OSPF_TYPE_INTRA, OSPF_TYPE_INTER, OSPF_TYPE_OE1, OSPF_TYPE_OE2. |
12 | LR_EXT_METRIC_VAL | Both routes are OSPF routes. The predecessor won because it has a lesser metric than the current route. |
13 | LR_EXT_NH_IP | Both routes are OSPF ECMP routes. The current route lost to the predecessor wince it was learnt later. |
14 | LR_PG_BGP_ORDER | Both are remote BGP routes with same BGP parameters. The current route won because it is a Partner Gateway (PG) route and had a lesser "order" value when compared to the current route. |
15 | LR_NON_PG_BGP_ORDER | Both are remote BGP routes with same BGP parameters. The current route won because it is a non-PG route and had a lesser "order" value when compared to the current route. |
16 | LR_EXT_ORDER | Both are remote OSPF routes with same metric. The predecessor won because it had a lesser order value than the current route. |
17 | LR_PREFERENCE | Both are either BGP or OSPF routes. The predecessor won because it had a lesser preference value than the current route. |
18 |
LR_DCE_NSD_STATIC_PREF DCE - Data center, NSD - Non-SDWAN site (also called as Non-Velocloud Site NVS) |
Both are local NSD static routes. The predecessor won because it is a preferred route (preferred flag set to true) when compared to the current which is non-preferred. |
19 | LR_DCE_NSD_STATIC_METRIC | Both are NSD static routes. The predecessor won because it has a lesser metric value than the current route. |
20 | LR_DCE_NON_REMOTE | Both are NSD static routes. The predecessor won because it is a local route (non-remote) and the current route is a remote route. |
21 | LR_DCE_NSD_STATIC_REMOTE_ORDER | Both are remote NSD static routes. The predecessor won because it had a lesser order value when compared to the current route. |
22 | LR_DCE_DC_DIRECT | Both are NSD static routes. The predecessor won because its DC_DIRECT flag is set and the current route does not have this flag set. This is the route with "n - nonVelocloud" flag set in the debug.py --routes output. These are routes learnt from an NVS from edge. |
23 | LR_DCE_LOGICAL_ID | Both are NSD static routes. The predecessor won because it had a better logical ID than the current route. |
24 | LR_NETMASK |
The predecessor won because it had a higher netmask than the current. This will not hit since the netmask is different, it is a separate network/route entry of its own. |
25 | LR_NETADDR |
The predecessor won because it had a higher network address than the current. This will not hit since the network address is different, it is a separate network/rouute entry of its own. |
26 | LR_CONN_FLAG | The predecessor won because it is a connected route and the current route is not a connected route. |
27 | LR_SELF_FLAG | The predecessor won because it is a self route and the current route is not a self route. |
28 | LR_SLAN_FLAG | The predecessor won because it is a static LAN route and the current route is not a static LAN route. |
29 | LR_SWAN_FLAG | The predecessor won because it is a static WAN route and the current route is not a static WAN route. |
30 | LR_NSD_STATIC_LOCAL | The predecessor won because it is a local NSD static route and the current route is an NSD BGP route. |
31 | LR_NSD_BGP_VS_NON_PREF_STATIC | The predecessor won because it is a NDS BGP route and the current route is a local NSD static non-preferred route. |
32 | LR_NSD_STATIC_PREF_VS_NSD_STATIC | The predecessor won because it is an NSD static preferred route and the current route is not an NSD static route. |
33 | LR_CONN_STATIC_VS_NSD_BGP | The predecessor won because it is a remote connected/static route and the current route is an NSD BGP route. |
34 | LR_OPG_SECURE_STATIC | The predecessor won because it is a PG secure static route and the current is not. |
35 | LR_ROUTED_VS_VELO | The predecessor won because it is a route learnt from routing protocols when compared the current route which is a "v - ViaVeloCloud" route. |
36 | LR_INTF_DEF_VS_ROUTED | The predecessor won because it is an interface default cloud route when compared to the cuurrent route which is a route learnt using routing protocols (local or remote). |
37 | LR_ROUTE_TYPE | The predecessor won because it has a better route than the current. |
38 | LR_E2DC_REMOTE | The predecessor won because it is a, Edge2DC route and it is a local route and the current route is a remote route. |
39 | LR_CONNECTED_LAN |
Both are connected routes. The predecessor won because it is a connected LAN route and the current route is not a connected LAN route. |
40 | LR_VELO_REMOTE_FLAG | Both are cloud routes. The predecessor won becauuse it is a remote route when compared to the remote cloud route when compared to the current which is a local cloud route. |
41 | LR_VELO_EDGED_ROUTED | Both are cloud routes. The predecessor won because it is a route learnt via routing protocol and the current route is not learnt via routing protocol. |
42 | LR_VELO_PG_ROUTE | Both are cloud routes. The predecessor won because it is a PG route and the current route is not a PG route. |
43 | LR_VIA_VELO_ROUTE | Both are cloud routes. The predecessor won because it is a via velocloud route and the current is not a via-velocloud route. |
44 | LR_REMOTE_NON_ROUTED | Both are remote (overlay) routes. The predecessor won because it is a route not learnt via routing protocol (static/connected) and the current route is a route learnt via routing protocol. |
45 | LR_REMOTE_DCE_FLAG | Both are remote (overlay) routes. The predecessor won because it is a data center edge route ("D - DCE" is set in the debug.py --routes output) and the current is not a data center edge route. |
46 | LR_METRIC | The predecessor won because it has a lesser metric than the current route. |
47 | LR_ORDER | The predecessor won because it has a lesser order than the current route. |
48 | LR_LOGICAL_ID | The predecessor won because it has a better logical ID th an the current route. |
49 | LR_EXT_BGP_VIA_PRIMGW | Both are BGP routes. The predecessor won because it is an NSD BGP route learnt from the primary NSD VCG. The current route might have been learnt from the redundant NDS VCG. |