/routing/route
route
一个只读表,列出所有地址族的路由以及所有已过滤路由及其所有可能的路由属性。
routing/route
Type: Directory
一个只读表,列出所有地址族的路由以及所有已过滤路由及其所有可能的路由属性。
包含各种路由类型的表默认示例输出:
[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
包含一些 BGP、OSPF 和其他路由的详细示例输出:
[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
| 标志 | 名称 | 描述 |
|---|---|---|
X | disabled | 已禁用 |
F | filtered | 该标志指示路由是否被路由过滤器过滤,并被排除在最佳路由之外。 |
U | unreachable | 该标志指示路由的下一跳是否不可达。 |
A | active | 该标志指示路由是否被选举为活动路由,并有资格添加到 FIB。 |
c | connect | 连接 |
s | static | 静态 |
r | rip | RIP |
b | bgp | 该标志指示此路由是否由 BGP 协议添加。 |
n | bgp-net | bgp-net |
o | ospf | OSPF |
i | isis | isis |
d | dhcp | 该标志指示路由是否由 DHCP 服务添加。 |
v | vpn | 该标志指示路由是否由某种 VPN 协议(PPPoE、L2TP、SSTP 等)添加。 |
m | modem | 该标志指示路由是否由 LTE 或 3G 调制解调器添加。 |
a | ldp-address | 该标志指示路由条目是否为 LDP 地址。 |
l | ldp-mapping | 该标志指示路由条目是否为 LDP 映射。 |
g | slaac | SLAAC |
y | bgp-mpls-vpn | 该标志指示该路由的副本将被重分发为 L3VPN 路由。与 VPNv4/6 相关的属性会附加到此路由。 |
e | evpn | evpn |
H | hw-offloaded | 指示该路由是否有资格在支持的硬件上进行硬件卸载。 |
+ | ecmp | 该标志指示路由是否作为 等价多路径路由添加到 FIB 中 |
B | blackhole | 该标志指示它是否为黑洞路由。 |
| 只读参数 | 类型 | 描述 |
|---|---|---|
afi | enum (bad | ip | ipv6 | l2vpn | vpnv4 | vpnv6 | l2vpn-cisco | mip4 | mip6 | link | l2vpn-link | evpn) | 此路由所属的地址族。 |
contribution | enum (filtered | unreachable | candidate | best-candidate | active) | 显示参与选举过程的路由状态,例如 “filtered, active, candidate” |
dst-address | address (flags=46i/SR) | |
routing-table | enum | 此路由所属的路由表。 |
ve-id | num | |
ve-block-offset | num | |
ve-block-size | num | |
label | num | |
pref-src | address (flags=46) | |
gateway | address (flags=46ivL) | 配置的网关;实际解析后的网关请参见 immediate-gw 参数。 |
nexthop-id | num | |
immediate-gw | multi { gw: address (flags=46i) } | 显示将用于数据包转发的实际(已解析)网关和接口。以 [ip%interface] 格式显示。 |
check-gateway | enum (none | arp | ping | bfd) | 当前使用的 check-gateway 选项。 |
distance | num | |
scope | num | 下一跳查找过程中使用的作用域。了解更多>> |
target-scope | num | 下一跳查找过程中使用的目标作用域。了解更多>>。 |
vrf-interface | iface_enum | 仅供内部使用的参数,用于标识应将路由添加到哪个 VRF。由动态添加路由的服务使用,例如 DHCP 客户端。为调试目的显示。 |
belongs-to | string | 显示路由来源的描述性信息。 |
local-address | address (flags=46iv) | 连接网络的本地 IP 地址。 |
route-cost | num | |
total-cost | num | |
rpki | enum (unknown | valid | invalid) | 前缀在 RPKI 验证过程中的当前状态。 |
bgp.session | enum | 安装该路由的 BGP 会话。参见 /routing/bgp/session 菜单。 |
bgp.aggregator | string | |
bgp.as-path | string | AS_PATH BGP 属性的值。 |
bgp.cluster-list | string | |
bgp.communities | multi { value: string } | COMMUNITIES BGP 属性的值。 |
bgp.ext-communities | multi { value: string } | EXTENDED_COMMUNITIES BGP 属性的值。 |
bgp.large-communities | multi { value: string } | LARGE_COMMUNITIES BGP 属性的值。 |
bgp.unknown | multi { value: string } | 未知 BGP 属性的十六进制数据块。 |
bgp.originator-id | address (flags=4) | |
bgp.nexthop | multi { gw: address (flags=4) } | |
bgp.out-nexthop | multi { gw: address (flags=4iv) } | |
bgp.weight | num | |
bgp.local-pref | num | LOCAL_PREF BGP 属性的值。 |
bgp.igp-metric | num | IGP_METRIC BGP 属性的值 |
bgp.pmsi | string | |
bgp.med | num | MED BGP 属性的值。 |
bgp.atomic-aggregate | bool | |
bgp.origin | enum (igp | egp | incomplete) { igp:0, egp:1, incomplete:2 } | |
bgp.esi | string | |
bgp.otc | num | |
route-distinguisher | string | |
rip.tag | num | |
rip.metric | num | |
ospf.metric | num | |
ospf.tag | num | |
ospf.type | enum (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.type | enum (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.metric | num | |
mpls.labels | multi { label: num } | |
mpls.in-label | num | 映射的 MPLS 入标签。 |
mpls.out-label | num | 映射的 MPLS 出标签。 |
ldp.peer-id | num | |
ldp.label | num | LDP 映射的 MPLS 标签。 |
mtu | num | |
hoplimit | num | |
debug.fwp-ptr | num | |
debug.route-ptr | num | |
debug.input.refs | num | |
debug.input.size | num | |
debug.input.ptr | num | |
debug.input.raw | string | |
debug.merge.refs | num | |
debug.merge.size | num | |
debug.merge.ptr | num | |
debug.merge.raw | string |