/routing/route

当前显示英文原文,切换到「中文」可查看译文。

route

A read-only table that lists routes from all the address families as well as all filtered routes with all possible route attributes.


routing/route

Type: Directory

A read-only table that lists routes from all the address families as well as all filtered routes with all possible route attributes.

Default example output of the table with various route types:

[admin@MikroTik] /routing/route> print
Flags: A - ACTIVE; c, s, a, l, y - COPY; H - HW-OFFLOADED
Columns: DST-ADDRESS, GATEWAY, AFI, DISTANCE, SCOPE, TARGET-SCOPE, IMMEDIATE-GW
    DST-ADDRESS                 GATEWAY           AFI    D  SCOPE  TA  IMMEDIATE-GW
 lH 10.0.0.0/8                                    ip     0
;;; defconf
As  10.0.0.0/8                  10.155.130.1      ip     1     30  10  10.155.130.1%ether1
 lH 10.155.130.0/25                               ip     0
Ac  10.155.130.0/25             ether1            ip     0     10      ether1
 aH 10.155.130.12/32                              ip     0
 lH 111.13.0.0/24                                 ip     0
Ac  111.13.0.0/24               ether2            ip     0     10      ether2
 aH 111.13.0.1/32                                 ip     0
Ac  111.111.111.2/32            loopback@vrfTest  ip     0     10      loopback
Ac  2111:4::/64                 ether2            ipv6   0     10      ether2
Ac  fe80::%ether1/64            ether1            ipv6   0     10      ether1
Ac  fe80::%ether2/64            ether2            ipv6   0     10      ether2
Ac  fe80::%ether3/64            ether3            ipv6   0     10      ether3
Ac  fe80::%ether4/64            ether4            ipv6   0     10      ether4
Ac  3333::2/128                 loopback@vrfTest  ipv6   0     10      loopback
Ac  fe80::%loopback/64          loopback@vrfTest  ipv6   0     10      loopback
Ay  111.111.111.2/32&65530:100  loopback@vrfTest  vpnv4  0     10   5  loopback
Ay  3333::2/128&65530:100       loopback@vrfTest  vpnv6  0     10   5  loopback
A H ether1                                        link   0
A H ether2                                        link   0
A H ether3                                        link   0
A H ether4                                        link   0
A H loopback                                      link   0

Detailed example output with some BGP, OSPF, and other routes:

[admin@MikroTik] /routing/route> print detail
Flags: X - disabled, F - filtered, U - unreachable, A - active;
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, a - ldp-address, l - ldp-mapping, y - copy; H - hw-offloaded;
+ - ecmp, B - blackhole
  o   afi=ip4 contribution=best-candidate dst-address=0.0.0.0/0 routing-table=main gateway=10.155.101.1%ether1 immediate-gw=10.155.101.1%ether1
       distance=110 scope=20 target-scope=10 belongs-to="OSPF route"
       ospf.metric=2 .tag=111 .type=ext-type-1
       debug.fwp-ptr=0x203425A0

 Ad + afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1
       distance=1 scope=30 target-scope=10 vrf-interface=ether1 belongs-to="DHCP route"
       debug.fwp-ptr=0x20342060

 As + afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1
       distance=1 scope=30 target-scope=10 belongs-to="Static route"
       debug.fwp-ptr=0x20342060

 Fb   afi=ip4 contribution=filtered dst-address=1.0.0.0/24 routing-table=main gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1 distance=20
       scope=40 target-scope=10 belongs-to="BGP IP routes from 10.155.101.217" rpki=valid
       bgp.peer-cache-id=*B000002 .aggregator="13335:172.68.180.1" .as-path="65530,100,9002,13335" .atomic-aggregate=yes .origin=igp
       debug.fwp-ptr=0x20342960

