Route Leaking Operational Commands
show route import
The show route import
command displays all the imported routes.
Syntax:
show route import <option>
Attribute | Value |
---|---|
detail |
Displays detailed route information of the imported routes. |
instance <instance-name> |
Displays route information for the imported routes for the specified instance. |
instance <instance-name> detail |
Displays detailed route information for the imported routes for the specified instance. |
instances <instance-name> prefix <prefix> |
Displays route information for the imported routes for the specified instance and prefix. |
instance <instance-name> prefix <prefix> detail |
Displays detailed route information for the imported routes for the specified instance and prefix. |
instance <instance-name> summary |
Displays summarized route information for the imported routes for the specified instance. |
ipv4 |
Displays route information for the IPv4 address family. |
ipv6 |
Displays route information for the IPv6 address family. |
source |
Displays route information for the specified route source. |
summary |
Display summarized route information for the imported routes. |
Example 1: Source instance (vrf-blue
) RIB
supervisor@rtbrick>LEAF01: op> show route ipv4 unicast source bgp instance vrf-blue
Flags: & - Imported
Instance: vrf-blue, AFI: ipv4, SAFI: unicast
Flags Prefix/Label Source Pref Next Hop Outgoing Interface
192.168.0.20/32 bgp 20 12.0.0.2 ifl-0/0/2/0
192.168.0.21/32 bgp 20 12.0.0.2 ifl-0/0/2/0
192.168.1.20/32 bgp 20 12.0.0.2 ifl-0/0/2/0
192.168.1.21/32 bgp 20 12.0.0.2 ifl-0/0/2/0
192.168.4.20/32 bgp 20 12.0.0.2 ifl-0/0/2/0
supervisor@rtbrick>LEAF01: op>
Example 2: Destination instance RIB
supervisor@rtbrick>LEAF01: op> show route import ipv4 unicast source bgp instance vrf-red
Flags: & - Imported
Instance: vrf-red, AFI: ipv4, SAFI: unicast
Flags Prefix/Label Source Pref Next Hop Outgoing Interface
& 192.168.0.20/32 bgp 20 12.0.0.2 ifl-0/0/2/0
& 192.168.0.21/32 bgp 20 12.0.0.2 ifl-0/0/2/0
& 192.168.1.20/32 bgp 20 12.0.0.2 ifl-0/0/2/0
& 192.168.1.21/32 bgp 20 12.0.0.2 ifl-0/0/2/0
& 192.168.4.20/32 bgp 20 12.0.0.2 ifl-0/0/2/0
supervisor@rtbrick>LEAF01: op>
Example 3: Detailed view of the destination instance (vrf-red
) RIB
supervisor@rtbrick>LEAF01: op> show route import ipv4 unicast source bgp instance vrf-red detail
Instance: vrf-red, AFI: ipv4, SAFI: unicast
192.168.0.20/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: vrf-blue
Next Hop: 12.0.0.2
Covering prefix: 12.0.0.2/32
Next Hop type: direct, Next Hop action: None
Resolved in: default-ipv4-labeled-unicast
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 7a:02:bb:c0:00:00
192.168.0.21/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: vrf-blue
Next Hop: 12.0.0.2
Covering prefix: 12.0.0.2/32
Next Hop type: direct, Next Hop action: None
Resolved in: default-ipv4-labeled-unicast
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 7a:02:bb:c0:00:00
192.168.1.20/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: vrf-blue
Next Hop: 12.0.0.2
Covering prefix: 12.0.0.2/32
Next Hop type: direct, Next Hop action: None
Resolved in: default-ipv4-labeled-unicast
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 7a:02:bb:c0:00:00
192.168.1.21/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: vrf-blue
Next Hop: 12.0.0.2
Covering prefix: 12.0.0.2/32
Next Hop type: direct, Next Hop action: None
Resolved in: default-ipv4-labeled-unicast
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 7a:02:bb:c0:00:00
192.168.4.20/32
Source: bgp, Preference: 20
Import type: inter-instance, Import instance: vrf-blue
Next Hop: 12.0.0.2
Covering prefix: 12.0.0.2/32
Next Hop type: direct, Next Hop action: None
Resolved in: default-ipv4-labeled-unicast
Outgoing Interface: ifl-0/0/2/0, NextHop MAC: 7a:02:bb:c0:00:00
supervisor@rtbrick>LEAF01: op>
Example 4: Destination instance (vrf-red
) RIB after applying the policy (match_ipv4_prefix
)
supervisor@rtbrick>LEAF01: op> show route import ipv4 unicast source bgp instance vrf-red
Flags: & - Imported
Instance: vrf-red, AFI: ipv4, SAFI: unicast
Flags Prefix/Label Source Pref Next Hop Outgoing Interface
& 192.168.1.20/32 bgp 20 12.0.0.2 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"
}
]
}
}
]
}
]
}