Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

export-rib

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
export-rib routing-table-name;

Hierarchy Level

content_copy zoom_out_map
[edit logical-systems logical-system-name routing-instances routing-instance-name routing-options rib-groups group-name],
[edit logical-systems logical-system-name routing-options rib-groups group-name],
[edit routing-instances routing-instance-name routing-options rib-groups group-name],
[edit routing-options rib-groups group-name]

Description

Specify the name of the routing table from which Junos OS should export routing information. For any individual RIB group, only one table can be specified in the export-rib statement.

The export-rib statement specifies the source table from which routing information is advertised.

One common use of the export-rib statement is interdomain routing. The export RIB is the table used when BGP extracts routes to advertise to peers. In multicast interdomain routing, for example, the export RIB is likely to be inet.2.

Another use of export-rib is dynamic route leaking between the global routing table (inet.0) and a VRF routing table (instance.inet.0). For example, you can use a RIB group to copy routes learned in the VRF into the global routing table, inet.0, or copy routes learned in inet.0 into a VRF. You define the use of this RIB group in the VRF’s BGP configuration. In a routing policy you can do dynamic filtering of routes. For instance, you can use an import policy to only copy routes with certain communities into the global routing table.

For example:

content_copy zoom_out_map
rib-groups {
    rib-interface-routes-v4 {
        import-rib [ inet.0 VRF.inet.0 ];
    }
    rib-import-VRF-routes-to-inet0-v4 {
        export-rib VRF.inet.0;
        import-rib [ VRF.inet.0 inet.0 ];
        import-policy rib-import-VRF-routes-to-inet0-v4;
    }
    rib-import-inet0-routes-to-VRF-v4 {
        export-rib inet.0;
        import-rib [ inet.0 VRF.inet.0 ];
        import-policy rib-import-inet0-routes-to-VRF-v4;
    }
}
routing-options {
    interface-routes {
        rib-group {
            inet rib-interface-routes-v4;
        }
    }
}
protocols {
    bgp {
        group iBGP-peers {
            type internal;
            family inet {
                unicast {
                    rib-group rib-import-inet0-routes-to-VRF-v4;
                }
            }
        }
    }
}
routing-instances {
    VRF {
        routing-options {
            interface-routes {
                rib-group {
                    inet rib-interface-routes-v4;
                }
            }
        }
        protocols {
            bgp {
                group peersin-VRF {
                    family inet {
                        unicast {
                            rib-group rib-import-VRF-routes-to-inet0-v4;
                        }
                    }
                }
            }
        }
    }
}

Options

routing-table-name—Routing table group name.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

footer-navigation