FlagNameDescription
Xdisableddisabled
FfilteredA flag indicates whether the route was filtered by routing filters and excluded from being used as the best route.
UunreachableA flag indicates whether the route next-hop is unreachable.
AactiveA flag indicates whether the route is elected as Active and eligible to be added to the FIB.
cconnectconnect
sstaticstatic
rriprip
bbgpA flag indicates whether this route was added by the BGP protocol.
nbgp-netbgp-net
oospfospf
iisisisis
ddhcpA flag indicates whether the route was added by the DHCP service.
vvpnA flag indicates whether the route was added by one of the VPN protocols (PPPoE, L2TP, SSTP, etc.)
mmodemA flag indicates whether the route is added by the LTE or 3g modems.
aldp-addressA flag indicates whether the route entry is an LDP address.
lldp-mappingA flag indicates whether the route entry is the LDP mapping.
gslaacslaac
ybgp-mpls-vpnA flag indicates a copy of the route to be redistributed as the L3VPN route. VPNv4/6 related attributes are attached to this route.
eevpnevpn
Hhw-offloadedIndicates whether the route is eligible to be hardware offloaded on supported hardware.
+ecmpA flag indicates whether the route is added as an Equal-Cost Multi-Path route in the FIB
BblackholeA flag indicates whether it is a blackhole route.
Read-only ArgumentTypeDescription
afienum (bad | ip | ipv6 | l2vpn | vpnv4 | vpnv6 | l2vpn-cisco | mip4 | mip6 | link | l2vpn-link | evpn)Address family this route belongs to.
contributionenum (filtered | unreachable | candidate | best-candidate | active)Shows the route status contributing to the election process, e.g "filtered, active, candidate"
dst-addressaddress (flags=46i/SR)
routing-tableenumRouting table this route belongs to.
ve-idnum
ve-block-offsetnum
ve-block-sizenum
labelnum
pref-srcaddress (flags=46)
gatewayaddress (flags=46ivL)Configured gateway, for the actually resolved gateway, see immediate-gw parameter.
nexthop-idnum
immediate-gwmulti { gw: address (flags=46i) }Shows actual (resolved) gateway and interface that will be used for packet forwarding. Displayed in format [ip%interface].
check-gatewayenum (none | arp | ping | bfd)Currently used check-gateway option.
distancenum
scopenumScope used in the next-hop lookup process. Read more>>
target-scopenumTarget scope used in next-hop lookup process. Read more>>.
vrf-interfaceiface_enumInternal use only parameter which allows identifying to which VRF route should be added. Used by services that add routes dynamically, for example, DHCP client. Shown for debugging purposes.
belongs-tostringDescriptive info showing from where the route was received.
local-addressaddress (flags=46iv)Local IP address of the connected network.
route-costnum
total-costnum
rpkienum (unknown | valid | invalid)Current status of the prefix from the RPKI validation process.
bgp.sessionenumBGP session that installed the route. See /routing/bgp/session menu.
bgp.aggregatorstring
bgp.as-pathstringValue of the AS_PATH BGP attribute.
bgp.cluster-liststring
bgp.communitiesmulti { value: string }Value of the COMMUNITIES BGP attribute.
bgp.ext-communitiesmulti { value: string }Value of the EXTENDED_COMMUNITIES BGP attribute.
bgp.large-communitiesmulti { value: string }Value of the LARGE_COMMUNITIES BGP attribute.
bgp.unknownmulti { value: string }Hex blob of unknown BGP attributes.
bgp.originator-idaddress (flags=4)
bgp.nexthopmulti { gw: address (flags=4) }
bgp.out-nexthopmulti { gw: address (flags=4iv) }
bgp.weightnum
bgp.local-prefnumValue of the LOCAL_PREF BGP attribute.
bgp.igp-metricnumValue of the IGP_METRIC BGP attribute
bgp.pmsistring
bgp.mednumValue of the MED BGP attribute.
bgp.atomic-aggregatebool
bgp.originenum (igp | egp | incomplete) { igp:0, egp:1, incomplete:2 }
bgp.esistring
bgp.otcnum
route-distinguisherstring
rip.tagnum
rip.metricnum
ospf.metricnum
ospf.tagnum
ospf.typeenum (intra | inter | ext-type-1 | ext-type-2 | nssa-type-1 | nssa-type-2) { intra:0, inter:1, ext-type-1:2, ext-type-2:3, nssa-type-1:4, nssa-type-2:5 }
isis.typeenum (l1 | l2 | l1-inter | l1-ext | l2-ext | l1-inter-ext) { l1:0, l2:1, l1-inter:2, l1-ext:3, l2-ext:4, l1-inter-ext:5 }
isis.metricnum
mpls.labelsmulti { label: num }
mpls.in-labelnumMapped MPLS ingress label.
mpls.out-labelnumMapped MPLS egress label.
ldp.peer-idnum
ldp.labelnumLDP mapped MPLS label.
mtunum
hoplimitnum
debug.fwp-ptrnum
debug.route-ptrnum
debug.input.refsnum
debug.input.sizenum
debug.input.ptrnum
debug.input.rawstring
debug.merge.refsnum
debug.merge.sizenum
debug.merge.ptrnum
debug.merge.rawstring