This article discusses the diagnostic commands available for troubleshooting auto-export.
The auto-export statement is particularly useful for configuring overlapping VPNs—VPN configurations where more than one VRF routing instance lists the same community route target in its vrf-import policy. The auto-export statement finds out which routing tables to export routes from and import routes to by examining the existing policy configuration.
Configuring routing-options auto-export on a routing instance binds the rt-export protocol module to it. Traditional vrf-import and vrf-export policies check for specific matches on other VRFs on the router. These policies trigger local intra-router prefix redistribution based on the RT communities without the need for BGP. The resulting behavior is similar to what would be expected from a prefix received from a remote PE over BGP.
Diagnostic commands used for diagnosing auto-export
show route export [<table-name>] [brief|detail] show route export instance [<instance-name>] [brief|detail] show route export vrf-target [community <community-regexp>] [brief|detail]
The show route export command displays a list of routing tables that are currently participating in the export mechanism, either as importer or exporter or routes.
example: lab> show route export Table Export Routes inet.0 N 0 customer1.inet.0 Y 0 customer2.inet.0 Y 1
The ‘Export’ field will display a value of ‘Y’ if the table is currently exporting routes to other tables.
The ‘Routes’ field will display the number of routes exported from this table into other tables. If a route is exported to N different tables it counts once only.
lab@hydrogen-renga:R1> show route export vrf-target detail Target: 100:1 inet unicast Import table(s): customer1.inet.0 customer2.inet.0 Export table(s): customer2.inet.0 Target: 65000:117 inet unicast Import table(s): customer1.inet.0 customer2.inet.0 Export table(s): customer2.inet.0
The detailed display shows the tables importing and exporting a particular route target. In this example routes with community ‘100:1’ are being exported from the table customer2.inet.0 to the table ‘customer1.inet.0’. The same happens for community ‘65000:117’ being exported from customer2.inet.0 to ‘customer1.inet.0’.
Exported routes will display an ‘Announcement bit’ entry corresponding to this feature.
lab@hydrogen-renga> show route table customer2.inet.0 172.19.140.0/23 logical-system R1 extensive | no-more customer2.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) 172.19.140.0/23 (2 entries, 1 announced) TSI: KRT in-kernel 172.19.140.0/23 -> {1.1.14.2} Page 0 idx 0 Type 1 val 9241960 Nexthop: 1.1.14.2 AS path: [65000] 65000 I Communities: Page 0 idx 1 Type 1 val 9241acc Flags: Nexthop Change Nexthop: Self Localpref: 100 AS path: [65000] 65112 I Communities: target:100:1 target:65000:117 target:65000:5130 Path 172.19.140.0 from 1.1.14.2 Vector len 4. Val: 0 1 *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 961 Address: 0x92588ac Next-hop reference count: 4 Source: 1.1.14.2 Next hop: 1.1.14.2 via ge-0/2/3.14, selected Session Id: 0x180001 State: <Active Ext> Peer AS: 65112 Age: 14:59 Validation State: unverified Task: BGP_65112.1.1.14.2+59663 Announcement bits (3): 0-KRT 1-rt-export 2-BGP_RT_Background AS path: 65112 I ^^^^^^^^^^^ Accepted Localpref: 100 Router ID: 4.4.4.4 BGP Preference: 170/-101 Route Distinguisher: 3:3 Next hop type: Indirect Address: 0x9259064 Next-hop reference count: 8 Source: 2.2.2.2 Next hop type: Router, Next hop index: 986 Next hop: 1.1.13.2 via ge-0/2/3.13, selected Label operation: Push 17 Label TTL action: prop-ttl Session Id: 0x180002 Protocol next hop: 3.3.3.3 Push 17 Indirect next hop: 945c0ec 1048576 INH Session ID: 0x180004 State: <Secondary NotBest Int Ext ProtectionCand> Inactive reason: Not Best in its group - Interior > Exterior > Exterior via Interior Local AS: 65000 Peer AS: 65000 Age: 13:56 Metric2: 1 Validation State: unverified Task: BGP_65000.2.2.2.2+179 AS path: 65112 I (Originator) Cluster list: 2.2.2.2 Originator ID: 3.3.3.3 Communities: target:100:1 Import Accepted VPN Label: 17 Localpref: 100 Router ID: 2.2.2.2 Primary Routing Table bgp.l3vpn.0 Indirect next hops: 1 Protocol next hop: 3.3.3.3 Metric: 1 Push 17 Indirect next hop: 945c0ec 1048576 INH Session ID: 0x180004 Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 1.1.13.2 via ge-0/2/3.13 Session Id: 0x180002 3.3.3.3/32 Originating RIB: inet.3 Metric: 1 Node path count: 1 Forwarding nexthops: 1 Nexthop: 1.1.13.2 via ge-0/2/3.13
Traceoptions For Auto-export
set routing-instances customer1 routing-options auto-export traceoptions file auto_export_1 set routing-instances customer1 routing-options auto-export traceoptions flag all set routing-instances customer2 routing-options auto-export traceoptions file auto_export set routing-instances customer2 routing-options auto-export traceoptions flag all
If required, open a case with JTAC to further troubleshoot the issue.