route_lookup
Look up a destination in a router's routing table by longest prefix match to see the matching route, protocol, next hop, and outgoing interface, plus reasons an OSPF route is missing or different.
Instructions
Look up a destination address in one router's collected routing table (installed rows only) by longest prefix match: the matching route, its protocol, next hop and outgoing interface (all next hops for ECMP). next_hop is null for a directly connected route; route is null with a note when nothing matches. A recursive next hop carries resolved_via (what the router resolved it through; via_mgmt when that is the lab's management network, i.e. not reachable inside the lab topology) and a note says so. When the data has the OSPF database (collected with network-xray 1.4 or later), the answer starts with why: one line per reason the destination has no OSPF route here or a different one (a router has it but does not advertise it, it is advertised by a router whose router ID another router also has, OSPF has the route but the routing table did not install it, a static route is not redistributed, an inter-area route). This reads the table the collector saved; it does not compute routing. 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>",
"destination": "<destination>"
},
"name": "route_lookup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vrf | No | VRF of the routing table rows to search (default: the default VRF) | |
| path | No | Same input as lab_state (optional here: the server was started with /app/demo/bgp-lp/frameB.json) | |
| router | Yes | Router name, e.g. r1 | |
| destination | Yes | IPv4 or IPv6 address, e.g. 8.8.8.8 or 2001:db8::1 (no prefix length) |