why_best_path
Identify the BGP best path for a node and prefix from saved lab state and return the recorded selection reason; when no reason exists, it reports null instead of guessing.
Instructions
For one node and prefix, give the BGP best path and the reason stored in the data (FRR selectionReason, or the IOS-XE collector's derived reason). If the data has no reason, reason is null and a note says so; nothing is guessed. Read-only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"node": "<node>",
"prefix": "<prefix>"
},
"name": "why_best_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vrf | No | VRF, only needed when the prefix is in several VRFs | |
| node | Yes | Node name, e.g. r1 | |
| path | No | Same input as lab_state (optional here: the server was started with /app/demo/bgp-lp/frameB.json) | |
| prefix | Yes | Prefix, e.g. 8.8.8.0/24 (the length may be omitted when unambiguous) |