why_path
Explains why a router selected a BGP path for a prefix, showing chosen and candidate paths, deciding attributes, and whether the reason came from the device or was derived.
Instructions
Why one router selected its BGP path to a prefix: the selected path, the other candidates with their attributes, the deciding step, and where that reason came from: reason_source "device" when the router reported it (FRR selectionReason), "derived" when the collector worked it out from what the router printed (Cisco IOS-XE prints no reason), "comparison" when network-xray inferred it by comparing the attributes in the data (Weight, LocPrf, AS-Path, Origin, MED), or null with a note when neither says. A bare address is matched to the longest BGP prefix that contains it. 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": {
"router": "<router>",
"prefix": "<prefix>"
},
"name": "why_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vrf | No | VRF, only needed when the prefix is in several VRFs | |
| 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) or an address inside it (e.g. 8.8.8.8) | |
| router | Yes | Router name, e.g. r1 |