Ubiquiti · EdgeOS

EdgeRouter Route and BGP Show Commands

Troubleshoot routing in three steps: verify the session, inspect the routes it carries, and check the route used to forward traffic. A BGP peer can be established while the prefix you need is absent or unusable. Conversely, a valid route cannot prove that a firewall or destination host accepts the connection.

Scope: EdgeRouter/EdgeOS IPv4 routing CLI documented by Ubiquiti. Examples use unversioned official EdgeOS documentation; command availability must match installed firmware. This is not UniFi gateway or IPv6 address-family syntax.

Start in EdgeOS operational mode. If already in configuration mode, prefix the command with run. Replace the example neighbor with the real peer; 192.0.2.2 is a documentation address.

Read-only command set #

Read-only command set
EdgeOS · EdgeOS operational CLI / shell for tcpdump

Read-only
show ip route
Read-only
show ip bgp summary
Read-only
show ip bgp
Read-only

Replace these example values: 192.0.2.2.

show ip bgp neighbors 192.0.2.2 advertised-routes
Read-only

Replace these example values: 192.0.2.2.

show ip bgp neighbors 192.0.2.2 received-routes
CheckWhat to establish
Routing tableDestination prefix, selected route and next hop
BGP summaryExpected peer and session state; prefix count where displayed
BGP tablePresence and path information for the required prefix
Advertised routesWhat this router presents to that neighbor
Received routesRoutes retained for viewing from that neighbor; availability depends on inbound storage/configuration

The vendor BGP example enables inbound soft reconfiguration before showing received-routes. Do not assume an unavailable received-routes view means the peer sent nothing. First establish what the installed routing implementation retains and which operational views it supports.

Compare one prefix end to end #

Choose one affected destination and record its longest matching route. At the receiving router, compare that prefix with the BGP table. At the sending router, compare it with the neighbor's advertised view. If the advertised route is absent, examine the relevant export policy and route origination instead of repeatedly resetting the session.

For an EdgeOS BGP network statement, the intended prefix must match a route in the routing table. Avoid adding a blackhole route simply to make an advertisement appear until ownership, export policy and the downstream forwarding plan are clear. This reference deliberately provides no route-injection example.

Account for policy routing #

The main table may not describe a client's path when policy-based routing selects another table. For an existing policy using table 11 and the ruleset name PBR, inspect:

Account for policy routing
EdgeOS · EdgeOS operational CLI / shell for tcpdump

Read-only
show ip route table 11
Read-only

Replace these example values: PBR.

show firewall modify PBR statistics

Those values are examples, not built-in requirements. Compare the policy counters before and after one client test and inspect the selected table. A ping generated by the router can follow a different policy context from forwarded client traffic. Finish by checking the return route at the far side. A correct outgoing next hop is only half of a two-way connection.

Sources

Documentation reviewed: 8 October 2026