Route Leaking Operational Commands
show route import
The show route import command displays all the imported routes.
Syntax:
| Attribute | Value |
|---|---|
|
Displays detailed route information of the imported routes. |
|
Displays route information for the imported routes for the specified instance. |
|
Displays detailed route information for the imported routes for the specified instance. |
|
Displays route information for the imported routes for the specified instance and prefix. |
|
Displays detailed route information for the imported routes for the specified instance and prefix. |
|
Displays summarized route information for the imported routes for the specified instance. |
|
Displays route information for the IPv4 address family. |
|
Displays route information for the IPv6 address family. |
|
Displays route information for the specified route source. |
|
Display summarized route information for the imported routes. |
Example 1: Source instance (vrf-blue) RIB
supervisor@rtbrick: op> show route ipv4 unicast source bgp instance ce1-vrf
Flags: & - Imported
Instance: ce1-vrf, AFI: ipv4, SAFI: unicast
Flags Prefix/Label Source Pref Next Hop Outgoing Interface
198.51.100.221/32 bgp 20 198.51.100.21 ifl-0/0/2/0
198.51.100.222/32 bgp 20 198.51.100.21 ifl-0/0/2/0
Example 2: Destination instance RIB
supervisor@rtbrick: op> show route import ipv4 unicast source bgp instance ce3-vrf
Flags: & - Imported
Instance: ce3-vrf, AFI: ipv4, SAFI: unicast
Flags Prefix/Label Source Pref Next Hop Outgoing Interface
& 198.51.100.221/32 bgp 20 198.51.100.21 ifl-0/0/2/0
& 198.51.100.222/32 bgp 20 198.51.100.21 ifl-0/0/2/0
Example 3: Detailed view of the destination instance (vrf-red) RIB
supervisor@rtbrick: op> show route import ipv4 unicast source bgp instance ce3-vrf detail
Instance: ce3-vrf, AFI: ipv4, SAFI: unicast
Prefix: 198.51.100.221/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: ce1-vrf
Next Hop: 198.51.100.21
Covering prefix: 198.51.100.21/32
Next Hop type: mpls ingress, Next Hop action: mpls label push
Resolved in: default-ipv4-labeled-unicast(Primary)
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 98:19:2c:99:47:2d
MPLS-Label: 519936,bos:1
Prefix: 198.51.100.222/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: ce1-vrf
Next Hop: 198.51.100.21
Covering prefix: 198.51.100.21/32
Next Hop type: mpls ingress, Next Hop action: mpls label push
Resolved in: default-ipv4-labeled-unicast(Primary)
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 98:19:2c:99:47:2d
MPLS-Label: 519936,bos:1
Example 4: Destination instance (vrf-red) RIB after applying the policy (match_ipv4_prefix)
supervisor@rtbrick: op> show route import ipv4 unicast source bgp instance ce3-vrf
Flags: & - Imported
Instance: ce3-vrf, AFI: ipv4, SAFI: unicast
Flags Prefix/Label Source Pref Next Hop Outgoing Interface
& 198.51.100.221/32 bgp 20 198.51.100.21 ifl-0/0/2/0
& 198.51.100.222/32 bgp 20 198.51.100.21 ifl-0/0/2/0
In the above example, the below policy is used to import the selective route.
set policy statement match_ipv4_prefix set policy statement match_ipv4_prefix ordinal 1 set policy statement match_ipv4_prefix ordinal 1 match set policy statement match_ipv4_prefix ordinal 1 match rule 1 set policy statement match_ipv4_prefix ordinal 1 match rule 1 type ipv4-prefix set policy statement match_ipv4_prefix ordinal 1 match rule 1 value-type discrete set policy statement match_ipv4_prefix ordinal 1 match rule 1 match-type exact set policy statement match_ipv4_prefix ordinal 1 match rule 1 value 192.168.1.20/32 set policy statement match_ipv4_prefix ordinal 1 action set policy statement match_ipv4_prefix ordinal 1 action rule 1 set policy statement match_ipv4_prefix ordinal 1 action rule 1 operation return-permit
The following is an example of JSON output showing the above policy configuration.
{
"rtbrick-config:statement": [
{
"name": "match_ipv4_prefix",
"ordinal": [
{
"ordinal": 1,
"match": {
"rule": [
{
"rule": 1,
"type": "ipv4-prefix",
"value-type": "discrete",
"match-type": "exact",
"value": [
"192.168.1.20/32"
]
}
]
},
"action": {
"rule": [
{
"rule": 1,
"operation": "return-permit"
}
]
}
}
]
}
]
}