junos show-route
Show routing table information
Description
Show routing table information
Synopsis
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of junos device
Example: --cluster "mx-1"
Default: junos-default
Attributes: optional
destination
- (string)
IP address and optional prefix length of destination
Example: "10.100.1.2"
Default: _None_
Attributes: optional
Examples
Input:
Output:inet.0: 21 destinations, 21 routes (21 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.100.14.0/24 *[Direct/0] 04:21:52
> via ge-0/0/2.0
{
"route-information": [
{
"route-table": [
{
"table-name": [
{
"data": "inet.0"
}
],
"destination-count": [
{
"data": "21"
}
],
"total-route-count": [
{
"data": "21"
}
],
"active-route-count": [
{
"data": "21"
}
],
"holddown-route-count": [
{
"data": "0"
}
],
"hidden-route-count": [
{
"data": "0"
}
],
"rt": [
{
"attributes": {
"junos:style": "brief"
},
"rt-destination": [
{
"data": "10.100.14.0/24"
}
],
"rt-entry": [
{
"active-tag": [
{
"data": "*"
}
],
"current-active": [
{
"data": [null]
}
],
"last-active": [
{
"data": [null]
}
],
"protocol-name": [
{
"data": "Direct"
}
],
"preference": [
{
"data": "0"
}
],
"age": [
{
"data": "04:22:19",
"attributes": {
"junos:seconds": "15739"
}
}
],
"nh": [
{
"selected-next-hop": [
{
"data": [null]
}
],
"via": [
{
"data": "ge-0/0/2.0"
}
]
}
]
}
]
}
]
}
]
}
]
}
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "junos" |
Service Instance | |
Namespace | |
Object Type | "route" |
Object ID |
Please see Access Control for details.